diff --git a/reaction/code/ui/ui_main.c b/reaction/code/ui/ui_main.c index 74e8ca73..01a6ea08 100644 --- a/reaction/code/ui/ui_main.c +++ b/reaction/code/ui/ui_main.c @@ -3633,10 +3633,14 @@ static void UI_DrawSelectedPlayer(rectDef_t * rect, float scale, vec4_t color, i uiInfo.playerRefresh = uiInfo.uiDC.realTime + 3000; UI_BuildPlayerList(); } - Text_Paint(rect->x, rect->y, scale, color, - (uiInfo. - teamLeader) ? UI_Cvar_VariableString("cg_selectedPlayerName") : UI_Cvar_VariableString("name"), 0, - 0, 0, textStyle, qfalse); + if (rect->hasVectors) + Text_PaintAngled(rect->x, rect->y, rect->u, rect->v, scale, color, + (uiInfo.teamLeader) ? UI_Cvar_VariableString("cg_selectedPlayerName") : UI_Cvar_VariableString("name"), + 0, 0, 0, textStyle, qfalse); + else + Text_Paint(rect->x, rect->y, scale, color, + (uiInfo.teamLeader) ? UI_Cvar_VariableString("cg_selectedPlayerName") : UI_Cvar_VariableString("name"), + 0, 0, 0, textStyle, qfalse); } static void UI_DrawServerRefreshDate(rectDef_t * rect, float scale, vec4_t color, int textStyle) diff --git a/reaction/uifiles/demo.menu b/reaction/uifiles/demo.menu index c0dee7db..8d45f1f7 100644 --- a/reaction/uifiles/demo.menu +++ b/reaction/uifiles/demo.menu @@ -169,7 +169,7 @@ style WINDOW_STYLE_EMPTY textalign ITEM_ALIGN_RIGHT textscale .25 - textalignx 40 + textalignx 38 textaligny 14 alignRect demolist ITEM_ALIGN_RIGHT 0 180 44 20 visible 1 @@ -184,7 +184,7 @@ itemdef { name "btn_render" subgroup "fade_fore_alpha" - text "^_R^_ender as AVI >" + text "> ^_R^_ender as AVI <" shortcutKey "R" forecolor .5 0 0 1 style WINDOW_STYLE_EMPTY @@ -192,7 +192,7 @@ textscale .25 textalignx 0 textaligny 14 - alignRect demolist ITEM_ALIGN_LEFT 0 180 96 20 + alignRect demolist ITEM_ALIGN_LEFT 0 180 102 20 visible 1 autowrapped action { uiScript RenderDemo } diff --git a/reaction/uifiles/ingame.menu b/reaction/uifiles/ingame.menu index 0e29d19d..11606fb1 100644 --- a/reaction/uifiles/ingame.menu +++ b/reaction/uifiles/ingame.menu @@ -2,6 +2,7 @@ #define ANGLES 2 -88 #define FADEIN_TIME 125 +//#define FADEIN_INGAME 1250 #define ITEM_HEIGHT 20 @@ -22,9 +23,6 @@ action { open DESTINATION } \ } - //style WINDOW_STYLE_FILLED \ - //backcolor 0 0 0 .5 \ - #define MENU_ITEM_TOGGLE(ITEM_NAME, DESTINATION, ITEM_TEXT, KEY, ALIGN, ITEM_WIDTH, Y_POS, CVAR_TEST)\ itemDef { \ renderpoint \ @@ -85,20 +83,19 @@ name "ingame" visible 0 fullScreen 0 - //onOOBClick { close _self } // this closes the window if it gets a click out of the rectangle rect UI_MINX UI_MINY UI_WIDTH UI_HEIGHT focusColor RQ3_MAIN_FOCUSCOLOR disableColor .5 .5 .5 1 onOpen { - setitemcolor window forecolor 5 5 5 0 ; - timefade window forecolor 5 5 5 1 0 FADEIN_TIME ; + //setitemcolor "background" forecolor 5 5 5 0 ; + //timefade "background" forecolor 5 5 5 1 0 FADEIN_INGAME ; play "sound/ui/whoosh3.wav" ; setfocus "button_about" ; } itemdef { name "ingame-back" - group background + group "background" background UI_ASSETS"/ingame-back.tga" rect 0 0 UI_WIDTH UI_HEIGHT style WINDOW_STYLE_SHADER @@ -108,7 +105,7 @@ itemdef { name "gradient-bottom" - group background + group "background" background UI_ASSETS"/ingame-gradient.tga" rect 0 $evalfloat(UI_MAXY - 128) UI_WIDTH 128 style WINDOW_STYLE_SHADER @@ -131,7 +128,7 @@ itemdef { name "gradient-top" - group background + group "background" background UI_ASSETS"/ingame-gradient-top.tga" rect 0 0 UI_WIDTH 96 style WINDOW_STYLE_SHADER @@ -151,7 +148,7 @@ itemdef { name "logo" - group background + group "background" background UI_ASSETS"/logo2.tga" rect $evalfloat(UI_WIDTH - 256) $evalfloat(UI_MAXY - 128) 256 128 style WINDOW_STYLE_SHADER @@ -167,7 +164,6 @@ MENU_ITEM("button_ignore", "ingame_ignore", "^_I^_gnore", "I", "button_vote", 56, 20) MENU_ITEM_TOGGLE("button_addbot", "ingame_addbot", "^_A^_dd Bot", "A", "button_ignore", 64, 40, "bot_enable") - //MENU_ITEM_HIDE("button_addbot", "ingame_addbot", "^_A^_dd Bot", "A", "button_ignore", 64, 40, "ui_singlePlayerActive", showCvar { 1 }) MENU_ITEM_TOGGLE("button_mm", "ingame_matchmode", "Mat^_c^_h Mode", "C", "button_addbot", 94, 20, "g_RQ3_matchmode") MENU_ITEM_HIDE("button_devmode", "ingame_devmode", "^_D^_eveloper Mode", "D", "button_mm", 119, 20, "sv_cheats", hideCvar { 0 }) MENU_ITEM("button_options", "ingame_setup", "^_O^_ptions", "O", "button_mm", 64, 40) @@ -191,8 +187,6 @@ disableColor .5 .5 .5 1 focusColor RQ3_MAIN_FOCUSCOLOR style WINDOW_STYLE_EMPTY - //style WINDOW_STYLE_FILLED - //backcolor 0 0 0 1 fullscreen 0 popup @@ -278,8 +272,6 @@ disableColor .5 .5 .5 1 focusColor RQ3_MAIN_FOCUSCOLOR style WINDOW_STYLE_EMPTY - //style WINDOW_STYLE_FILLED - //backcolor 0 0 0 1 fullscreen 0 popup diff --git a/reaction/uifiles/ingame_addbot.menu b/reaction/uifiles/ingame_addbot.menu index da87d977..fe4e380b 100644 --- a/reaction/uifiles/ingame_addbot.menu +++ b/reaction/uifiles/ingame_addbot.menu @@ -17,7 +17,7 @@ play "sound/ui/whoosh3.wav" ; setitemcolor window forecolor 5 5 5 0 ; timefade window forecolor 5 5 5 1 0 FADEIN_TIME ; - setfocus "botname" + setfocus "ok" } onESC { close _self ; open _prev } @@ -114,6 +114,7 @@ // OK // itemDef { + name "ok" text "^_O^_K" shortcutKey "O" type ITEM_TYPE_BUTTON diff --git a/reaction/uifiles/ingame_callvote.menu b/reaction/uifiles/ingame_callvote.menu index 911442ba..149857cf 100644 --- a/reaction/uifiles/ingame_callvote.menu +++ b/reaction/uifiles/ingame_callvote.menu @@ -307,7 +307,24 @@ Group # 3 - Kick visible 1 type ITEM_TYPE_BUTTON action { play "sound/ui/whoosh3.wav" ; uiScript voteKick ; uiScript closeingame } - ASSIGN_HINT("hint_tab3") + ASSIGN_HINT("hint_kick") + } + + itemDef { + text "Call a vote to kick" + name "hint_kick,allgroups,group3,hints,fade_alpha" + group "fade_fore_alpha,group3,allgroups" + ownerdraw UI_SELECTEDPLAYER + autowrapped + forecolor HINT_COLOR 1 + textalign ITEM_ALIGN_LEFT + textalignx 6 + textaligny 10 + textscale .2 + alignrect "line" ITEM_ALIGN_LEFT 0 8 288 40 + style WINDOW_STYLE_EMPTY + visible 0 + decoration } } diff --git a/reaction/uifiles/ingame_ignore.menu b/reaction/uifiles/ingame_ignore.menu index f89b0a18..6401edfa 100644 --- a/reaction/uifiles/ingame_ignore.menu +++ b/reaction/uifiles/ingame_ignore.menu @@ -7,7 +7,6 @@ name "ingame_ignore" visible MENU_FALSE // Visible on open fullscreen 0 - onOOBClick { close _self ; open _prev } // this closes the window if it gets a click out of the rectangle rect 192 64 340 264 disableColor .5 .5 .5 1 focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items @@ -19,7 +18,7 @@ onOOBClick { close _self ; open _prev } onOpen { play "sound/ui/whoosh3.wav" ; uiScript "refreshIngameServerInfo" } - onEsc { close _self ; open _prev } + onESC { close _self ; open _prev } onOpenSpecial { //normal items @@ -169,148 +168,5 @@ visible 1 action { exec "voip gain unmuteall" ; close ingame_ignore } } - } } - -#if 0 - -#include "ui/menudef.h" - - -{ - menudef { - name "ingame_ignore" - visible 0 - fullscreen 0 - //outOfBoundsClick // this closes the window if it gets a click out of the rectangle - onOOBClick { close _self } - rect 184 64 256 168 - disableColor .5 .5 .5 1 - focusColor 1 .75 0 1 // Menu focus color for text and items - style 1 - shadowStyle 1 - onOpen { play "sound/misc/menu1.wav" } - -//Window - - itemdef { - rect 0 0 256 168 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - rect 137 1 120 24 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" - visible 1 - decoration - } - - itemdef { - rect 137 1 120 24 - style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Ignore players" - visible 1 - decoration - } - - // Player list // - - itemdef { - rect 20 40 216 92 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_LISTBOX - elementwidth 120 - elementheight 15 - textscale .225 - elementtype LISTBOX_TEXT - feeder FEEDER_PLAYER_LIST - border 1 - bordercolor .25 .25 .25 1 - forecolor 1 1 1 1 - backcolor 0 0 0 .25 - outlinecolor .75 .75 1 .25 - visible 1 - //mouseEnter { setcolor bordercolor .7 0 0 1 } - //mouseExit { setcolor bordercolor .5 .5 .5 1 } - } - - //Scrollbar separator - itemdef { - rect 218 40 18 92 - style WINDOW_STYLE_EMPTY - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - decoration - visible 1 - } - - // Unignore // - - itemdef { - text "Unignore" - shortcutKey "U" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textscale .225 - rect 20 140 72 16 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 12 - forecolor Ig_Sub_TextColor - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript unIgnore ; close ingame_ignore } - } - - // Unignore All // - - itemdef { - text "Unignore All" - shortcutKey "A" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textscale .225 - rect 92 140 72 16 - textalign ITEM_ALIGN_CENTER - textalignx 36 - textaligny 12 - forecolor Ig_Sub_TextColor - visible 1 - action { play "sound/misc/menu1.wav" ; exec "clearignorelist" ; close ingame_ignore } - } - - // Ignore // - - itemdef { - text "Ignore" - shortcutKey "I" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textscale .225 - rect 164 140 72 16 - textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 - forecolor Ig_Sub_TextColor - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript ignore ; close ingame_ignore } - } - - } -} - -#endif diff --git a/reaction/uifiles/ingame_join.menu b/reaction/uifiles/ingame_join.menu index bd8deb98..c489335b 100644 --- a/reaction/uifiles/ingame_join.menu +++ b/reaction/uifiles/ingame_join.menu @@ -29,11 +29,9 @@ group window style WINDOW_STYLE_SHADER background UI_ASSETS"/paper_1" - //background UI_ASSETS"/post_it" //forecolor 1 1 .92 1 forecolor .92 .97 1 1 rect -4 -12 192 256 - //rect -16 0 180 152 anglevectors ANGLES visible 1 decoration @@ -209,196 +207,3 @@ } } } - - - - -#if 0 -#include "ui/menudef.h" - - -{ - menudef { - name "ingame_join" - visible 0 - fullscreen 0 - //outOfBoundsClick // this closes the window if it gets a click out of the rectangle - onOOBClick { close _self } - rect 176 64 180 140 - disableColor .5 .5 .5 1 - focusColor 1 .75 0 1 // Menu focus color for text and items - style 1 - shadowStyle 1 - onOpen { play "sound/misc/menu1.wav" ; uiScript "updateJoinTeamNames" } - -//Window - - itemdef { - rect 0 0 180 140 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - rect 61 1 120 24 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" - visible 1 - decoration - } - - itemdef { - rect 61 1 120 24 - style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Join team" - visible 1 - decoration - } - -//Buttons - - // Team 1 // - - itemdef { - name team - text "1." - ownerDraw UI_RQ3_JOINTEAM1 - shortcutKey "1" - //type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 8 36 132 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team red" ; uiScript "weapAfterJoin" ; close "ingame_join" } - } - - itemdef { - name team1 - text "" - cvar "ui_RQ3_teamCount1" - type ITEM_TYPE_NUMERICFIELD - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 140 36 32 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - decoration - } - - // Team 2 // - - itemdef { - name team - text "2." - ownerDraw UI_RQ3_JOINTEAM2 - shortcutKey "2" - //type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 8 56 132 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team blue" ; uiScript "weapAfterJoin" ; close "ingame_join" } - } - - itemdef { - name team2 - text "" - cvar "ui_RQ3_teamCount2" - type ITEM_TYPE_NUMERICFIELD - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 140 56 32 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - decoration - } - - // Auto Team // - - itemdef { - name team - text "A. Auto Team" - shortcutKey "A" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 8 76 132 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team auto" ; uiScript "weapAfterJoin" ; close "ingame_join" } - } - - // Spectate // - - itemdef { - name team - text "S. Spectators:" - shortcutKey "S" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 8 96 132 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team s" ; uiScript closeingame } - } - - itemdef { - name team3 - text "" - cvar "ui_RQ3_numSpectators" - type ITEM_TYPE_NUMERICFIELD - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 140 96 32 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - decoration - } - - - } - -} -#endif \ No newline at end of file diff --git a/reaction/uifiles/ingame_join_dm.menu b/reaction/uifiles/ingame_join_dm.menu index 9da12559..064a6957 100644 --- a/reaction/uifiles/ingame_join_dm.menu +++ b/reaction/uifiles/ingame_join_dm.menu @@ -125,129 +125,3 @@ } } } - -#if 0 -#include "ui/menudef.h" - - -{ - menudef { - name "ingame_join_dm" - visible 0 - fullscreen 0 - //outOfBoundsClick // this closes the window if it gets a click out of the rectangle - onOOBClick { close _self } - rect 184 64 140 100 - disableColor .5 .5 .5 1 - focusColor 1 .75 0 1 // Menu focus color for text and items - style 1 - shadowStyle 1 - onOpen { play "sound/misc/menu1.wav" } - -//Window - - itemdef { - rect 0 0 140 100 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - rect 21 1 120 24 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" - visible 1 - decoration - } - - itemdef { - rect 21 1 120 24 - style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Join game" - visible 1 - decoration - } - -//Buttons - - // Players // - - itemdef { - text "1. Players:" - shortcutKey "1" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - rect 8 36 128 20 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team red" ; uiScript closeingame } - } - - itemdef { - text "" - cvar "ui_RQ3_teamCount1" - type ITEM_TYPE_NUMERICFIELD - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 100 36 32 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - decoration - } - - // Spectators // - - itemdef { - text "S. Spectators:" - shortcutKey "S" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 8 60 128 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "cmd team s" ; uiScript closeingame } - } - - itemdef { - text "" - cvar "ui_RQ3_numSpectators" - type ITEM_TYPE_NUMERICFIELD - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 100 60 32 20 - textalign ITEM_ALIGN_LEFT - textalignx 16 - textaligny 18 - textscale .225 - forecolor 1 1 1 1 - visible 1 - decoration - } - } -} -#endif \ No newline at end of file diff --git a/reaction/uifiles/ingame_matchmode.menu b/reaction/uifiles/ingame_matchmode.menu index e6d65733..da7c37cc 100644 --- a/reaction/uifiles/ingame_matchmode.menu +++ b/reaction/uifiles/ingame_matchmode.menu @@ -1,109 +1,113 @@ #include "ui/menudef.h" +#define ANGLES 6 -84 { - - menuDef { - name "ingame_matchmode" - visible 0 - fullscreen 0 - //outOfBoundsClick // this closes the window if it gets a click out of the rectangle - onOOBClick { close _self ; open ingame } - rect 296 64 140 140 - disableColor .5 .5 .5 1 - focusColor 1 .75 0 1 // Menu focus color for text and items - style 1 - shadowStyle 1 - onOpen { play "sound/misc/menu1.wav" ; uiScript "readMMsettings" } - -//Window - - itemdef { - rect 0 0 140 140 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - rect 21 1 120 24 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" - visible 1 - decoration - } - - itemdef { - rect 21 1 120 24 - style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Matchmode" - visible 1 - decoration - } - -//Objects - - // SETTINGS // - - // Sub - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - text "S. Sub" - shortcutKey "S" - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 48 192 20 - textalign ITEM_ALIGN_LEFT - textalignx 4 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; exec "sub" ; uiScript closeingame } - } - - // Captain - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - text "C. Captain" - shortcutKey "C" - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 68 192 20 - textalign ITEM_ALIGN_LEFT - textalignx 4 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; close ingame_matchmode ; open ingame_matchmode_captain } - } - - // Referee - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - text "R. Referee" - shortcutKey "R" - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 88 192 20 - textalign ITEM_ALIGN_LEFT - textalignx 4 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; close ingame_matchmode ; open ingame_matchmode_referee } - } - + menuDef { + name "ingame_matchmode" + visible 0 + fullscreen 0 + rect 124 216 152 136 + anglevectors ANGLES + focusColor RQ3_MAIN_FOCUSCOLOR + popup + style WINDOW_STYLE_EMPTY + onOOBClick { close _self ; open ingame } + onOpen { + play "sound/ui/whoosh3.wav" ; + uiScript "readMMsettings" + } + onESC { close _self ; open "ingame" } + + itemDef { + renderpoint + name "paper" + menuAnchor + group window + style WINDOW_STYLE_SHADER + background UI_ASSETS"/post_it" + forecolor .95 .94 .87 1 + rect -8 4 180 152 + anglevectors ANGLES + visible 1 + decoration + } + + // TITLE // + /* + itemDef { + renderpoint + name "title" + text "Match Mode:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 12 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 28 36 240 36 + visible 1 + autowrapped + decoration + } + */ + + + // BUTTONS // + + + // SUB // + + itemDef { + renderpoint + name "sub" + text "> ^_S^_ubstitute" + shortcutKey "S" + type ITEM_TYPE_BUTTON + textscale UI_INGAME_TEXTSIZE + style WINDOW_STYLE_EMPTY + alignrect "paper" ITEM_ALIGN_LEFT 44 20 84 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "sub" ; uiScript closeingame } + } + + // CAPTAIN // + + itemDef { + name "captain" + text "> ^_C^_aptain" + shortcutKey "C" + type ITEM_TYPE_BUTTON + textscale UI_INGAME_TEXTSIZE + style WINDOW_STYLE_EMPTY + alignrect "sub" ITEM_ALIGN_LEFT 0 20 68 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; open "ingame_matchmode_captain" } + } + + // REFEREE // + + itemDef { + name "referee" + text "> ^_R^_eferee" + shortcutKey "R" + type ITEM_TYPE_BUTTON + textscale UI_INGAME_TEXTSIZE + style WINDOW_STYLE_EMPTY + alignrect "captain" ITEM_ALIGN_LEFT 0 20 68 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; open "ingame_matchmode_referee" } + } + } } -} \ No newline at end of file diff --git a/reaction/uifiles/ingame_matchmode_captain.menu b/reaction/uifiles/ingame_matchmode_captain.menu index 390d04e8..e75a8277 100644 --- a/reaction/uifiles/ingame_matchmode_captain.menu +++ b/reaction/uifiles/ingame_matchmode_captain.menu @@ -1,4 +1,408 @@ #include "ui/menudef.h" +#include "ui/tabs.h" + +//////////////////////////////////// +// +// CONSTANTS +// +// + + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define TAB_HEIGHT 20 +#define LINE_WIDTH 300 + + +//////////////////////////////////// +// +// MENU DEFINITION +// +// + +{ + menuDef { + name "ingame_matchmode_captain" + visible MENU_FALSE // Visible on open + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 232 120 344 264 + anglevectors 3 -87 + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open "ingame_matchmode" } + onOpen { + play "sound/ui/whoosh3.wav" ; + uiScript readMMcaptainSettings ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide "hints" ; + ACTIVATE_TAB(1) ; + } + onESC { close _self } + + onOpenSpecial { + //normal items + setItemColor "fade_alpha" forecolor 5 5 5 0 ; + timeFade "fade_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + itemDef { + name "paper,fade_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor .95 .94 .87 1 + rect -8 -16 380 320 + anglevectors 3 -87 + visible 1 + menuAnchor + decoration + } + + itemDef { + renderpoint + name "title,fade_alpha" + text "Match Mode:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 32 32 240 36 + visible 1 + autowrapped + decoration + } + + //Line + + itemDef { + name "line,fade_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 LINE_WIDTH 2 + visible 1 + decoration + } + + /////////////////////////////////////////////////////////// + // + // Sub-options + // + // + + // Status + + ADD_TAB( + "^_S^_tatus.", + "S", 1, "group2,group3", + alignrect "title" ITEM_ALIGN_LEFT 2 28 40 TAB_HEIGHT + ) + ADD_HINT("hint_tab1", "Become a captain and lead your team", "group2,group3") + +//--------------------------------------------------------- + + // Settings + + ADD_TAB( + "S^_e^_ttings.", + "E", 2, "group1,group3", + alignrect "tab1" ITEM_ALIGN_RIGHT -49 0 48 TAB_HEIGHT + ) + ADD_HINT("hint_tab2", "Change match settings", "group1,group3") + + +//--------------------------------------------------------- + + // Referee + + ADD_TAB( + "^_R^_eferee.", + "R", 3, "group1,group2", + alignrect "tab2" ITEM_ALIGN_RIGHT -45 0 44 TAB_HEIGHT + ) + ADD_HINT("hint_tab3", "Nominate a player to be the match referee", "group1,group2") + +/* +========================================================== + +Group # 1 - Status + +========================================================== +*/ + + itemDef { + name "allgroups,group1,gr1_ctrl1,fade_alpha" + subgroup "fade_fore_alpha" + text "> Become a ^_C^_aptain" + shortcutKey "C" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "line" ITEM_ALIGN_LEFT 72 42 160 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "captain" } + ASSIGN_HINT("hint_captain") + } + + itemDef { + name "ready" + group "fade_fore_alpha,group1,allgroups" + text "> Ready/Unready ^_T^_eam" + shortcutKey "T" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr1_ctrl1" ITEM_ALIGN_LEFT 0 24 160 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ready" } + ASSIGN_HINT("hint_ready") + } + + ADD_HINT("hint_captain", "Become a captain, or click again to resign", "group1") + ADD_HINT("hint_ready", "Ready to start the match, or click again to pause the match in-progress", "group1") + + +/* +========================================================== + +Group # 2 - Settings + +========================================================== +*/ + + itemDef { + name "team_caption" + group "fade_fore_alpha,group2,allgroups" + style 0 + text "Team Name:" + alignrect "line" ITEM_ALIGN_LEFT 8 24 208 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemDef { + name "team_dots" + group "fade_fore_alpha,group2,allgroups" + style 0 + text "........................................................" + alignrect "team_caption" ITEM_ALIGN_LEFT 80 0 168 20 + textscale .225 + textalign ITEM_ALIGN_LEFT + textaligny 20 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemDef { + name "allgroups,group2,gr2_ctrl1,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + alignrect "team_caption" ITEM_ALIGN_RIGHT -32 0 168 20 + type ITEM_TYPE_EDITFIELD + style 0 + text "" + cvar "ui_RQ3_teamName" + backcolor 0 0 0 .1 + forecolor 0 0 0 1 + textstyle 0 + maxChars 32 + maxPaintChars 18 + textscale .225 + textalign 0 + textalignx 8 + textaligny 16 + visible 1 + ASSIGN_HINT("hint_teamname") + } + + itemdef { + name "allgroups,group2,gr2_ctrl2,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + alignrect "team_caption" ITEM_ALIGN_LEFT 0 28 288 60 + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_EMPTY + elementwidth 40 + elementheight 40 + elementtype LISTBOX_IMAGE + feeder FEEDER_MMHEADS + horizontalscroll + backcolor 0 0 0 1 + forecolor 1 1 1 1 + bordercolor 1 0 0 1 + bordersize 2 + visible 1 + ASSIGN_HINT("hint_teammodel") + } + + itemDef { + name "model_dots" + group "fade_fore_alpha,group2,allgroups" + style 0 + text "...................................................." + alignrect "gr2_ctrl2" ITEM_ALIGN_LEFT 48 68 168 20 + textscale .225 + textalign ITEM_ALIGN_LEFT + textaligny 20 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemDef { + name "allgroups,group2,gr2_ctrl3,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + text "Model:" + cvar "ui_RQ3_teamModel" + textscale .225 + alignrect "gr2_ctrl2" ITEM_ALIGN_LEFT 0 68 80 20 + type ITEM_TYPE_EDITFIELD + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 14 + forecolor 0 0 0 1 + visible 0 + decoration + } + + itemDef { + name "allgroups,group2,gr2_ctrl4,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + text "> ^_A^_pply" + shortcutKey "A" + textscale .225 + alignrect "gr2_ctrl3" ITEM_ALIGN_LEFT 232 0 56 20 + type 1 + textalign ITEM_ALIGN_LEFT + textalignx 8 + textaligny 14 + forecolor 0 0 0 1 + visible 1 + action { play "sound/misc/menu1.wav" ; uiScript "captainSetTeamModel" } + ASSIGN_HINT("hint_apply") + } + + itemDef { + name "allgroups,group2,gr2_ctrl5,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_M^_atch Settings..." + shortcutKey "M" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr2_ctrl4" ITEM_ALIGN_LEFT -56 28 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; open "ingame_matchmode_settings" } + ASSIGN_HINT("hint_settings") + } + + ADD_HINT("hint_settings", "Change match rules", "group2") + ADD_HINT("hint_teamname", "Type in the name of your team", "group2") + ADD_HINT("hint_teammodel", "Change the appearance of your team", "group2") + itemDef { + text "Select" + name "hint_apply,allgroups,group2,hints,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + cvar "ui_RQ3_teamModel" + type ITEM_TYPE_EDITFIELD + autowrapped + forecolor HINT_COLOR 1 + textalign ITEM_ALIGN_LEFT + textalignx 6 + textaligny 10 + textscale .2 + alignrect "line" ITEM_ALIGN_LEFT 0 8 288 40 + style WINDOW_STYLE_EMPTY + visible 0 + decoration + } + +/* +========================================================== + +Group # 3 - Referee + +========================================================== +*/ + itemDef { + name "allgroups,group3,gr3_ctrl1,fade_alpha" + subgroup "fade_fore_alpha" + LISTBOX_STYLE(.225, 8) + alignrect "line" ITEM_ALIGN_LEFT 4 32 188 124 + feeder FEEDER_PLAYER_LIST + visible 1 + ASSIGN_HINT("hint_nominate") + } + + itemDef { + name "btn_kick,allgroups,group3" + subgroup "fade_fore_alpha" + alignrect "paper" ITEM_ALIGN_LEFT 240 224 36 14 + text "> ^_O^_K <" + shortcutKey "O" + style WINDOW_STYLE_EMPTY + forecolor .5 0 0 1 + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { play "sound/ui/whoosh3.wav" ; uiScript captainRef } + ASSIGN_HINT("hint_referee") + } + + ADD_HINT("hint_nominate", "Nominate a player to be the match referee", "group3") + itemDef { + text "Nominate" + name "hint_referee,allgroups,group3,hints,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + ownerdraw UI_SELECTEDPLAYER + autowrapped + forecolor HINT_COLOR 1 + textalign ITEM_ALIGN_LEFT + textalignx 6 + textaligny 10 + textscale .2 + alignrect "line" ITEM_ALIGN_LEFT 0 8 288 40 + style WINDOW_STYLE_EMPTY + visible 0 + decoration + } + } +} + +#if 0 +#include "ui/menudef.h" #define SECCOLOR1 1 1 1 0 #define SECCOLOR2 1 1 1 .2 @@ -376,3 +780,4 @@ } } +#endif \ No newline at end of file diff --git a/reaction/uifiles/ingame_matchmode_referee.menu b/reaction/uifiles/ingame_matchmode_referee.menu index aed5d272..80e84513 100644 --- a/reaction/uifiles/ingame_matchmode_referee.menu +++ b/reaction/uifiles/ingame_matchmode_referee.menu @@ -1,4 +1,524 @@ #include "ui/menudef.h" +#include "ui/tabs.h" + +//////////////////////////////////// +// +// CONSTANTS +// +// + + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define TAB_HEIGHT 20 +#define LINE_WIDTH 300 + + +//////////////////////////////////// +// +// MENU DEFINITION +// +// + +{ + menuDef { + name "ingame_matchmode_referee" + visible MENU_FALSE // Visible on open + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 232 100 344 264 + anglevectors -3 -93 + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open "ingame_matchmode" } + onOpen { + play "sound/ui/whoosh3.wav" ; + uiScript loadVoteArenas ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide "hints" ; + ACTIVATE_TAB(1) ; + } + onESC { close _self } + + onOpenSpecial { + //normal items + setItemColor "fade_alpha" forecolor 5 5 5 0 ; + timeFade "fade_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + itemDef { + name "paper,fade_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor .95 .94 .87 1 + rect -8 -16 380 320 + anglevectors -3 -93 + visible 1 + menuAnchor + decoration + } + + itemDef { + renderpoint + name "title,fade_alpha" + text "Match Mode:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 32 32 240 36 + visible 1 + autowrapped + decoration + } + + //Line + + itemDef { + name "line,fade_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 LINE_WIDTH 2 + visible 1 + decoration + } + + /////////////////////////////////////////////////////////// + // + // Sub-options + // + // + + // Login + + ADD_TAB( + "^_L^_ogin.", + "L", 1, "group2,group3,group4", + alignrect "title" ITEM_ALIGN_LEFT 2 28 32 TAB_HEIGHT + ) + ADD_HINT("hint_tab1", "Log into the server and attain referee status", "group2,group3,group4") + +//--------------------------------------------------------- + + // Map + + ADD_TAB( + "^_M^_ap.", + "M", 2, "group1,group3,group4", + alignrect "tab1" ITEM_ALIGN_RIGHT -28 0 27 TAB_HEIGHT + ) + ADD_HINT("hint_tab2", "Map selection", "group1,group3,group4") + + +//--------------------------------------------------------- + + // Kick + + ADD_TAB( + "^_K^_ick.", + "K", 3, "group1,group2,group4", + alignrect "tab2" ITEM_ALIGN_RIGHT -28 0 27 TAB_HEIGHT + ) + ADD_HINT("hint_tab3", "Kick a player off the server", "group1,group2,group4") + + +//--------------------------------------------------------- + + // Match + + ADD_TAB( + "Mat^_c^_h.", + "C", 4, "group1,group2,group3", + alignrect "tab3" ITEM_ALIGN_RIGHT -44 0 43 TAB_HEIGHT + ) + ADD_HINT("hint_tab4", "Edit match settings", "group1,group2,group3") + + +/* +========================================================== + +Group # 1 - Login + +========================================================== +*/ + + itemDef { + name "pass_caption" + group "fade_fore_alpha,group1,allgroups" + style 0 + text "Password:" + alignrect "line" ITEM_ALIGN_LEFT 8 56 208 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemDef { + name "team_dots" + group "fade_fore_alpha,group1,allgroups" + style 0 + text "........................................................" + alignrect "pass_caption" ITEM_ALIGN_LEFT 80 0 168 20 + textscale .225 + textalign ITEM_ALIGN_LEFT + textaligny 20 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemDef { + name "allgroups,group1,gr1_ctrl1,fade_alpha" + group "fade_fore_alpha,group1,allgroups" + alignrect "pass_caption" ITEM_ALIGN_RIGHT -32 0 168 20 + type ITEM_TYPE_EDITFIELD + style 0 + text "" + cvar "ui_RQ3_refPassword" + backcolor 0 0 0 .1 + forecolor 0 0 0 1 + textstyle 0 + maxPaintChars 20 + textscale .225 + textalign 0 + textalignx 8 + textaligny 16 + visible 1 + ASSIGN_HINT("hint_pass") + } + + itemDef { + name "allgroups,group1,gr1_ctrl2,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_L^_ogin <" + shortcutKey "L" + type ITEM_TYPE_BUTTON + //textscale UI_INGAME_TEXTSIZE + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "pass_caption" ITEM_ALIGN_LEFT 236 20 50 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; uiScript refLogin } + ASSIGN_HINT("hint_pass") + } + + itemDef { + name "allgroups,group1,gr1_ctrl3,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_R^_esign <" + shortcutKey "R" + type ITEM_TYPE_BUTTON + //textscale UI_INGAME_TEXTSIZE + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr1_ctrl2" ITEM_ALIGN_LEFT -7 20 56 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor .5 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "refresign" ; uiScript closeingame } + ASSIGN_HINT("hint_resign") + } + + ADD_HINT("hint_pass", "Allows a referee to log into the server and attain referee status without needing to be voted in", "group1") + ADD_HINT("hint_resign", "Cease being a referee and become a regular player", "group1") + + +/* +========================================================== + +Group # 2 - Map + +========================================================== +*/ + + itemDef { + text "Select" + name "hint_map,allgroups,group2,hints,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + ownerdraw UI_ALLMAPS_SELECTION + autowrapped + forecolor HINT_COLOR 1 + textalign ITEM_ALIGN_LEFT + textalignx 6 + textaligny 10 + textscale .2 + alignrect "line" ITEM_ALIGN_LEFT 0 8 288 40 + style WINDOW_STYLE_EMPTY + visible 0 + decoration + } + + // Map list // + + itemDef { + name "maplist" + subgroup "fade_fore_alpha,group2,allgroups" + LISTBOX_STYLE(.225, 8) + alignrect "line" ITEM_ALIGN_LEFT 4 32 188 124 + feeder FEEDER_ALLMAPS + visible 1 + columns 1 2 140 25 + ASSIGN_HINT("hint_tab2") + } + + itemDef { + name "allgroups,group2,gr2_ctrl3,fade_alpha" + group "fade_fore_alpha,group2,allgroups" + alignrect "paper" ITEM_ALIGN_LEFT 240 112 68 14 + text "> ^_N^_ext map <" + shortcutKey "N" + style WINDOW_STYLE_EMPTY + forecolor OPTION_COLOR + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { play "sound/ui/whoosh3.wav" ; exec "ref cyclemap" ; uiScript closeingame } + ASSIGN_HINT("hint_ref-next") + } + + itemDef { + name "vote_restart" + subgroup "fade_fore_alpha,group2,allgroups" + alignrect "paper" ITEM_ALIGN_LEFT 240 128 84 14 + text "> ^_R^_estart map <" + shortcutKey "R" + style WINDOW_STYLE_EMPTY + forecolor OPTION_COLOR + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { play "sound/ui/whoosh3.wav" ; exec "ref map_restart" ; uiScript closeingame } + ASSIGN_HINT("hint_ref-restart") + } + + itemDef { + name "vote_map" + subgroup "fade_fore_alpha,group2,allgroups" + alignrect "paper" ITEM_ALIGN_LEFT 240 224 36 14 + text "> ^_O^_K <" + shortcutKey "O" + style WINDOW_STYLE_EMPTY + forecolor .5 0 0 1 + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { play "sound/ui/whoosh3.wav" ; uiScript refMap ; uiScript closeingame } + ASSIGN_HINT("hint_map") + } + + ADD_HINT("hint_ref-next", "Change to the next map in rotation", "group2") + ADD_HINT("hint_ref-restart", "Restart the current map", "group2") + +/* +========================================================== + +Group # 3 - Kick + +========================================================== +*/ + + itemDef { + name "allgroups,group3,gr3_ctrl1,fade_alpha" + subgroup "fade_fore_alpha" + LISTBOX_STYLE(.225, 8) + alignrect "line" ITEM_ALIGN_LEFT 4 32 188 124 + feeder FEEDER_PLAYER_LIST + visible 1 + ASSIGN_HINT("hint_tab3") + } + + itemDef { + name "btn_kick,allgroups,group3" + subgroup "fade_fore_alpha" + alignrect "paper" ITEM_ALIGN_LEFT 240 224 36 14 + text "> ^_O^_K <" + shortcutKey "O" + style WINDOW_STYLE_EMPTY + forecolor .5 0 0 1 + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { play "sound/ui/whoosh3.wav" ; uiScript refKick ; uiScript closeingame } + ASSIGN_HINT("hint_ref-kick") + } + + itemDef { + text "Click OK to get rid of" + name "hint_ref-kick,allgroups,group3,hints,fade_alpha" + group "fade_fore_alpha,group3,allgroups" + ownerdraw UI_SELECTEDPLAYER + autowrapped + forecolor HINT_COLOR 1 + textalign ITEM_ALIGN_LEFT + textalignx 6 + textaligny 10 + textscale .2 + alignrect "line" ITEM_ALIGN_LEFT 0 8 288 40 + style WINDOW_STYLE_EMPTY + visible 0 + decoration + } + +/* +========================================================== + +Group # 4 - Match + +========================================================== +*/ + + itemDef { + name "allgroups,group4,gr4_ctrl1,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_P^_ause / Resume" + shortcutKey "P" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "line" ITEM_ALIGN_LEFT 32 32 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ref pause" } + ASSIGN_HINT("hint_ref-pause") + } + + itemDef { + name "allgroups,group4,gr4_ctrl2,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_C^_lear Scores" + shortcutKey "C" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr4_ctrl1" ITEM_ALIGN_LEFT 144 0 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ref clearscores" } + ASSIGN_HINT("hint_ref-clear") + } + + itemDef { + name "allgroups,group4,gr4_ctrl3,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_L^_ock Settings" + shortcutKey "L" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr4_ctrl1" ITEM_ALIGN_LEFT 0 28 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ref locksettings" } + ASSIGN_HINT("hint_ref-lock") + } + + itemDef { + name "allgroups,group4,gr4_ctrl4,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_R^_eset Match" + shortcutKey "R" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr4_ctrl2" ITEM_ALIGN_LEFT 0 28 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor .5 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ref resetmatch" } + ASSIGN_HINT("hint_ref-reset") + } + + itemDef { + name "allgroups,group4,gr4_ctrl5,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_H^_ear All" + shortcutKey "H" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr4_ctrl3" ITEM_ALIGN_LEFT 0 28 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; exec "ref hearall" } + ASSIGN_HINT("hint_ref-hear") + } + + itemDef { + name "allgroups,group4,gr4_ctrl6,fade_alpha" + subgroup "fade_fore_alpha" + text "> ^_M^_atch Settings..." + shortcutKey "M" + type ITEM_TYPE_BUTTON + textscale .225 + style WINDOW_STYLE_EMPTY + alignrect "gr4_ctrl4" ITEM_ALIGN_LEFT 0 76 104 20 + textalign ITEM_ALIGN_LEFT + textalignx 0 + textaligny 16 + forecolor 0 0 0 1 + visible 1 + action { play "sound/ui/whoosh3.wav" ; open "ingame_matchmode_settings" } + ASSIGN_HINT("hint_settings") + } + + ADD_HINT("hint_ref-pause", "Pause match", "group4") + ADD_HINT("hint_ref-clear", "Clear scores", "group4") + ADD_HINT("hint_ref-lock", "Lock settings", "group4") + ADD_HINT("hint_ref-reset", "Reset match", "group4") + ADD_HINT("hint_ref-hear", "Hear all", "group4") + ADD_HINT("hint_settings", "Change match rules", "group4") + } +} + +#if 0 +#include "ui/menudef.h" #define SECCOLOR1 1 1 1 0 #define SECCOLOR2 1 1 1 .2 @@ -521,3 +1041,4 @@ } } +#endif \ No newline at end of file diff --git a/reaction/uifiles/ingame_matchmode_settings.menu b/reaction/uifiles/ingame_matchmode_settings.menu index 5aeffb4a..0198c91b 100644 --- a/reaction/uifiles/ingame_matchmode_settings.menu +++ b/reaction/uifiles/ingame_matchmode_settings.menu @@ -1,246 +1,162 @@ #include "ui/menudef.h" +#define ANGLES 5 -85 +#define LINE_ALPHA 0.2 +#define VSPACE 16 +#define VSIZE 16 + +#define MM_OPTION(ITEM_NAME, ITEM_TEXT, ITEM_CVAR, ITEM_TYPE)\ + itemdef { \ + name ITEM_NAME \ + type ITEM_TYPE \ + text ITEM_TEXT":" \ + cvar ITEM_CVAR + +#define ALIGN_MM(TARGET, X_POS, Y_POS) \ + alignrect TARGET ITEM_ALIGN_LEFT X_POS Y_POS 112 VSIZE + +#define END_MM\ + textalign ITEM_ALIGN_RIGHT \ + textalignx 0 \ + textaligny 14 \ + textscale .225 \ + forecolor 0 0 0 1 \ + visible 1 \ + } { - - menuDef { - name "ingame_matchmode_settings" - visible 0 - fullscreen 0 - //outOfBoundsClick // this closes the window if it gets a click out of the rectangle - onOOBClick { close _self ; open ingame_matchmode } - rect 296 64 216 264 - disableColor .5 .5 .5 1 - focusColor 1 .75 0 1 // Menu focus color for text and items - style 1 - shadowStyle 1 - onOpen { play "sound/misc/menu1.wav" ; uiScript "readMMsettings" } - -//Window - - itemdef { - rect 0 0 216 264 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - rect 97 1 120 24 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" - visible 1 - decoration - } - - itemdef { - rect 97 1 120 24 - style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "MM settings" - visible 1 - decoration - } - -//Objects - - // SETTINGS // - - // Time limit - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Time Limit:" - cvar "ui_RQ3_timelimit" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 48 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Round limit - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Round Limit:" - cvar "ui_RQ3_roundlimit" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 68 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Round time limit - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Round Time Limit:" - cvar "ui_RQ3_roundtimelimit" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 88 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Frag limit - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Frag Limit:" - cvar "ui_RQ3_fraglimit" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 108 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Max players - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Max Players:" - cvar "ui_RQ3_maxplayers" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 128 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Force team talk - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_MULTI - text "Force Team Talk:" - cvar "ui_RQ3_forceteamtalk" - cvarFloatList { "Off" 0 "Match only" 1 "Always" 2 } - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 148 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Limit chase cam - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_MULTI - text "Limit Chase Cam:" - cvar "ui_RQ3_limchasecam" - cvarFloatList { "No" 0 "Team only" 1 "Eyes only" 2 } - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 168 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Tgren - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_NUMERICFIELD - text "Bandolier Grenades:" - cvar "ui_RQ3_tgren" - maxchars 4 - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 188 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // Friendly fire - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_MULTI - text "Friendly Fire:" - cvar "ui_RQ3_friendlyFire" - cvarFloatList { "On" 1 "Knockback" 2 "Off" 0 } - textstyle ITEM_TEXTSTYLE_SHADOWED - rect 20 208 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 112 - textaligny 14 - textscale .225 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - - // OK // - - itemdef { - name ok - rect 136 232 64 20 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_CENTER - textalignx 32 - textaligny 14 - text "Ok" - shortcutKey "O" - border 1 - bordersize 1 - backcolor Ig_Sub_Color1 - forecolor Ig_Sub_TextColor - bordercolor Ig_Sub_BorderColor1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript "sendMMsettings" ; uiScript closeingame } - //action { exec "screenshotJPEG" } - onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 } - leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 } - } + menuDef { + renderpoint + name "ingame_matchmode_settings" + visible MENU_FALSE // Visible on open + fullscreen 0 + rect 192 64 288 264 + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + anglevectors ANGLES + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open _prev } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript "readMMsettings" } + onESC { close _self ; open _prev } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + itemDef { + renderpoint + name "paper" + menuAnchor + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor 0.969 0.961 0.922 1 + rect -8 -16 320 320 + anglevectors ANGLES + visible 1 + decoration + } + + //Title + + itemdef { + renderpoint + name "title,fade_alpha" + text "Match Settings:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 32 32 240 36 + visible 1 + autowrapped + decoration + } + + MM_OPTION("time", "Time Limit", "ui_RQ3_timelimit", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("paper", 160, 80) + maxChars 4 + END_MM + + MM_OPTION("rounds", "Round Limit", "ui_RQ3_roundlimit", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("time", 0, VSPACE) + maxChars 4 + END_MM + + MM_OPTION("roundtime", "Round Time Limit", "ui_RQ3_roundtimelimit", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("rounds", 0, VSPACE) + maxChars 4 + END_MM + + MM_OPTION("frags", "Frag Limit", "ui_RQ3_fraglimit", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("roundtime", 0, VSPACE) + maxChars 4 + END_MM + + MM_OPTION("players", "Maximum Players", "ui_RQ3_maxplayers", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("frags", 0, VSPACE) + maxChars 4 + END_MM + + MM_OPTION("teamtalk", "Force Team Talk", "ui_RQ3_forceteamtalk", ITEM_TYPE_MULTI) + ALIGN_MM("players", 0, VSPACE) + cvarFloatList { + "Off" 0 + "Match only" 1 + "Always" 2 + } + END_MM + + MM_OPTION("camera", "Limit Chase Camera", "ui_RQ3_limchasecam", ITEM_TYPE_MULTI) + ALIGN_MM("teamtalk", 0, VSPACE) + cvarFloatList { + "No" 0 + "Team only" 1 + "Eyes only" 2 + } + END_MM + + MM_OPTION("grenades", "Bandolier Grenades", "ui_RQ3_tgren", ITEM_TYPE_NUMERICFIELD) + ALIGN_MM("camera", 0, VSPACE) + maxChars 4 + END_MM + + MM_OPTION("friendly", "Friendly Fire", "ui_RQ3_friendlyFire", ITEM_TYPE_MULTI) + ALIGN_MM("grenades", 0, VSPACE) + cvarFloatList { + "Off" 0 + "Off/knockback" 2 + "On" 1 + } + END_MM + + itemDef { + name "submit" + alignrect "paper" ITEM_ALIGN_LEFT 224 224 36 14 + text "> ^_O^_K <" + shortcutKey "O" + style WINDOW_STYLE_EMPTY + forecolor .5 0 0 1 + textalignx 0 + textaligny 12 + textscale .225 + visible 1 + type ITEM_TYPE_BUTTON + action { + play "sound/ui/whoosh3.wav" ; + uiScript "sendMMsettings" ; + close _self ; + open _prev + } + } + } } -} \ No newline at end of file