From 36c05e1e926e9e9f79d567acf62ffe79a9040a33 Mon Sep 17 00:00:00 2001 From: Samual Date: Wed, 18 Jan 2012 16:47:54 -0500 Subject: [PATCH] Make the cvarlist dialog entirely use a primary skincolor for all controls (red, in this case) -- plus, finish up the user tab in settings --- qcsrc/menu/skin-customizables.inc | 2 +- .../menu/xonotic/dialog_settings_misc_cvars.c | 20 ++++++-- qcsrc/menu/xonotic/dialog_settings_user.c | 46 ++++++++++++++----- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/qcsrc/menu/skin-customizables.inc b/qcsrc/menu/skin-customizables.inc index 2c3ba80c5..3eb91ee9d 100644 --- a/qcsrc/menu/skin-customizables.inc +++ b/qcsrc/menu/skin-customizables.inc @@ -146,8 +146,8 @@ SKINBEGIN SKINFLOAT(ALPHA_CVARLIST_SAVED, 1); SKINFLOAT(ALPHA_CVARLIST_TEMPORARY, 0.7); SKINVECTOR(COLOR_CVARLIST_CHANGED, '1 1 0.4'); - SKINVECTOR(COLOR_CVARLIST_REVERTBUTTON, '1 0 0'); SKINVECTOR(COLOR_CVARLIST_UNCHANGED, '1 1 1'); + SKINVECTOR(COLOR_CVARLIST_CONTROLS, '1 0 0'); // item: dialog SKINSTRING(GFX_DIALOGBORDER, "border"); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c index be2b64259..5dd1c5a5b 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c @@ -15,14 +15,24 @@ void XonoticCvarsDialog_showNotify(entity me) { loadAllCvars(me); } -void XonoticCvarsDialog_fill(entity me) +void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls { entity e, cvarlist, btn; + cvarlist = makeXonoticCvarList(); + + cvarlist.color = + cvarlist.colorF = + cvarlist.color2 = + cvarlist.colorC = + SKINCOLOR_CVARLIST_CONTROLS; + me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:"))); - me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0')); + me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), SKINCOLOR_CVARLIST_CONTROLS)); me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null)); + e.color = SKINCOLOR_CVARLIST_CONTROLS; + e.colorF = SKINCOLOR_CVARLIST_CONTROLS; e.onChange = CvarList_Filter_Change; e.onChangeEntity = cvarlist; btn.onClick = InputBox_Clear_Click; @@ -42,11 +52,13 @@ void XonoticCvarsDialog_fill(entity me) me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:"))); me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null)); cvarlist.cvarValueBox = e; + e.color = SKINCOLOR_CVARLIST_CONTROLS; + e.colorF = SKINCOLOR_CVARLIST_CONTROLS; e.onChange = CvarList_Value_Change; e.onChangeEntity = cvarlist; e.onEnter = CvarList_End_Editing; e.onEnterEntity = cvarlist; - me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON)); + me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_CONTROLS)); cvarlist.cvarDefaultBox = e; e.onClick = CvarList_Revert_Click; e.onClickEntity = cvarlist; @@ -58,7 +70,7 @@ void XonoticCvarsDialog_fill(entity me) cvarlist.cvarDescriptionBox = e; e.allowWrap = 1; me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); + me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), SKINCOLOR_CVARLIST_CONTROLS)); e.onClick = Dialog_Close; e.onClickEntity = me; } diff --git a/qcsrc/menu/xonotic/dialog_settings_user.c b/qcsrc/menu/xonotic/dialog_settings_user.c index e482b5033..954c74717 100644 --- a/qcsrc/menu/xonotic/dialog_settings_user.c +++ b/qcsrc/menu/xonotic/dialog_settings_user.c @@ -28,10 +28,11 @@ void XonoticUserSettingsTab_fill(entity me) me.TR(me); me.TD(me, me.rows - 2, 2, sk = makeXonoticSkinList()); me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, 2, e = makeXonoticButton(_("Apply immediately"), '0 0 0')); + me.TD(me, 1, 2, e = makeXonoticButton(_("Set skin"), '0 0 0')); e.onClick = SetSkin_Click; e.onClickEntity = sk; + /* AFTER 0.6 RELEASE TODO: Add a listbox which has fonts too, this way user can select the font they want. me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Text language:"))); me.TR(me); @@ -57,18 +58,41 @@ void XonoticUserSettingsTab_fill(entity me) me.TR(me); me.TR(me); me.TD(me, 1, 1.5, e = makeXonoticButton(_("Set font"), '0 0 0')); + e.onClick = SetLanguage_Click; + e.onClickEntity = sk;*/ + + me.gotoRC(me, 0, 3.1); me.setFirstColumn(me, me.currentColumn); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Text language:"))); + me.TR(me); + me.TD(me, 6, 1, sk = makeXonoticLanguageList()); + me.TR(me); + me.TR(me); + me.TR(me); + me.TR(me); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticButton(_("Set language"), '0 0 0')); e.onClick = SetLanguage_Click; e.onClickEntity = sk; - me.gotoRC(me, 7, 2.2); me.setFirstColumn(me, me.currentColumn); - if(cvar("developer")) - { - me.TR(me); - me.TR(me); - me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); - me.TD(me, 1, 0.75, e = makeXonoticRadioButton(2, "menu_tooltips", "0", _("Disabled"))); - me.TD(me, 1, 0.75, e = makeXonoticRadioButton(2, "menu_tooltips", "1", _("Standard"))); - me.TD(me, 1, 0.75, e = makeXonoticRadioButton(2, "menu_tooltips", "2", _("Advanced"))); - } + me.gotoRC(me, 9, 2.2); me.setFirstColumn(me, me.currentColumn); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips")); + e.addValue(e, _("Disabled"), "0"); + e.addValue(e, _("Standard"), "1"); + e.addValue(e, _("Advanced"), "2"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TR(me); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language"))); + me.TR(me); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uidtracking", _("Allow player statistics to track your client"))); + me.TR(me); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname"))); + setDependent(e, "cl_allow_uidtracking", 1, 1); + + me.gotoRC(me, me.rows - 2, 2.6); + me.TD(me, 1, 2, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle; sendcvar cl_allow_uidtracking; sendcvar cl_allow_uid2name;", COMMANDBUTTON_APPLY)); + } #endif -- 2.39.2