From 2424edd767271ead28c2847b3af2fa854d265a81 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Mon, 14 Jun 2010 00:27:11 +0300 Subject: [PATCH] add (fade)time settings to notify dialog --- qcsrc/client/hud.qc | 7 ++++--- qcsrc/menu/xonotic/dialog_hudpanel_notification.c | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 9d1b6816b..5ea29f446 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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])) { diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.c b/qcsrc/menu/xonotic/dialog_hudpanel_notification.c index c18572f2e..201dd7207 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.c @@ -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)); -- 2.39.2