From: k9er Date: Tue, 11 Feb 2025 16:47:35 +0000 (+0000) Subject: Some improvements to the menu's advanced cvarlist X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e02efd48e5ca1333dbc5dbe0e80a4d3526e8b9b0;p=xonotic%2Fxonotic-data.pk3dir.git Some improvements to the menu's advanced cvarlist --- diff --git a/qcsrc/menu/xonotic/cvarlist.qh b/qcsrc/menu/xonotic/cvarlist.qh index 1260ae447..a4fc0c1f5 100644 --- a/qcsrc/menu/xonotic/cvarlist.qh +++ b/qcsrc/menu/xonotic/cvarlist.qh @@ -44,4 +44,4 @@ void CvarList_Value_Change(entity box, entity me); void CvarList_Revert_Click(entity btn, entity me); void CvarList_End_Editing(entity box, entity me); -float autocvar_menu_cvarlist_onlymodified; +bool autocvar_menu_cvarlist_onlymodified; diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc index f35e0d22d..060a0d068 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc @@ -28,7 +28,8 @@ void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIS // add button which does cvar_resettodefaults_saveonly me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:"))); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Filter:"))); me.TD(me, 1, 3, e = makeXonoticInputBox(0, string_null)); e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS; e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS; @@ -44,6 +45,7 @@ void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIS me.gotoRC(me, me.rows - 8, 0); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:"))); me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null)); + e.colorL = '1 1 0'; // draw the cvar name yellow cvarlist.cvarNameBox = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:"))); @@ -59,7 +61,7 @@ void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIS e.onChangeEntity = cvarlist; e.onEnter = CvarList_End_Editing; e.onEnterEntity = cvarlist; - me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_CONTROLS)); + me.TD(me, 1, 1, e = makeXonoticButton_T(string_null, SKINCOLOR_CVARLIST_CONTROLS, _("Reset to default"))); cvarlist.cvarDefaultBox = e; e.onClick = CvarList_Revert_Click; e.onClickEntity = cvarlist; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 53fe3a915..2bb6bd3b7 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -498,7 +498,7 @@ seta menu_sounds 0 "enables menu sound effects; \"1\" = enable click sounds, \"2 seta menu_tooltips 1 "menu tooltips; \"0\" = disabled, \"1\" = enabled, \"2\" = also show cvar or console command (when available) changed or executed by the item" set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources (WARNING: not recommended and may cause crashes!)" set menu_showboxes 0 "show item bounding boxes (NOTE: for debugging)" -set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list" +set menu_cvarlist_onlymodified 1 "show only modified cvars in the advanced cvar list" seta menu_create_show_all 0 "show most gametypes in the create menu" set menu_no_music_nor_welcome 0 "don't play the menu music and skip the welcome announcer"