Minor appearance tweaks to netplay Connect dlg and to Quit dlg
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2501 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -22,11 +22,13 @@
|
|||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
|
#include "resinst.h"
|
||||||
|
#include "nameref.h"
|
||||||
#include "libs/graphics/widgets.h"
|
#include "libs/graphics/widgets.h"
|
||||||
#include "netplay/netoptions.h"
|
#include "netplay/netoptions.h"
|
||||||
|
|
||||||
#define MCD_WIDTH 260
|
#define MCD_WIDTH 260
|
||||||
#define MCD_HEIGHT 100
|
#define MCD_HEIGHT 110
|
||||||
|
|
||||||
#define MENU_FRAME_RATE (ONE_SECOND / 20)
|
#define MENU_FRAME_RATE (ONE_SECOND / 20)
|
||||||
|
|
||||||
@@ -66,6 +68,8 @@ static BOOLEAN done;
|
|||||||
|
|
||||||
static PCONNECT_DIALOG_STATE current_state;
|
static PCONNECT_DIALOG_STATE current_state;
|
||||||
|
|
||||||
|
static FONT PlayerFont;
|
||||||
|
|
||||||
static int do_connect (WIDGET *self, int event);
|
static int do_connect (WIDGET *self, int event);
|
||||||
static int do_listen (WIDGET *self, int event);
|
static int do_listen (WIDGET *self, int event);
|
||||||
static int do_cancel (WIDGET *self, int event);
|
static int do_cancel (WIDGET *self, int event);
|
||||||
@@ -125,7 +129,7 @@ MCD_DrawSlider (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_SLIDER *self = (WIDGET_SLIDER *)_self;
|
WIDGET_SLIDER *self = (WIDGET_SLIDER *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR default_color, selected;
|
COLOR default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = SetContextFont (PlayerFont);
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
RECT r;
|
RECT r;
|
||||||
@@ -175,7 +179,7 @@ MCD_DrawTextEntry (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_TEXTENTRY *self = (WIDGET_TEXTENTRY *)_self;
|
WIDGET_TEXTENTRY *self = (WIDGET_TEXTENTRY *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = SetContextFont (PlayerFont);
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
|
|
||||||
@@ -289,7 +293,7 @@ MCD_DrawTextEntry (WIDGET *_self, int x, int y)
|
|||||||
++r.corner.x;
|
++r.corner.x;
|
||||||
++r.corner.y;
|
++r.corner.y;
|
||||||
r.extent.height -= 2;
|
r.extent.height -= 2;
|
||||||
SetContextForeGroundColor (MENU_TEXT_COLOR);
|
SetContextForeGroundColor (MENU_CURSOR_COLOR);
|
||||||
DrawFilledRectangle (&r);
|
DrawFilledRectangle (&r);
|
||||||
|
|
||||||
SetContextForeGroundColor (inactive);
|
SetContextForeGroundColor (inactive);
|
||||||
@@ -596,6 +600,8 @@ MeleeConnectDialog (int side)
|
|||||||
{
|
{
|
||||||
CONNECT_DIALOG_STATE state;
|
CONNECT_DIALOG_STATE state;
|
||||||
|
|
||||||
|
PlayerFont = CaptureFont ((FONT_REF)LoadFont (PLAYER_FONT));
|
||||||
|
|
||||||
state.Initialized = FALSE;
|
state.Initialized = FALSE;
|
||||||
state.which_side = side;
|
state.which_side = side;
|
||||||
state.InputFunc = DoMeleeConnectDialog;
|
state.InputFunc = DoMeleeConnectDialog;
|
||||||
@@ -607,6 +613,8 @@ MeleeConnectDialog (int side)
|
|||||||
|
|
||||||
current_state = NULL;
|
current_state = NULL;
|
||||||
|
|
||||||
|
DestroyFont (ReleaseFont (PlayerFont));
|
||||||
|
|
||||||
return state.confirmed;
|
return state.confirmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,8 @@
|
|||||||
BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07)
|
BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07)
|
||||||
#define DKGRAY_COLOR \
|
#define DKGRAY_COLOR \
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08)
|
||||||
|
#define VDKGRAY_COLOR \
|
||||||
|
BUILD_COLOR (MAKE_RGB15 (0x06, 0x06, 0x06), 0x00)
|
||||||
#define WHITE_COLOR \
|
#define WHITE_COLOR \
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
|
||||||
|
|
||||||
@@ -74,9 +76,11 @@
|
|||||||
#define MENU_FOREGROUND_COLOR \
|
#define MENU_FOREGROUND_COLOR \
|
||||||
DKGRAY_COLOR
|
DKGRAY_COLOR
|
||||||
#define MENU_TEXT_COLOR \
|
#define MENU_TEXT_COLOR \
|
||||||
BLACK_COLOR
|
VDKGRAY_COLOR
|
||||||
#define MENU_HIGHLIGHT_COLOR \
|
#define MENU_HIGHLIGHT_COLOR \
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x14, 0x00, 0x00), 0x04)
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x00), 0x0E)
|
||||||
|
#define MENU_CURSOR_COLOR \
|
||||||
|
WHITE_COLOR
|
||||||
|
|
||||||
#define STATUS_ILLUMINATED_COLOR \
|
#define STATUS_ILLUMINATED_COLOR \
|
||||||
WHITE_COLOR
|
WHITE_COLOR
|
||||||
|
|||||||
Reference in New Issue
Block a user