]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Draw fixed keybinds darker in the menu
authorotta8634 <k9wolf@pm.me>
Tue, 4 Feb 2025 07:03:49 +0000 (15:03 +0800)
committerotta8634 <k9wolf@pm.me>
Tue, 4 Feb 2025 07:03:49 +0000 (15:03 +0800)
This makes it more obvious that they're immutable.
Did this by adding (COLOR|ALPHA)_KEYGRABBER_KEYS_IMMUTABLE to skinvalues.
- Used the same as the *_KEYGRABBER_KEYS values, with COLOR divided by 2 roughly.

gfx/menu/luma/skinvalues.txt
gfx/menu/luminos/skinvalues.txt
gfx/menu/wickedx/skinvalues.txt
gfx/menu/xaw/skinvalues.txt
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/keybinder.qc

index 1bf37b98b845915987fa4838bc3a3c7ee8408279..1ae0eb89103caa091f3ba9506a073b9e4bf05253 100644 (file)
@@ -138,6 +138,8 @@ MARGIN_INPUTBOX_CHARS         1
 // keygrabber
 ALPHA_KEYGRABBER_KEYS         0.8
 COLOR_KEYGRABBER_KEYS         '0.96 0.99 1'
+ALPHA_KEYGRABBER_KEYS_IMMUTABLE 0.8
+COLOR_KEYGRABBER_KEYS_IMMUTABLE '0.48 0.50 0.5'
 ALPHA_KEYGRABBER_TITLES       1
 COLOR_KEYGRABBER_TITLES       '0.03 0.25 0.49'
 
index d4fdef1cd5196031984803396f96beb9464cc814..c1e6d7fbaa8bebb26796ea99d9f7c7e716c8e60a 100755 (executable)
@@ -219,6 +219,8 @@ COLOR_KEYGRABBER_TITLES         '1 1 1'
 ALPHA_KEYGRABBER_TITLES         1
 COLOR_KEYGRABBER_KEYS           '1 1 1'
 ALPHA_KEYGRABBER_KEYS           0.7
+COLOR_KEYGRABBER_KEYS_IMMUTABLE '0.5 0.5 0.5'
+ALPHA_KEYGRABBER_KEYS_IMMUTABLE 0.7
 
 // item: player color button
 //   uses "colorbutton" images
index ca5e303dac811c1737caeab11e8347f1a163a5d1..39949558da3809d779d174e6599af25481b1b1cc 100644 (file)
@@ -219,6 +219,8 @@ COLOR_KEYGRABBER_TITLES         '1 1 1'
 ALPHA_KEYGRABBER_TITLES         1
 COLOR_KEYGRABBER_KEYS           '1 1 1'
 ALPHA_KEYGRABBER_KEYS           0.7
+COLOR_KEYGRABBER_KEYS_IMMUTABLE '0.5 0.5 0.5'
+ALPHA_KEYGRABBER_KEYS_IMMUTABLE 0.7
 
 // item: player color button
 //   uses "colorbutton" images
index aa4350cc56b49fe61f27e2884a0214d1226ab1ef..ef3f5c7e92c4f22bf50cf60a5adbd7e403014ef6 100644 (file)
@@ -148,6 +148,8 @@ COLOR_KEYGRABBER_TITLES         '1 1 1'
 ALPHA_KEYGRABBER_TITLES         1
 COLOR_KEYGRABBER_KEYS           '1 1 1'
 ALPHA_KEYGRABBER_KEYS           0.7
+COLOR_KEYGRABBER_KEYS_IMMUTABLE '0.5 0.5 0.5'
+ALPHA_KEYGRABBER_KEYS_IMMUTABLE 0.7
 
 // item: list box
 COLOR_LISTBOX_SELECTED          '0 0 0'
index 15bd5356b883a7905309d44506ed9ff9bc79f491..fdff26437bd9cc0421cbe7798a51ca438dedcb63 100644 (file)
@@ -184,6 +184,8 @@ SKINBEGIN
        SKINFLOAT(ALPHA_KEYGRABBER_TITLES, 1);
        SKINVECTOR(COLOR_KEYGRABBER_KEYS, '1 1 1');
        SKINFLOAT(ALPHA_KEYGRABBER_KEYS, 0.7);
+       SKINVECTOR(COLOR_KEYGRABBER_KEYS_IMMUTABLE, '0.5 0.5 0.5');
+       SKINFLOAT(ALPHA_KEYGRABBER_KEYS_IMMUTABLE, 0.7);
 
        // item: list box
        SKINVECTOR(COLOR_LISTBOX_SELECTED, '0 0 1');
index 47305e5970d3e419e14581dba9f04eadec99f007..9e117c566c6735cfab38fa77e323e489e28c0451 100644 (file)
@@ -572,7 +572,11 @@ void XonoticKeyBinder_drawListBoxItem(entity me, int i, vector absSize, bool isS
                func = argv(1);
        }
        if (KEYBIND_IS_SPECIAL(func))
+       {
                s = substring(func, 1, -1);
+               theColor = SKINCOLOR_KEYGRABBER_KEYS_IMMUTABLE;
+               theAlpha = SKINALPHA_KEYGRABBER_KEYS_IMMUTABLE;
+       }
        else
        {
                bool joy_active = cvar("joy_active");