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;
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;
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:"));