From 959655a5ec2a2bd0fc0312ac8b9140b38845844c Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 14 Nov 2006 07:56:29 +0000 Subject: [PATCH] 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 --- sc2/src/sc2code/cnctdlg.c | 16 ++++++++++++---- sc2/src/sc2code/colors.h | 8 ++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sc2/src/sc2code/cnctdlg.c b/sc2/src/sc2code/cnctdlg.c index be0aa7b2f..522c59995 100644 --- a/sc2/src/sc2code/cnctdlg.c +++ b/sc2/src/sc2code/cnctdlg.c @@ -22,11 +22,13 @@ #include "controls.h" #include "colors.h" #include "setup.h" +#include "resinst.h" +#include "nameref.h" #include "libs/graphics/widgets.h" #include "netplay/netoptions.h" #define MCD_WIDTH 260 -#define MCD_HEIGHT 100 +#define MCD_HEIGHT 110 #define MENU_FRAME_RATE (ONE_SECOND / 20) @@ -66,6 +68,8 @@ static BOOLEAN done; static PCONNECT_DIALOG_STATE current_state; +static FONT PlayerFont; + static int do_connect (WIDGET *self, int event); static int do_listen (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; COLOR oldtext; COLOR default_color, selected; - FONT oldfont = SetContextFont (StarConFont); + FONT oldfont = SetContextFont (PlayerFont); FRAME oldFontEffect = SetContextFontEffect (NULL); TEXT t; RECT r; @@ -175,7 +179,7 @@ MCD_DrawTextEntry (WIDGET *_self, int x, int y) WIDGET_TEXTENTRY *self = (WIDGET_TEXTENTRY *)_self; COLOR oldtext; COLOR inactive, default_color, selected; - FONT oldfont = SetContextFont (StarConFont); + FONT oldfont = SetContextFont (PlayerFont); FRAME oldFontEffect = SetContextFontEffect (NULL); TEXT t; @@ -289,7 +293,7 @@ MCD_DrawTextEntry (WIDGET *_self, int x, int y) ++r.corner.x; ++r.corner.y; r.extent.height -= 2; - SetContextForeGroundColor (MENU_TEXT_COLOR); + SetContextForeGroundColor (MENU_CURSOR_COLOR); DrawFilledRectangle (&r); SetContextForeGroundColor (inactive); @@ -596,6 +600,8 @@ MeleeConnectDialog (int side) { CONNECT_DIALOG_STATE state; + PlayerFont = CaptureFont ((FONT_REF)LoadFont (PLAYER_FONT)); + state.Initialized = FALSE; state.which_side = side; state.InputFunc = DoMeleeConnectDialog; @@ -607,6 +613,8 @@ MeleeConnectDialog (int side) current_state = NULL; + DestroyFont (ReleaseFont (PlayerFont)); + return state.confirmed; } diff --git a/sc2/src/sc2code/colors.h b/sc2/src/sc2code/colors.h index 92c58d3f6..21dc32642 100644 --- a/sc2/src/sc2code/colors.h +++ b/sc2/src/sc2code/colors.h @@ -58,6 +58,8 @@ BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x07) #define DKGRAY_COLOR \ BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x0A), 0x08) +#define VDKGRAY_COLOR \ + BUILD_COLOR (MAKE_RGB15 (0x06, 0x06, 0x06), 0x00) #define WHITE_COLOR \ BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F) @@ -74,9 +76,11 @@ #define MENU_FOREGROUND_COLOR \ DKGRAY_COLOR #define MENU_TEXT_COLOR \ - BLACK_COLOR + VDKGRAY_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 \ WHITE_COLOR