From: terencehill <piuntn@gmail.com>
Date: Mon, 20 Dec 2010 17:29:00 +0000 (+0100)
Subject: hud_panel_weapons_timeout_effect 1 now is only slide, 3 is slide + alpha (old 1)
X-Git-Tag: xonotic-v0.5.0~341
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff21bf2e7a1d8a0c3b2ad02880c8e97da7f3072c;p=xonotic%2Fxonotic-data.pk3dir.git

hud_panel_weapons_timeout_effect 1 now is only slide, 3 is slide + alpha (old 1)

I personally prefer only slide
---

diff --git a/hud_luminos.cfg b/hud_luminos.cfg
index 61630c1856..1352b80469 100644
--- a/hud_luminos.cfg
+++ b/hud_luminos.cfg
@@ -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"
diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc
index c03755e01e..628c4dc817 100644
--- a/qcsrc/client/hud.qc
+++ b/qcsrc/client/hud.qc
@@ -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;
diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.c b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
index ad3d080415..f51b767e97 100644
--- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
+++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
@@ -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:"));