]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
hud_panel_weapons_timeout_effect 1 now is only slide, 3 is slide + alpha (old 1)
authorterencehill <piuntn@gmail.com>
Mon, 20 Dec 2010 17:29:00 +0000 (18:29 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 20 Dec 2010 21:45:22 +0000 (22:45 +0100)
I personally prefer only slide

hud_luminos.cfg
qcsrc/client/hud.qc
qcsrc/menu/xonotic/dialog_hudpanel_weapons.c

index 61630c1856dba506b864b3882fdb3b07a436424e..1352b80469140f3bb066f73ee46e08c5b633bea4 100644 (file)
@@ -49,7 +49,7 @@ seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
 seta hud_panel_weapons_timeout "3"
-seta hud_panel_weapons_timeout_effect "1"
+seta hud_panel_weapons_timeout_effect "3"
 
 seta hud_panel_ammo 1
 seta hud_panel_ammo_pos "0.190000 0.920000"
index c03755e01e3f47b07e9a2b27219c14f0ef731fbb..628c4dc817c75faf5346d6b7495139af36271340 100644 (file)
@@ -617,12 +617,12 @@ void HUD_Weapons(void)
        if (timeout && time >= weapontime + timeout && !autocvar__hud_configure)
        {
                f = (time - (weapontime + timeout)) / timeout_effect_length;
-               if (autocvar_hud_panel_weapons_timeout_effect)
+               if (autocvar_hud_panel_weapons_timeout_effect == 1 || autocvar_hud_panel_weapons_timeout_effect == 3)
                {
                        panel_bg_alpha *= (1 - f);
                        panel_fg_alpha *= (1 - f);
                }
-               if (autocvar_hud_panel_weapons_timeout_effect == 1)
+               if (autocvar_hud_panel_weapons_timeout_effect == 2 || autocvar_hud_panel_weapons_timeout_effect == 3)
                {
                        f *= f; // for a cooler movement
                        center_x = panel_pos_x + panel_size_x/2;
@@ -648,12 +648,12 @@ void HUD_Weapons(void)
        else if (timeout && time < weaponprevtime + timein_effect_length && !autocvar__hud_configure)
        {
                f = (time - weaponprevtime) / timein_effect_length;
-               if (autocvar_hud_panel_weapons_timeout_effect)
+               if (autocvar_hud_panel_weapons_timeout_effect == 1 || autocvar_hud_panel_weapons_timeout_effect == 3)
                {
                        panel_bg_alpha *= (f);
                        panel_fg_alpha *= (f);
                }
-               if (autocvar_hud_panel_weapons_timeout_effect == 1)
+               if (autocvar_hud_panel_weapons_timeout_effect == 2 || autocvar_hud_panel_weapons_timeout_effect == 3)
                {
                        f *= f; // for a cooler movement
                        f = 1 - f;
index ad3d080415e6547af2452536ff50b8f8c4149321..f51b767e970bf000a985653190e2cdf3dfdc1ac4 100644 (file)
@@ -81,12 +81,14 @@ void XonoticHUDWeaponsDialog_fill(entity me)
                                e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Fade effect:"));
-               me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "0", "None"));
-                       setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
-               me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "1", "Slide"));
-                       setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
-               me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "2", "Alpha"));
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Fade effect:"));
+               setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
+                       me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout_effect"))));
+                               e.addValue(e, "None",  "0");
+                               e.addValue(e, "Slide", "1");
+                               e.addValue(e, "Alpha", "2");
+                               e.addValue(e, "Both",  "3");
+                               e.configureXonoticTextSliderValues(e);
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Weapon icons:"));