]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add (fade)time settings to notify dialog
authorFruitieX <rasse@rasse-lappy.localdomain>
Sun, 13 Jun 2010 21:27:11 +0000 (00:27 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Sun, 13 Jun 2010 21:27:11 +0000 (00:27 +0300)
qcsrc/client/hud.qc
qcsrc/menu/xonotic/dialog_hudpanel_notification.c

index 9d1b6816b88425a9a51e981a080f87b765e02a7b..5ea29f4469f8ae2777a3a361322b0decac7bac4f 100644 (file)
@@ -2588,6 +2588,7 @@ void HUD_Notify (void)
                        {
                                attacker = textShortenToWidth("Player1", 0.5 * mySize_x - height, fontsize, stringwidth_colors);
                                victim = textShortenToWidth("Player2", 0.5 * mySize_x - height, fontsize, stringwidth_colors);
+                               a = bound(0, (when - j) / 4, 1);
                        }
                        else
                        {
@@ -2602,9 +2603,9 @@ void HUD_Notify (void)
 
                        if(hud_configure) // example actions for config mode
                        {
-                               drawpic_skin(weap_pos, strcat("weapon", "electro"), '2 1 0' * height, '1 1 1', HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_attacker, attacker, fontsize, HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_victim, victim, fontsize, HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL);
+                               drawpic_skin(weap_pos, strcat("weapon", "electro"), '2 1 0' * height, '1 1 1', HUD_Panel_GetFgAlpha(id) * a, DRAWFLAG_NORMAL);
+                               drawcolorcodedstring(pos_attacker, attacker, fontsize, HUD_Panel_GetFgAlpha(id) * a, DRAWFLAG_NORMAL);
+                               drawcolorcodedstring(pos_victim, victim, fontsize, HUD_Panel_GetFgAlpha(id) * a, DRAWFLAG_NORMAL);
                        }
                        else if(WEP_VALID(killnotify_deathtype[j]))
                        {
index c18572f2e745023611ef1fd4b6cdc8cf069b086b..201dd72072461369e4c9cc7617ec9998daf589ec 100644 (file)
@@ -25,6 +25,14 @@ void fillXonoticHUDNotificationDialog(entity me)
                                me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "hud_notify_bg_alpha"));
                me.TR(me);
                        me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_notify_flip", "Flip"));
+               me.TR(me);
+                       me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Msg lifetime:"));
+                               me.TD(me, 1, 2, e = makeXonoticSlider(3, 15, 1, "hud_notify_time"));
+               me.TR(me);
+                       me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Msg fadetime:"));
+                               me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "hud_notify_fadetime"));
+               me.TR(me);
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_notify_print", "Also print messages to console"));
        me.TR(me);
        //me.gotoRC(me, me.rows - 1, 0);
                //me.TD(me, 1, me.columns, e = makeXonoticCommandButton("Exit Setup", '0 0 0', "_hud_configure 0", 1));