From 81a2ea6d51caecebfd69945e447ab48c275a7c80 Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Mon, 15 Dec 2014 02:29:32 +0100 Subject: [PATCH] Make the menu header style editable in skinfiles --- gfx/menu/luminos/skinvalues.txt | 2 ++ gfx/menu/wickedx/skinvalues.txt | 2 ++ gfx/menu/xaw/skinvalues.txt | 2 ++ qcsrc/menu/classes.c | 2 +- qcsrc/menu/skin-customizables.inc | 4 ++- .../menu/xonotic/dialog_multiplayer_create.c | 8 ++--- .../menu/xonotic/dialog_multiplayer_profile.c | 33 +++++++------------ qcsrc/menu/xonotic/dialog_settings_game_hud.c | 16 +++------ .../xonotic/dialog_settings_game_messages.c | 16 +++------ .../menu/xonotic/dialog_settings_game_model.c | 8 ++--- .../xonotic/dialog_settings_game_weapons.c | 4 +-- qcsrc/menu/xonotic/dialog_settings_input.c | 12 ++----- qcsrc/menu/xonotic/dialog_settings_misc.c | 12 ++----- qcsrc/menu/xonotic/dialog_settings_user.c | 8 ++--- qcsrc/menu/xonotic/textlabel.c | 9 +++++ 15 files changed, 51 insertions(+), 87 deletions(-) diff --git a/gfx/menu/luminos/skinvalues.txt b/gfx/menu/luminos/skinvalues.txt index d2be82d27..dcab8a45e 100755 --- a/gfx/menu/luminos/skinvalues.txt +++ b/gfx/menu/luminos/skinvalues.txt @@ -47,6 +47,8 @@ ALPHA_DISABLED 0.2 ALPHA_BEHIND 0.5 ALPHA_TEXT 0.7 COLOR_TEXT '1 1 1' +ALPHA_HEADER 0.5 +COLOR_HEADER '1 1 1' // mouse // uses "cursor" images diff --git a/gfx/menu/wickedx/skinvalues.txt b/gfx/menu/wickedx/skinvalues.txt index 9ef8d2bcb..94eb09aaa 100644 --- a/gfx/menu/wickedx/skinvalues.txt +++ b/gfx/menu/wickedx/skinvalues.txt @@ -47,6 +47,8 @@ ALPHA_DISABLED 0.2 ALPHA_BEHIND 0.5 ALPHA_TEXT 0.7 COLOR_TEXT '1 1 1' +ALPHA_HEADER 0.5 +COLOR_HEADER '1 1 1' // mouse // uses "cursor" images diff --git a/gfx/menu/xaw/skinvalues.txt b/gfx/menu/xaw/skinvalues.txt index 8c4948f63..6cf666fce 100644 --- a/gfx/menu/xaw/skinvalues.txt +++ b/gfx/menu/xaw/skinvalues.txt @@ -64,6 +64,8 @@ ALPHA_DISABLED 0.2 ALPHA_BEHIND 1 ALPHA_TEXT 0.7 COLOR_TEXT '1 1 1' +ALPHA_HEADER 0.5 +COLOR_HEADER '1 1 1' // item: button // uses "button" images diff --git a/qcsrc/menu/classes.c b/qcsrc/menu/classes.c index 2cc5f7d81..9b872cbf2 100644 --- a/qcsrc/menu/classes.c +++ b/qcsrc/menu/classes.c @@ -26,6 +26,7 @@ #include "xonotic/bigbutton.c" #include "xonotic/commandbutton.c" #include "xonotic/bigcommandbutton.c" +#include "xonotic/textlabel.c" #include "xonotic/dialog_firstrun.c" #include "xonotic/dialog_teamselect.c" #include "xonotic/dialog_sandboxtools.c" @@ -41,7 +42,6 @@ #include "xonotic/dialog_multiplayer.c" #include "xonotic/dialog_multiplayer_profile.c" #include "xonotic/tabcontroller.c" -#include "xonotic/textlabel.c" #include "xonotic/slider.c" #include "xonotic/slider_resolution.c" #include "xonotic/checkbox.c" diff --git a/qcsrc/menu/skin-customizables.inc b/qcsrc/menu/skin-customizables.inc index 8895c04bb..1db6e6775 100644 --- a/qcsrc/menu/skin-customizables.inc +++ b/qcsrc/menu/skin-customizables.inc @@ -100,7 +100,9 @@ SKINBEGIN SKINFLOAT(ALPHA_BEHIND, 0.5); SKINFLOAT(ALPHA_TEXT, 0.7); SKINVECTOR(COLOR_TEXT, '1 1 1'); - + SKINFLOAT(ALPHA_HEADER, 0.5); + SKINVECTOR(COLOR_HEADER, '1 1 1'); + // item: button SKINSTRING(GFX_BUTTON, "button"); SKINSTRING(GFX_BUTTON_GRAY, "buttongray"); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.c b/qcsrc/menu/xonotic/dialog_multiplayer_create.c index 9da8419a3..8ae9107a9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.c @@ -66,9 +66,7 @@ void XonoticServerCreateTab_fill(entity me) entity e, e0; me.gotoRC(me, 0.5, 0); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gametype"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, makeXonoticHeaderLabel(_("Gametype"))); me.TR(me); me.TD(me, 10.5, 3, e = makeXonoticGametypeList()); @@ -146,9 +144,7 @@ void XonoticServerCreateTab_fill(entity me) me.gotoRC(me, 0.5, 3.2); me.setFirstColumn(me, me.currentColumn); me.mapListBox = makeXonoticMapList(); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Maplist"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Maplist"))); makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback); me.TR(me); me.TD(me, me.rows - 4, 3, me.mapListBox); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.c b/qcsrc/menu/xonotic/dialog_multiplayer_profile.c index 4d1aeb1d7..a316be73b 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.c @@ -7,7 +7,7 @@ CLASS(XonoticProfileTab) EXTENDS(XonoticTab) ATTRIB(XonoticProfileTab, rows, float, 23) ATTRIB(XonoticProfileTab, columns, float, 6.1) // added extra .2 for center space ATTRIB(XonoticProfileTab, playerNameLabel, entity, NULL) - ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, 0) + ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, SKINALPHA_HEADER) ENDCLASS(XonoticProfileTab) entity makeXonoticProfileTab(); #endif @@ -37,9 +37,7 @@ void XonoticProfileTab_fill(entity me) // NAME SECTION // ============== me.gotoRC(me, 0.5, 0); - me.TD(me, 1, 3, me.playerNameLabel = makeXonoticTextLabel(0.5, _("Name"))); - me.playerNameLabel.isBold = TRUE; - me.playerNameLabelAlpha = 0.5; + me.TD(me, 1, 3, me.playerNameLabel = makeXonoticHeaderLabel(_("Name"))); me.gotoRC(me, 1.5, 0); me.TD(me, 1, 3, label = makeXonoticTextLabel(0.5, string_null)); @@ -66,9 +64,8 @@ void XonoticProfileTab_fill(entity me) //me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP RIGHT //me.gotoRC(me, 9, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM RIGHT me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn); // BOTTOM LEFT - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Model"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Model"))); + me.TR(me); //me.TDempty(me, 0); // MODEL LEFT, COLOR RIGHT me.TDempty(me, 1); // MODEL RIGHT, COLOR LEFT @@ -84,9 +81,7 @@ void XonoticProfileTab_fill(entity me) //me.setFirstColumn(me, me.currentColumn + 2); // MODEL LEFT, COLOR RIGHT me.gotoRC(me, me.currentRow, 0); me.setFirstColumn(me, me.currentColumn); // MODEL RIGHT, COLOR LEFT me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 1, e = makeXonoticHeaderLabel(_("Glowing color"))); for(i = 0; i < 15; ++i) { if(mod(i, 5) == 0) @@ -95,9 +90,7 @@ void XonoticProfileTab_fill(entity me) } me.TR(me); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 1, e = makeXonoticHeaderLabel(_("Detail color"))); for(i = 0; i < 15; ++i) { if(mod(i, 5) == 0) @@ -111,9 +104,8 @@ void XonoticProfileTab_fill(entity me) me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP RIGHT //me.gotoRC(me, 9, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM RIGHT //me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn); // BOTTOM LEFT - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Statistics"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Statistics"))); + me.TR(me); me.TDempty(me, 0.25); me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uidtracking", _("Allow player statistics to track your client"))); @@ -134,9 +126,8 @@ void XonoticProfileTab_fill(entity me) me.gotoRC(me, 16, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM SECTION, TOP POS //me.gotoRC(me, 13.5, 3.1); me.setFirstColumn(me, me.currentColumn); // BOTTOM SECTION, TOP POS //me.gotoRC(me, 0.5, 3.1); me.setFirstColumn(me, me.currentColumn); // TOP SECTION, TOP POS - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Country"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Country"))); + me.TR(me); me.TDempty(me, 0.5); me.TD(me, 4.5, 2, e = makeXonoticLanguageList()); // todo: cl_country: create proper country list @@ -156,9 +147,7 @@ void XonoticProfileTab_fill(entity me) e.addValue(e, ZCTX(_("GENDER^Male")), "2"); e.configureXonoticTextSliderValues(e); #else - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gender"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gender"))); me.TR(me); #define GENDERWIDTH_OFFSET 0.25 #define GENDERWIDTH_LENGTH 2.5 diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hud.c b/qcsrc/menu/xonotic/dialog_settings_game_hud.c index 68ec7096d..fc7e3a136 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_hud.c +++ b/qcsrc/menu/xonotic/dialog_settings_game_hud.c @@ -46,9 +46,7 @@ void XonoticGameHUDSettingsTab_fill(entity me) //me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Scoreboard"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Scoreboard"))); //me.TR(me); // me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Alpha:"))); // me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "scoreboard_alpha_bg")); @@ -68,9 +66,7 @@ void XonoticGameHUDSettingsTab_fill(entity me) me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Waypoints"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Waypoints"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map"))); me.TR(me); @@ -101,9 +97,7 @@ void XonoticGameHUDSettingsTab_fill(entity me) #if 0 me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Damage"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Damage"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Overlay:"))); me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage")); @@ -121,9 +115,7 @@ void XonoticGameHUDSettingsTab_fill(entity me) #endif me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Player Names"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Player Names"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_messages.c b/qcsrc/menu/xonotic/dialog_settings_game_messages.c index c0dbb1f82..6f605ccbc 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_messages.c +++ b/qcsrc/menu/xonotic/dialog_settings_game_messages.c @@ -30,9 +30,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) entity e; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Frag Information"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Frag Information"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Display information about killing sprees"))); me.TR(me); @@ -73,9 +71,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available"))); me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gamemode Settings"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gamemode Settings"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_CAPTURE_TIME_RED", _("Display capture times in Capture The Flag"))); makeMulti(e, "notification_CHOICE_CTF_CAPTURE_TIME_BLUE notification_CHOICE_CTF_CAPTURE_BROKEN_RED notification_CHOICE_CTF_CAPTURE_BROKEN_BLUE notification_CHOICE_CTF_CAPTURE_UNBROKEN_RED notification_CHOICE_CTF_CAPTURE_UNBROKEN_BLUE "); @@ -86,9 +82,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) e.sendCvars = TRUE; me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(4, 1, "con_notify", _("Display console messages in the top left corner"))); me.TR(me); @@ -108,9 +102,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) makeMulti(e, "notification_INFO_ITEM_WEAPON_DROP notification_INFO_ITEM_WEAPON_GOT notification_INFO_ITEM_WEAPON_NOAMMO notification_INFO_ITEM_WEAPON_PRIMORSEC notification_INFO_ITEM_WEAPON_UNAVAILABLE"); me.gotoRC(me, 9, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Announcers"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Announcers"))); #if 0 // there's just not enough room for this, and it's not important enough to justify... me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.c b/qcsrc/menu/xonotic/dialog_settings_game_model.c index 0e93378e7..c2aedc1f7 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.c +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.c @@ -34,9 +34,7 @@ void XonoticGameModelSettingsTab_fill(entity me) // later I would like quite a few more options in this tab. me.gotoRC(me, 0, 1); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Items"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Items"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_simple_items", _("Use simple 2D images instead of item models"))); me.TR(me); @@ -55,9 +53,7 @@ void XonoticGameModelSettingsTab_fill(entity me) me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Players"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Players"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine"))); me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_weapons.c b/qcsrc/menu/xonotic/dialog_settings_game_weapons.c index a6b450d5a..bc7cc7d7f 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_weapons.c +++ b/qcsrc/menu/xonotic/dialog_settings_game_weapons.c @@ -31,9 +31,7 @@ void XonoticGameWeaponsSettingsTab_fill(entity me) me.TR(me); me.TDempty(me, 0.25); - me.TD(me, 1, 2.5, e = makeXonoticTextLabel(0.5, _("Weapon Priority List"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 2.5, e = makeXonoticHeaderLabel(_("Weapon Priority List"))); me.TR(me); me.TDempty(me, 0.25); me.TD(me, 10, 2.5, e = me.weaponsList = makeXonoticWeaponsList()); diff --git a/qcsrc/menu/xonotic/dialog_settings_input.c b/qcsrc/menu/xonotic/dialog_settings_input.c index 7de3cfa9b..f58ce1572 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input.c +++ b/qcsrc/menu/xonotic/dialog_settings_input.c @@ -30,9 +30,7 @@ void XonoticInputSettingsTab_fill(entity me) entity kb; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Key Bindings"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Key Bindings"))); me.TR(me); me.TD(me, me.rows - 2.5, 3, kb = makeXonoticKeyBinder()); me.gotoRC(me, me.rows - 1.5, 0); @@ -52,9 +50,7 @@ void XonoticInputSettingsTab_fill(entity me) kb.clearButton = e; me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Mouse"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:"))); me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); @@ -82,9 +78,7 @@ void XonoticInputSettingsTab_fill(entity me) me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"))); me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.c b/qcsrc/menu/xonotic/dialog_settings_misc.c index 91d25b026..0fd2db2fe 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc.c @@ -23,9 +23,7 @@ void XonoticMiscSettingsTab_fill(entity me) //entity sk; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Network"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network"))); me.TR(me); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:"))); me.TD(me, 1, 1.5, e = makeXonoticInputBox(0, "cl_port")); @@ -71,9 +69,7 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Framerate"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps")); @@ -119,9 +115,7 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second"))); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips")); diff --git a/qcsrc/menu/xonotic/dialog_settings_user.c b/qcsrc/menu/xonotic/dialog_settings_user.c index 547ac5221..b3f888594 100644 --- a/qcsrc/menu/xonotic/dialog_settings_user.c +++ b/qcsrc/menu/xonotic/dialog_settings_user.c @@ -25,9 +25,7 @@ void XonoticUserSettingsTab_fill(entity me) me.TR(me); me.TDempty(me, 0.25); - me.TD(me, 1, 2.5, e = makeXonoticTextLabel(0.5, _("Menu Skins"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 2.5, e = makeXonoticHeaderLabel(_("Menu Skins"))); me.TR(me); me.TDempty(me, 0.25); me.TD(me, me.rows - 2.5, 2.5, sk = makeXonoticSkinList()); @@ -66,9 +64,7 @@ void XonoticUserSettingsTab_fill(entity me) e.onClickEntity = sk;*/ me.gotoRC(me, 0, 3.75); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 1.5, e = makeXonoticTextLabel(0.5, _("Text Language"))); - e.isBold = TRUE; - e.alpha = 0.5; + me.TD(me, 1, 1.5, e = makeXonoticHeaderLabel(_("Text Language"))); me.TR(me); me.TD(me, 8, 1.5, sk = makeXonoticLanguageList()); diff --git a/qcsrc/menu/xonotic/textlabel.c b/qcsrc/menu/xonotic/textlabel.c index 757e07ff1..c0e0806d8 100644 --- a/qcsrc/menu/xonotic/textlabel.c +++ b/qcsrc/menu/xonotic/textlabel.c @@ -17,6 +17,15 @@ entity makeXonoticTextLabel(float theAlign, string theText) me.configureXonoticTextLabel(me, theAlign, theText); return me; } +entity makeXonoticHeaderLabel(string theText) +{ + entity me; + me = makeXonoticTextLabel(0.5, theText); + me.colorL = SKINCOLOR_HEADER; + me.alpha = SKINALPHA_HEADER; + me.isBold = TRUE; + return me; +} void XonoticTextLabel_configureXonoticTextLabel(entity me, float theAlign, string theText) { me.configureLabel(me, theText, me.fontSize, theAlign); -- 2.39.2