Alpha-fade

This commit is contained in:
Andrei Drexler 2011-03-10 09:15:56 +00:00
parent a3ea10f035
commit 7d14cee411
2 changed files with 42 additions and 19 deletions

View file

@ -2,6 +2,9 @@
#define FADEIN_TIME 125 #define FADEIN_TIME 125
#define ANGLES -4 -94 #define ANGLES -4 -94
#define COUNTERS_ALPHA .6
#define COUNTERS_COLOR forecolor 0 0 .1 COUNTERS_ALPHA
{ {
menuDef { menuDef {
name "ingame_join" name "ingame_join"
@ -14,13 +17,14 @@
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
onOpen { onOpen {
play "sound/ui/whoosh3.wav" ; play "sound/ui/whoosh3.wav" ;
uiScript "updateJoinTeamNames" uiScript "updateJoinTeamNames" ;
setitemcolor window forecolor 5 5 5 0 ; ALPHA_FADE_FORE(window, 1) ;
timefade window forecolor 5 5 5 1 0 FADEIN_TIME ALPHA_FADE_FORE(counters, COUNTERS_ALPHA) ;
} }
//onESC { play "sound/ui/whoosh3.wav" ; close _self } onESC { close _self }
onESC { play "sound/ui/whoosh3.wav" } onClose { play "sound/ui/whoosh3.wav" ; open _prev }
//onOOBClick { play "sound/ui/whoosh3.wav" ; close _self } //onESC { play "sound/ui/whoosh3.wav" }
onOOBClick { close _self }
itemDef { itemDef {
renderpoint renderpoint
@ -43,6 +47,7 @@
renderpoint renderpoint
name "title" name "title"
text "Join team:" text "Join team:"
group window
forecolor .6 .0 .0 1 forecolor .6 .0 .0 1
//forecolor .0 .0 .1 1 //forecolor .0 .0 .1 1
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -63,6 +68,7 @@
itemDef { itemDef {
name team name team
text "^_1^_." text "^_1^_."
group window
ownerDraw UI_RQ3_JOINTEAM1 ownerDraw UI_RQ3_JOINTEAM1
shortcutKey "1" shortcutKey "1"
alignrect title ITEM_ALIGN_LEFT 0 32 128 14 alignrect title ITEM_ALIGN_LEFT 0 32 128 14
@ -77,12 +83,13 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 .6 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 { itemDef {
name team1 name team1
text "" text ""
group counters
cvar "ui_RQ3_teamCount1" cvar "ui_RQ3_teamCount1"
type ITEM_TYPE_NUMERICFIELD type ITEM_TYPE_NUMERICFIELD
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -91,7 +98,7 @@
textalignx 8 textalignx 8
textaligny 12 textaligny 12
textscale .225 textscale .225
forecolor 0 0 .1 .6 COUNTERS_COLOR
visible 1 visible 1
decoration decoration
/* /*
@ -105,6 +112,7 @@
itemDef { itemDef {
name team name team
text "^_2^_." text "^_2^_."
group window
ownerDraw UI_RQ3_JOINTEAM2 ownerDraw UI_RQ3_JOINTEAM2
shortcutKey "2" shortcutKey "2"
alignrect title ITEM_ALIGN_LEFT 0 48 128 14 alignrect title ITEM_ALIGN_LEFT 0 48 128 14
@ -119,12 +127,13 @@
style WINDOW_STYLE_FILLED style WINDOW_STYLE_FILLED
backcolor 0 0 0 .6 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 { itemDef {
name team2 name team2
text "" text ""
group counters
cvar "ui_RQ3_teamCount2" cvar "ui_RQ3_teamCount2"
type ITEM_TYPE_NUMERICFIELD type ITEM_TYPE_NUMERICFIELD
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -133,7 +142,7 @@
textalignx 8 textalignx 8
textaligny 12 textaligny 12
textscale .225 textscale .225
forecolor 0 0 .1 .6 COUNTERS_COLOR
visible 1 visible 1
decoration decoration
/* /*
@ -147,6 +156,7 @@
itemDef { itemDef {
name team name team
text "^_A^_uto-assign" text "^_A^_uto-assign"
group window
shortcutKey "A" shortcutKey "A"
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -158,7 +168,7 @@
textscale .225 textscale .225
forecolor 0 0 .1 1 forecolor 0 0 .1 1
visible 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 style WINDOW_STYLE_FILLED
backcolor 0 0 0 .6 backcolor 0 0 0 .6
@ -168,6 +178,7 @@
itemDef { itemDef {
name team name team
text "^_S^_pectators" text "^_S^_pectators"
group window
shortcutKey "S" shortcutKey "S"
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -179,7 +190,7 @@
textscale .225 textscale .225
forecolor 0 0 .1 1 forecolor 0 0 .1 1
visible 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 style WINDOW_STYLE_FILLED
backcolor 0 0 0 .6 backcolor 0 0 0 .6
@ -189,6 +200,7 @@
itemDef { itemDef {
name team3 name team3
text "" text ""
group counters
cvar "ui_RQ3_numSpectators" cvar "ui_RQ3_numSpectators"
type ITEM_TYPE_NUMERICFIELD type ITEM_TYPE_NUMERICFIELD
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -197,7 +209,7 @@
textalignx 8 textalignx 8
textaligny 12 textaligny 12
textscale .225 textscale .225
forecolor 0 0 .1 .6 COUNTERS_COLOR
visible 1 visible 1
decoration decoration
/* /*

View file

@ -2,6 +2,9 @@
#define FADEIN_TIME 125 #define FADEIN_TIME 125
#define ANGLES -4 -94 #define ANGLES -4 -94
#define COUNTERS_ALPHA .6
#define COUNTERS_COLOR forecolor 0 0 .1 COUNTERS_ALPHA
{ {
menuDef { menuDef {
name "ingame_join_dm" name "ingame_join_dm"
@ -14,10 +17,11 @@
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
onOpen { onOpen {
play "sound/ui/whoosh3.wav" ; play "sound/ui/whoosh3.wav" ;
setitemcolor window forecolor 5 5 5 0 ; ALPHA_FADE_FORE(window, 1) ;
timefade window forecolor 5 5 5 1 0 FADEIN_TIME ALPHA_FADE_FORE(counters, COUNTERS_ALPHA) ;
} }
onESC { play "sound/ui/whoosh3.wav" ; close _self } onESC { play "sound/ui/whoosh3.wav" ; close _self }
onClose { open _prev }
onOOBClick { play "sound/ui/whoosh3.wav" ; close _self } onOOBClick { play "sound/ui/whoosh3.wav" ; close _self }
itemDef { itemDef {
@ -39,6 +43,7 @@
itemDef { itemDef {
renderpoint renderpoint
name "title" name "title"
group window
text "Join game:" text "Join game:"
forecolor .6 .0 .0 1 forecolor .6 .0 .0 1
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -58,8 +63,10 @@
itemDef { itemDef {
name team name team
text "^_P^_layers" text "1. ^_P^_layers"
group window
shortcutKey "P" shortcutKey "P"
shortcutKey "1"
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
textstyle ITEM_TEXTSTYLE_NORMAL textstyle ITEM_TEXTSTYLE_NORMAL
@ -76,6 +83,7 @@
itemDef { itemDef {
name team1 name team1
text "" text ""
group counters
cvar "ui_RQ3_teamCount1" //doesn't work cvar "ui_RQ3_teamCount1" //doesn't work
type ITEM_TYPE_NUMERICFIELD type ITEM_TYPE_NUMERICFIELD
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -93,8 +101,10 @@
itemDef { itemDef {
name team name team
text "^_S^_pectators" text "2. ^_S^_pectators"
group window
shortcutKey "S" shortcutKey "S"
shortcutKey "2"
type ITEM_TYPE_BUTTON type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
textstyle ITEM_TEXTSTYLE_NORMAL textstyle ITEM_TEXTSTYLE_NORMAL
@ -103,7 +113,7 @@
textalignx 8 textalignx 8
textaligny 12 textaligny 12
textscale .225 textscale .225
forecolor 0 0 .1 1 COUNTERS_COLOR
visible 1 visible 1
action { play "sound/ui/whoosh3.wav" ; exec "cmd team s" ; uiScript closeingame } action { play "sound/ui/whoosh3.wav" ; exec "cmd team s" ; uiScript closeingame }
} }
@ -111,6 +121,7 @@
itemDef { itemDef {
name team3 name team3
text "" text ""
group counters
cvar "ui_RQ3_numSpectators" //doesn't work cvar "ui_RQ3_numSpectators" //doesn't work
type ITEM_TYPE_NUMERICFIELD type ITEM_TYPE_NUMERICFIELD
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
@ -119,7 +130,7 @@
textalignx 8 textalignx 8
textaligny 12 textaligny 12
textscale .225 textscale .225
forecolor 0 0 .1 .6 COUNTERS_COLOR
visible 1 visible 1
decoration decoration
} }