From 7d14cee411f7b0610b8e29ad61485dd03fa625d2 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Thu, 10 Mar 2011 09:15:56 +0000 Subject: [PATCH] Alpha-fade --- reaction/uifiles/ingame_join.menu | 38 ++++++++++++++++++---------- reaction/uifiles/ingame_join_dm.menu | 23 ++++++++++++----- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/reaction/uifiles/ingame_join.menu b/reaction/uifiles/ingame_join.menu index c489335b..06d9f5f8 100644 --- a/reaction/uifiles/ingame_join.menu +++ b/reaction/uifiles/ingame_join.menu @@ -2,6 +2,9 @@ #define FADEIN_TIME 125 #define ANGLES -4 -94 +#define COUNTERS_ALPHA .6 +#define COUNTERS_COLOR forecolor 0 0 .1 COUNTERS_ALPHA + { menuDef { name "ingame_join" @@ -14,13 +17,14 @@ style WINDOW_STYLE_EMPTY onOpen { play "sound/ui/whoosh3.wav" ; - uiScript "updateJoinTeamNames" - setitemcolor window forecolor 5 5 5 0 ; - timefade window forecolor 5 5 5 1 0 FADEIN_TIME + uiScript "updateJoinTeamNames" ; + ALPHA_FADE_FORE(window, 1) ; + ALPHA_FADE_FORE(counters, COUNTERS_ALPHA) ; } - //onESC { play "sound/ui/whoosh3.wav" ; close _self } - onESC { play "sound/ui/whoosh3.wav" } - //onOOBClick { play "sound/ui/whoosh3.wav" ; close _self } + onESC { close _self } + onClose { play "sound/ui/whoosh3.wav" ; open _prev } + //onESC { play "sound/ui/whoosh3.wav" } + onOOBClick { close _self } itemDef { renderpoint @@ -43,6 +47,7 @@ renderpoint name "title" text "Join team:" + group window forecolor .6 .0 .0 1 //forecolor .0 .0 .1 1 style WINDOW_STYLE_EMPTY @@ -63,6 +68,7 @@ itemDef { name team text "^_1^_." + group window ownerDraw UI_RQ3_JOINTEAM1 shortcutKey "1" alignrect title ITEM_ALIGN_LEFT 0 32 128 14 @@ -77,12 +83,13 @@ style WINDOW_STYLE_FILLED backcolor 0 0 0 .6 */ - action { play "sound/ui/whoosh3.wav" ; exec "cmd team red" ; uiScript "weapAfterJoin" ; uiScript closeingame } + action { play "sound/ui/whoosh3.wav" ; exec "cmd team red" ; uiScript "weapAfterJoin" ; close _self } } itemDef { name team1 text "" + group counters cvar "ui_RQ3_teamCount1" type ITEM_TYPE_NUMERICFIELD style WINDOW_STYLE_EMPTY @@ -91,7 +98,7 @@ textalignx 8 textaligny 12 textscale .225 - forecolor 0 0 .1 .6 + COUNTERS_COLOR visible 1 decoration /* @@ -105,6 +112,7 @@ itemDef { name team text "^_2^_." + group window ownerDraw UI_RQ3_JOINTEAM2 shortcutKey "2" alignrect title ITEM_ALIGN_LEFT 0 48 128 14 @@ -119,12 +127,13 @@ style WINDOW_STYLE_FILLED backcolor 0 0 0 .6 */ - action { play "sound/ui/whoosh3.wav" ; exec "cmd team blue" ; uiScript "weapAfterJoin" ; close "ingame_join" } + action { play "sound/ui/whoosh3.wav" ; exec "cmd team blue" ; uiScript "weapAfterJoin" ; close _self } } itemDef { name team2 text "" + group counters cvar "ui_RQ3_teamCount2" type ITEM_TYPE_NUMERICFIELD style WINDOW_STYLE_EMPTY @@ -133,7 +142,7 @@ textalignx 8 textaligny 12 textscale .225 - forecolor 0 0 .1 .6 + COUNTERS_COLOR visible 1 decoration /* @@ -147,6 +156,7 @@ itemDef { name team text "^_A^_uto-assign" + group window shortcutKey "A" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY @@ -158,7 +168,7 @@ textscale .225 forecolor 0 0 .1 1 visible 1 - action { play "sound/ui/whoosh3.wav" ; exec "cmd team auto" ; uiScript "weapAfterJoin" ; close "ingame_join" } + action { play "sound/ui/whoosh3.wav" ; exec "cmd team auto" ; uiScript "weapAfterJoin" ; close _self } /* style WINDOW_STYLE_FILLED backcolor 0 0 0 .6 @@ -168,6 +178,7 @@ itemDef { name team text "^_S^_pectators" + group window shortcutKey "S" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY @@ -179,7 +190,7 @@ textscale .225 forecolor 0 0 .1 1 visible 1 - action { play "sound/ui/whoosh3.wav" ; exec "cmd team s" ; close "ingame_join" } + action { play "sound/ui/whoosh3.wav" ; exec "cmd team s" ; close _self } /* style WINDOW_STYLE_FILLED backcolor 0 0 0 .6 @@ -189,6 +200,7 @@ itemDef { name team3 text "" + group counters cvar "ui_RQ3_numSpectators" type ITEM_TYPE_NUMERICFIELD style WINDOW_STYLE_EMPTY @@ -197,7 +209,7 @@ textalignx 8 textaligny 12 textscale .225 - forecolor 0 0 .1 .6 + COUNTERS_COLOR visible 1 decoration /* diff --git a/reaction/uifiles/ingame_join_dm.menu b/reaction/uifiles/ingame_join_dm.menu index 064a6957..35208377 100644 --- a/reaction/uifiles/ingame_join_dm.menu +++ b/reaction/uifiles/ingame_join_dm.menu @@ -2,6 +2,9 @@ #define FADEIN_TIME 125 #define ANGLES -4 -94 +#define COUNTERS_ALPHA .6 +#define COUNTERS_COLOR forecolor 0 0 .1 COUNTERS_ALPHA + { menuDef { name "ingame_join_dm" @@ -14,10 +17,11 @@ style WINDOW_STYLE_EMPTY onOpen { play "sound/ui/whoosh3.wav" ; - setitemcolor window forecolor 5 5 5 0 ; - timefade window forecolor 5 5 5 1 0 FADEIN_TIME + ALPHA_FADE_FORE(window, 1) ; + ALPHA_FADE_FORE(counters, COUNTERS_ALPHA) ; } onESC { play "sound/ui/whoosh3.wav" ; close _self } + onClose { open _prev } onOOBClick { play "sound/ui/whoosh3.wav" ; close _self } itemDef { @@ -39,6 +43,7 @@ itemDef { renderpoint name "title" + group window text "Join game:" forecolor .6 .0 .0 1 style WINDOW_STYLE_EMPTY @@ -58,8 +63,10 @@ itemDef { name team - text "^_P^_layers" + text "1. ^_P^_layers" + group window shortcutKey "P" + shortcutKey "1" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL @@ -76,6 +83,7 @@ itemDef { name team1 text "" + group counters cvar "ui_RQ3_teamCount1" //doesn't work type ITEM_TYPE_NUMERICFIELD style WINDOW_STYLE_EMPTY @@ -93,8 +101,10 @@ itemDef { name team - text "^_S^_pectators" + text "2. ^_S^_pectators" + group window shortcutKey "S" + shortcutKey "2" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL @@ -103,7 +113,7 @@ textalignx 8 textaligny 12 textscale .225 - forecolor 0 0 .1 1 + COUNTERS_COLOR visible 1 action { play "sound/ui/whoosh3.wav" ; exec "cmd team s" ; uiScript closeingame } } @@ -111,6 +121,7 @@ itemDef { name team3 text "" + group counters cvar "ui_RQ3_numSpectators" //doesn't work type ITEM_TYPE_NUMERICFIELD style WINDOW_STYLE_EMPTY @@ -119,7 +130,7 @@ textalignx 8 textaligny 12 textscale .225 - forecolor 0 0 .1 .6 + COUNTERS_COLOR visible 1 decoration }