From 1e0b515a6031a2cd2a77e9c34f2e4292fc9f9750 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 30 Oct 2007 18:18:47 +0000 Subject: * (bug 3384) Remove server side armoury refresh and replace with UI side refresh * Add trap_Key_SetOverstrikeMode and trap_Key_GetOverstrikeMode to cgame * Change Text_[Width|Height] to return floats * Add Text_Em[Width|Height] * Add CG_AlignText to cut down on code duplication * Add itemDef_t::textvalignment for vertical text alignment * Add UI_DrawTextBlock to replace a lot of duplicate code * Rewrite text wrapping code from scratch so that it actually works * Add UI_OwnerDrawText * Add expression evaluator to .menu parser * Split off Border_Paint from Window_Paint * Scale slider items to fit their rect * Rework edit field widgets to behave somewhat more correctly * Fix a few listbox widget layout issues * Don't display scrollbars in "notselectable" listbox widgets * Make scoreboard team labels ownerdrawn * Menu script rework + Use the expression evaluator to replace lots and lots of absolute coords with relative ones, hopefully easing future maintenance + Remove lots and lots of textalign[xy] that were present to work around broken text alignment routines + Replace a bunch of numeric constants with ones from menudef.h + Compose the huds from tremulous_common_hud.h + Generally neaten things up + Lots of whitespace fixes --- ui/assets/alien/buildstat.cfg | 6 +- ui/assets/human/buildstat.cfg | 6 +- ui/createfavorite.menu | 134 ++-- ui/createserver.menu | 353 +++++---- ui/drop.menu | 97 ++- ui/error.menu | 88 ++- ui/findplayer.menu | 229 ++---- ui/hud.txt | 4 +- ui/ingame.menu | 65 +- ui/ingame.txt | 4 +- ui/ingame_game.menu | 707 +++++++++--------- ui/ingame_leave.menu | 267 ++----- ui/ingame_options.menu | 1392 +++++++++++++++++------------------ ui/joinserver.menu | 635 ++++++++-------- ui/loading.menu | 139 ++-- ui/main.menu | 85 +-- ui/menudef.h | 44 +- ui/menus.txt | 4 +- ui/mod.menu | 62 +- ui/options.menu | 164 +++-- ui/password.menu | 85 +-- ui/ptrc.menu | 91 ++- ui/quit.menu | 66 +- ui/quitcredit.menu | 108 +-- ui/serverinfo.menu | 121 ++- ui/teamscore.menu | 367 +++++---- ui/tremulous.txt | 12 +- ui/tremulous_alien_builder_hud.menu | 349 +-------- ui/tremulous_alien_common_hud.h | 186 +++++ ui/tremulous_alien_general_hud.menu | 347 +-------- ui/tremulous_alienbuild.menu | 83 ++- ui/tremulous_alienclass.menu | 94 ++- ui/tremulous_aliendialogs.menu | 59 +- ui/tremulous_alienupgrade.menu | 81 +- ui/tremulous_common_hud.h | 158 ++++ ui/tremulous_default_hud.menu | 163 +--- ui/tremulous_human_hud.menu | 313 ++------ ui/tremulous_humanarmoury.menu | 124 ++-- ui/tremulous_humanbuild.menu | 81 +- ui/tremulous_humandialogs.menu | 60 +- ui/tremulous_humanitem.menu | 94 ++- ui/tremulous_teamselect.menu | 81 +- 42 files changed, 3421 insertions(+), 4187 deletions(-) create mode 100644 ui/tremulous_alien_common_hud.h create mode 100644 ui/tremulous_common_hud.h (limited to 'ui') diff --git a/ui/assets/alien/buildstat.cfg b/ui/assets/alien/buildstat.cfg index 11143022..318d401d 100644 --- a/ui/assets/alien/buildstat.cfg +++ b/ui/assets/alien/buildstat.cfg @@ -8,7 +8,7 @@ frameShader "ui/assets/alien/buildstat/frame" frameWidth 150 frameHeight 30 -healthPadding 2 +healthPadding 2 healthSevereColor 0.24 0.02 0.02 1 healthHighColor 0.32 0.04 0.04 1 healthElevatedColor 0.40 0.06 0.06 1 @@ -20,12 +20,12 @@ overlayShader "ui/assets/alien/buildstat/overlay" overlayWidth 156 overlayHeight 36 -// PERCENT of frameHeight to use for top/bottom margin of icons/text +// PERCENT of frameHeight to use for top/bottom margin of icons/text // value is for total of top and bottom margins // valid values between 0.0 and 1.0 verticalMargin 0.5 -// number of CHARS worth of space that should be used for left/right margins +// number of CHARS worth of space that should be used for left/right margins // value is for one side only // char width is determined by frameHeight and verticalMargin horizontalMargin 1.0 diff --git a/ui/assets/human/buildstat.cfg b/ui/assets/human/buildstat.cfg index 9c192de9..c66b618d 100644 --- a/ui/assets/human/buildstat.cfg +++ b/ui/assets/human/buildstat.cfg @@ -8,7 +8,7 @@ frameShader "ui/assets/human/buildstat/frame" frameWidth 150 frameHeight 30 -healthPadding 2 +healthPadding 2 // Homeworld Security Advisory System healthSevereColor 0.83 0.03 0.02 1 @@ -22,12 +22,12 @@ overlayShader "" overlayWidth 160 overlayHeight 40 -// PERCENT of frameHeight to use for top/bottom margin of icons/text +// PERCENT of frameHeight to use for top/bottom margin of icons/text // value is for total of top and bottom margins // valid values between 0.0 and 1.0 verticalMargin 0.5 -// number of CHARS worth of space that should be used for left/right margins +// number of CHARS worth of space that should be used for left/right margins // value is for one side only // char width is determined by frameHeight and verticalMargin horizontalMargin 1.0 diff --git a/ui/createfavorite.menu b/ui/createfavorite.menu index 2457ec77..cc3c2c8f 100644 --- a/ui/createfavorite.menu +++ b/ui/createfavorite.menu @@ -1,31 +1,37 @@ #include "ui/menudef.h" { -\\ CREATE FAVORITE POPUP MENU \\ + \\ CREATE FAVORITE POPUP MENU \\ + +#define BUTT_W 45 +#define BUTT_H 35 +#define BORDER 10 +#define INPUT_H 20 +#define W 250 +#define H ((3*BORDER)+(2*INPUT_H)+BUTT_H) menuDef { name "createfavorite_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onESC { - close createfavorite_popmenu; - open joinserver + close createfavorite_popmenu } itemDef { name window - rect 47 47 144 144 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -33,96 +39,76 @@ borderColor 0.5 0.5 0.5 1 } - // ENTER NAME AND ADDRESS // - - itemDef - { - name name - text "Name" - style 0 - decoration - textscale .3 - rect 0 61 110 20 - textalign 1 - textalignx 117 - textaligny 16 - forecolor 1 1 1 1 - visible 1 - } - + // ENTER NAME AND ADDRESS // + itemDef { name nameEntry - style 1 - maxchars 15 - text "" - textscale .25 - TYPE 4 + style WINDOW_STYLE_EMPTY + maxchars 40 + text "Name:" + textscale .4 + type ITEM_TYPE_EDITFIELD cvar "ui_favoriteName" - rect 60 81 120 20 - textalign 0 - textalignx 10 - textaligny 16 + rect BORDER BORDER (W-(2*BORDER)) INPUT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .2 .2 .2 .5 - visible 1 + visible MENU_TRUE } itemDef { - name address - text "IP Address" - style 0 - decoration - textscale .3 - rect 0 111 110 20 - textalign 1 - textalignx 117 - textaligny 16 + name addressEntry + style WINDOW_STYLE_EMPTY + maxchars 40 + text "Address:" + textscale .4 + type ITEM_TYPE_EDITFIELD + cvar "ui_favoriteAddress" + rect BORDER ((2*BORDER)+INPUT_H) (W-(2*BORDER)) INPUT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } - + itemDef { - name addressEntry - style 1 - maxchars 20 - maxPaintChars 12 - text "" + name yes + text "OK" + type ITEM_TYPE_BUTTON textscale .25 - TYPE 4 - maxchars 21 - cvar "ui_favoriteAddress" - rect 60 131 120 20 - textalign 0 - textalignx 10 - textaligny 16 + style WINDOW_STYLE_EMPTY + rect (W-(2*BUTT_W)) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .2 .2 .2 .5 - visible 1 + visible MENU_TRUE + action + { + play "sound/misc/menu1.wav"; + uiScript CreateFavorite; + close createfavorite_popmenu + } } itemDef { name yes - text "Ok" - type 1 + text "Cancel" + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 103 158 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; - uiScript CreateFavorite; - close createfavorite_popmenu; - open joinserver + close createfavorite_popmenu } } } diff --git a/ui/createserver.menu b/ui/createserver.menu index f13bafc0..4c13f13e 100644 --- a/ui/createserver.menu +++ b/ui/createserver.menu @@ -3,16 +3,45 @@ { \\ Server Creation \\ +#define W 640 +#define H 480 +#define BORDER 10 + +#define PREVIEW_W 300 +#define PREVIEW_H 225 +#define PREVIEW_X BORDER +#define PREVIEW_Y BORDER + +#define BC_W (W-(2*BORDER)) +#define BC_H 50 +#define BC_X BORDER +#define BC_Y (H-(BC_H+BORDER)) +#define ARROW_W 50 +#define ARROW_H BC_H + +#define MAPS_W PREVIEW_W +#define MAPS_H (H-((4*BORDER)+PREVIEW_H+BC_H)) +#define MAPS_X BORDER +#define MAPS_Y ((2*BORDER)+PREVIEW_H) + +#define OPTIONS_W (W-((3*BORDER)+PREVIEW_W)) +#define OPTIONS_H (H-((3*BORDER)+BC_H)) +#define OPTIONS_X ((2*BORDER)+PREVIEW_W) +#define OPTIONS_Y BORDER +#define ELEM_OFF_Y 20 +#define ELEM_OFF_X -135 +#define ELEM_H 21 + menuDef { name "createserver" - visible 0 - fullscreen 1 - rect 0 0 640 480 + visible MENU_FALSE + fullscreen MENU_TRUE + rect 0 0 W H focusColor 1 .75 0 1 - outOfBoundsClick - style 0 - + outOfBoundsClick + style WINDOW_STYLE_EMPTY + onOpen { uiScript loadArenas; @@ -21,45 +50,19 @@ hide back_alt; show back } - + onEsc { close createserver } - + itemDef { name background - rect 0 0 640 480 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 - decoration - } - - itemDef - { - name window - rect 2 2 330 418 - style WINDOW_STYLE_FILLED - border 1 - bordercolor 1 1 1 .25 - forecolor 1 1 1 1 - backcolor 0 0 0 .25 - visible 1 - decoration - } - - itemDef - { - name window - rect 334 2 302 418 - style WINDOW_STYLE_FILLED - border 1 - bordercolor 1 1 1 .25 - forecolor 1 1 1 1 - backcolor 0 0 0 .25 - visible 1 + visible MENU_TRUE decoration } @@ -68,28 +71,18 @@ itemDef { name mappreview - style 0 + style WINDOW_STYLE_EMPTY ownerdraw UI_STARTMAPCINEMATIC - rect 7 7 320 240 - border 1 - bordercolor .5 .5 .5 .5 - visible 1 - } - - itemDef - { - name mappreview - style WINDOW_STYLE_FILLED - rect 6 6 322 242 - border 1 - bordercolor .5 .5 .5 .5 - visible 1 + rect PREVIEW_X PREVIEW_Y PREVIEW_W PREVIEW_H + border WINDOW_BORDER_FULL + bordercolor .5 .5 .5 1 + visible MENU_TRUE } itemDef { name maplist - rect 6 252 322 164 + rect MAPS_X MAPS_Y MAPS_W MAPS_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -97,14 +90,12 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_ALLMAPS - textalign 3 - textaligny 14 - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 1 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE columns 1 2 190 ITEM_ALIGN_LEFT } @@ -112,74 +103,81 @@ // SETTINGS // - // NORMAL // + itemDef + { + name window + rect OPTIONS_X OPTIONS_Y OPTIONS_W OPTIONS_H + style WINDOW_STYLE_FILLED + backcolor 0 0 0 1 + visible MENU_TRUE + decoration + + border WINDOW_BORDER_FULL + borderSize 1.0 + borderColor 0.5 0.5 0.5 1 + } itemDef { name expert - group grpsettings type ITEM_TYPE_EDITFIELD text "Host Name:" cvar "sv_hostname" - maxChars 32 - maxPaintChars 20 - rect 420 30 128 20 + maxChars 40 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(0*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } - + itemDef { name normal - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Time Limit:" cvar "timelimit" - rect 420 50 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(1*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X maxchars 4 - textaligny 12 - textscale .36 + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Maximum Players:" cvar "sv_maxclients" - rect 420 70 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(2*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X maxchars 4 - textaligny 12 - textscale .36 + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_YESNO text "Require Password:" cvar "g_needpassword" - rect 420 90 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(3*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -189,19 +187,17 @@ itemDef { name expert - group grpsettings - type 4 + type ITEM_TYPE_EDITFIELD text "Password:" cvar "g_password" - rect 420 110 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(4*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H maxchars 10 - maxPaintChars 10 textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } @@ -209,17 +205,16 @@ itemDef { name normal - group grpsettings type ITEM_TYPE_YESNO text "Pure Server:" cvar "sv_pure" - rect 420 160 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(6*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -229,20 +224,19 @@ itemDef { name normal - group grpsettings type ITEM_TYPE_MULTI text "Dedicated:" // dedicated is a special cvar in that as soon as it is set, // the game goes to console only so the ui catches this one specifically cvar "ui_dedicated" cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 } - rect 420 180 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(7*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -252,17 +246,16 @@ itemDef { name expert - group grpsettings type ITEM_TYPE_YESNO text "Auto Download:" cvar "sv_allowdownload" - rect 420 200 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(8*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -272,17 +265,16 @@ itemDef { name expert - group grpsettings type ITEM_TYPE_YESNO text "Enable Voting:" cvar "g_allowvote" - rect 420 220 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(9*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -294,51 +286,48 @@ itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Minimum Ping:" cvar "sv_minping" - rect 420 270 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(11*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X maxchars 4 - textaligny 12 - textscale .36 + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Maximum Ping:" cvar "sv_maxping" - rect 420 290 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(12*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X maxchars 4 - textscale .36 + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_YESNO text "Synchronous Client:" cvar "g_synchronousclients" - rect 420 310 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(13*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -348,56 +337,50 @@ itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Max Rate:" cvar "sv_maxrate" - rect 420 330 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(14*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X maxchars 4 - textaligny 12 - textscale .36 + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Zombie Time:" cvar "sv_zombietime" - rect 420 350 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(15*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H maxchars 4 textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef { name expert - group grpsettings type ITEM_TYPE_NUMERICFIELD text "Reconnect Limit:" cvar "sv_reconnectlimit" maxchars 4 - rect 420 370 128 20 + rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(16*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 65 - textaligny 12 - textscale .36 + textvalign ITEM_VALIGN_CENTER + textalignx ELEM_OFF_X + textscale .36 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } - - - @@ -406,16 +389,16 @@ itemDef { name back - style 3 + style WINDOW_STYLE_SHADER background "ui/assets/backarrow.tga" - rect 16 424 50 50 - visible 1 + rect BC_X BC_Y ARROW_H ARROW_W + visible MENU_TRUE action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close createserver } - + mouseEnter { hide back; @@ -428,29 +411,29 @@ name back_alt style WINDOW_STYLE_SHADER background "ui/assets/backarrow_alt.tga" - rect 16 424 50 50 + rect BC_X BC_Y ARROW_H ARROW_W backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE type ITEM_TYPE_BUTTON - + text "Back" textalign ITEM_ALIGN_LEFT - textaligny 36 - textalignx 60 + textvalign ITEM_VALIGN_CENTER + textalignx ARROW_W textscale .6 - + mouseExit { hide back_alt; show back } - + action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close createserver - } + } } @@ -459,22 +442,21 @@ itemDef { name accept - style 3 - rect 574 424 50 50 + style WINDOW_STYLE_SHADER + rect ((BC_X+BC_W)-ARROW_W) BC_Y ARROW_H ARROW_W background "ui/assets/forwardarrow.tga" backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE mouseEnter { hide accept; show accept_alt } - + action { - play "sound/misc/menu1.wav"; - close fight; //TA: no i don't know + play "sound/misc/menu1.wav"; uiScript StartServer } } @@ -483,30 +465,29 @@ { name accept_alt style WINDOW_STYLE_SHADER - rect 574 424 50 50 + rect ((BC_X+BC_W)-ARROW_W) BC_Y ARROW_H ARROW_W background "ui/assets/forwardarrow_alt.tga" backcolor 0 0 0 0 type ITEM_TYPE_BUTTON forecolor 1 1 1 1 - visible 0 - type ITEM_TYPE_BUTTON - + visible MENU_FALSE + type ITEM_TYPE_BUTTON + text "Create" - textalign ITEM_ALIGN_LEFT - textaligny 36 - textalignx -70 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx -ARROW_W textscale .6 - + mouseExit { hide accept_alt; show accept } - + action { - play "sound/misc/menu1.wav"; - close fight; //TA: no i don't know + play "sound/misc/menu1.wav"; uiScript StartServer } } diff --git a/ui/drop.menu b/ui/drop.menu index 0db22649..2f0077f4 100644 --- a/ui/drop.menu +++ b/ui/drop.menu @@ -1,23 +1,33 @@ #include "ui/menudef.h" { - \\ ERROR \\ + +#define W 320 +#define H 320 +#define BORDER 10 + +#define BUTT_H 25 +#define BUTT_W 65 + +#define INFO_W (W-(2*BORDER)) +#define INFO_H (H-((4*BORDER)+(2*BUTT_H))) +#define INFO_X BORDER +#define INFO_Y ((2*BORDER)+BUTT_H) menuDef { name "drop_popmenu" - visible 0 - fullscreen 0 - rect 158 80 320 320 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onClose { uiScript clearError } - onOpen { } onESC { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close drop_popmenu; open main } @@ -26,10 +36,10 @@ itemDef { name window - rect 10 15 300 320 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -40,61 +50,49 @@ itemDef { name dropinfo - rect 0 50 320 20 - text "Disconnected:" - textalign 1 - textstyle 6 - textscale .333 - textalignx 160 - textaligny 23 + rect BORDER BORDER INFO_W BUTT_H + text "Disconnected" + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + textscale .4 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name dropinfo - rect 60 80 200 270 + rect INFO_X INFO_Y INFO_W INFO_H type ITEM_TYPE_TEXT - style 1 - textstyle 3 - autowrapped + style WINDOW_STYLE_FILLED + wrapped cvar "com_errorMessage" textalign ITEM_ALIGN_CENTER - textalignx 100 - textaligny 23 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textscale .33 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE decoration } - - - // BUTTON // - itemDef { name exit text "OK" - type 1 - textscale .25 - group grpControlbutton type ITEM_TYPE_BUTTON + textscale .4 style WINDOW_STYLE_EMPTY - rect 120 295 35 26 - textalign 1 - textalignx 22 - textaligny 20 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - close drop_popmenu; - open main + play "sound/misc/menu1.wav"; + close drop_popmenu } } @@ -102,22 +100,19 @@ { name reconnect text "Reconnect" - type 1 - textscale .25 - group grpControlbutton type ITEM_TYPE_BUTTON + textscale .4 style WINDOW_STYLE_EMPTY - rect 165 295 55 26 - textalign 1 - textalignx 22 - textaligny 20 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { close drop_popmenu; - exec "reconnect"; + exec "reconnect"; } } } diff --git a/ui/error.menu b/ui/error.menu index ac57084b..14e9d058 100644 --- a/ui/error.menu +++ b/ui/error.menu @@ -1,23 +1,33 @@ #include "ui/menudef.h" { - \\ ERROR \\ + +#define W 320 +#define H 320 +#define BORDER 10 + +#define BUTT_H 25 +#define BUTT_W 65 + +#define INFO_W (W-(2*BORDER)) +#define INFO_H (H-((4*BORDER)+(2*BUTT_H))) +#define INFO_X BORDER +#define INFO_Y ((2*BORDER)+BUTT_H) menuDef { name "error_popmenu" - visible 0 - fullscreen 0 - rect 158 80 320 320 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onClose { uiScript clearError } - onOpen { } onESC { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close error_popmenu; open main } @@ -26,10 +36,10 @@ itemDef { name window - rect 10 15 300 320 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -39,62 +49,50 @@ itemDef { - name errorinfo - rect 0 50 320 20 - text "Error:" - textalign 1 - textstyle 6 - textscale .333 - textalignx 160 - textaligny 23 + name dropinfo + rect BORDER BORDER INFO_W BUTT_H + text "Error" + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + textscale .4 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE decoration } - + itemDef { - name errorinfo - rect 60 80 200 270 + name dropinfo + rect INFO_X INFO_Y INFO_W INFO_H type ITEM_TYPE_TEXT - style 1 - textstyle 3 - autowrapped + style WINDOW_STYLE_FILLED + wrapped cvar "com_errorMessage" textalign ITEM_ALIGN_CENTER - textalignx 100 - textaligny 23 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textscale .33 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE decoration } - - - // BUTTON // - itemDef { name exit - text "Exit" - type 1 - textscale .25 - group grpControlbutton + text "OK" type ITEM_TYPE_BUTTON + textscale .4 style WINDOW_STYLE_EMPTY - rect 138 295 45 26 - textalign 1 - textalignx 22 - textaligny 20 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - close error_popmenu; - open main + play "sound/misc/menu1.wav"; + close error_popmenu } } } diff --git a/ui/findplayer.menu b/ui/findplayer.menu index f19428f7..d78dede2 100644 --- a/ui/findplayer.menu +++ b/ui/findplayer.menu @@ -3,15 +3,27 @@ { \\ FIND PLAYER POPUP MENU \\ +#define W 400 +#define H 400 +#define BUTT_W 45 +#define BUTT_H 35 +#define BORDER 10 +#define LIST_W (W-(2*BORDER)) +#define LIST_DW (LIST_W-40) +#define LEFT_C 0.13 +#define RIGHT_C 0.61 +#define SEARCH_H 30 +#define SERVERS_H 105 + menuDef { name "findplayer_popmenu" - visible 0 - fullscreen 0 - rect 158 80 320 340 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onClose { } onOpen @@ -19,226 +31,143 @@ uiScript FindPlayer; setfocus namefield } - + onESC { - close findplayer_popmenu; - open joinserver - } - - itemDef - { - name window - rect 10 15 320 340 - style 1 - backcolor 0 0 0 .25 - forecolor 0 0 0 1 - visible 1 - decoration + close findplayer_popmenu } itemDef { name window - rect 10 15 300 320 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - - itemDef - { - name findplayer - rect 0 20 320 20 - text "Find a Friend" - textalign 1 - textstyle 3 - textscale .333 - textalignx 155 - textaligny 23 - forecolor 1 1 1 1 - visible 1 - decoration - } - - itemDef - { - name window - rect 55 53 245 20 - style WINDOW_STYLE_FILLED - backcolor .2 .2 .2 .5 - visible 1 - decoration - } itemDef { name namefield - group "playersettinggroup" type ITEM_TYPE_EDITFIELD - style 0 + style WINDOW_STYLE_EMPTY text "Name:" cvar "ui_findplayer" maxChars 20 - rect 20 48 215 32 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 21 - textscale .3 + rect BORDER BORDER (W-((2*BORDER)+BUTT_W)) SEARCH_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textscale .3 outlinecolor .2 .2 .2 .5 backcolor 0 0 0 0 forecolor 1 1 1 1 - border 0 + border WINDOW_BORDER_NONE bordercolor 0 0 0 0 action { ui_script FindPlayer } - visible 1 + visible MENU_TRUE + } + + itemDef + { + name search + text "Search" + textscale .25 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + rect (W-(BORDER+BUTT_W)) BORDER BUTT_W SEARCH_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + forecolor 1 1 1 1 + visible MENU_TRUE + action + { + play "sound/misc/menu1.wav"; + ui_script FindPlayer + } } itemDef { - name serverNameList //LIST OF SERVER NAMES// - rect 20 75 280 80 + name serverNameList + rect BORDER ((2*BORDER)+SEARCH_H) LIST_W SERVERS_H type ITEM_TYPE_LISTBOX - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY elementwidth 120 elementheight 16 - textscale .225 - backcolor 0 0 0 1 + textscale .25 outlinecolor .2 .2 .2 .5 - border 1 + border WINDOW_BORDER_FULL bordersize 1 bordercolor .5 .5 .5 1 elementtype LISTBOX_TEXT feeder FEEDER_FINDPLAYER - visible 1 - } - - itemDef - { - name serverNamewindow - rect 20 75 264 80 - style 1 - backcolor 0 0 0 0 - forecolor 0 0 0 0 - border 1 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration + visible MENU_TRUE } itemDef { - name serverInfoList //LIST OF SERVER STATUS INFORMATION// - rect 20 175 280 110 + name serverInfoList + rect BORDER ((3*BORDER)+SEARCH_H+SERVERS_H) LIST_W (H-(SEARCH_H+SERVERS_H+BUTT_H+(3*BORDER))) type ITEM_TYPE_LISTBOX - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY elementwidth 120 elementheight 16 - textscale .225 - backcolor 0 0 0 1 - border 1 + textscale .25 + border WINDOW_BORDER_FULL bordersize 1 bordercolor .5 .5 .5 1 elementtype LISTBOX_TEXT feeder FEEDER_SERVERSTATUS notselectable - visible 1 + visible MENU_TRUE columns 4 - 2 90 ITEM_ALIGN_LEFT - 34 40 ITEM_ALIGN_LEFT - 66 40 ITEM_ALIGN_LEFT - 100 150 ITEM_ALIGN_LEFT - } - - itemDef - { - name serverInfowindow - rect 20 175 264 110 - style 1 - backcolor 0 0 0 0 - forecolor 0 0 0 0 - border 1 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration + 0 ((2*LEFT_C)*LIST_DW) ITEM_ALIGN_LEFT + (LEFT_C*LIST_DW) (LEFT_C*LIST_DW) ITEM_ALIGN_LEFT + ((2*LEFT_C)*LIST_DW) (LEFT_C*LIST_DW) ITEM_ALIGN_LEFT + ((1-RIGHT_C)*LIST_DW) (RIGHT_C*LIST_DW) ITEM_ALIGN_LEFT } - - // BUTTON // + // BUTTON // itemDef { - name exit - text "Exit" - type 1 + name join + text "Join" textscale .25 - group grpControlbutton type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 38 295 45 26 - textalign 1 - textalignx 22 - textaligny 20 + rect (W-(2*BUTT_W)) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - close findplayer_popmenu; - open joinserver - } + visible MENU_TRUE + action { ui_script FoundPlayerJoinServer } } - + itemDef { - name search - text "Search" - type 1 + name close + text "Close" textscale .25 - group grpControlbutton type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 131 295 60 26 - textalign 1 - textalignx 30 - textaligny 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; - ui_script FindPlayer + close findplayer_popmenu } } - - itemDef - { - name join - text "Join" - type 1 - textscale .25 - group grpControlbutton - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY - rect 238 295 45 26 - textalign 1 - textalignx 22 - textaligny 20 - forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 - action { ui_script FoundPlayerJoinServer } - } } } diff --git a/ui/hud.txt b/ui/hud.txt index 02d7fa19..ed3aa43f 100644 --- a/ui/hud.txt +++ b/ui/hud.txt @@ -1,11 +1,11 @@ // hud menu defs -// +// { loadMenu { "ui/tremulous_human_hud.menu" } loadMenu { "ui/tremulous_alien_builder_hud.menu" } loadMenu { "ui/tremulous_alien_general_hud.menu" } loadMenu { "ui/tremulous_default_hud.menu" } - + loadMenu { "ui/teamscore.menu" } loadMenu { "ui/loading.menu" } } diff --git a/ui/ingame.menu b/ui/ingame.menu index 13bd1f3c..07b969e6 100644 --- a/ui/ingame.menu +++ b/ui/ingame.menu @@ -1,32 +1,41 @@ #include "ui/menudef.h" { + +#define BUTT_BAR_X 35 +#define BUTT_BAR_Y 0 +#define BUTT_BAR_W 235 +#define BUTT_BAR_H 56 +#define BUTT_W (BUTT_BAR_W/3) +#define BUTT_H BUTT_BAR_H +#define BUTT_TEXT_S 20 + assetGlobalDef { font "fonts/font" 26 // font smallFont "fonts/smallfont" 20 // font bigFont "fonts/bigfont" 34 // font - cursor "ui/assets/3_cursor3" // cursor + cursor "ui/assets/3_cursor3" // cursor gradientBar "ui/assets/gradientbar2.tga" // gradient bar itemFocusSound "sound/misc/menu2.wav" // sound for item getting focus (via keyboard or mouse ) - + fadeClamp 1.0 // sets the fadeup alpha fadeCycle 1 // how often fade happens in milliseconds fadeAmount 0.1 // amount to adjust alpha per cycle shadowColor 0.1 0.1 0.1 0.25 // shadow color } - + \\ INGAME MENU \\ - menuDef + menuDef { name "ingame" style WINDOW_STYLE_FILLED - visible 0 + visible MENU_FALSE fullScreen 0 outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 0 0 640 48 + rect 0 0 640 48 focusColor 1 .75 0 1 disableColor .5 .5 .5 1 backColor 0 0 0 1 @@ -35,38 +44,38 @@ { close ingame; } - + itemDef { name splashmodel - rect 0 -10 640 66 + rect 0 -10 640 66 type ITEM_TYPE_MODEL style WINDOW_STYLE_FILLED asset_model "models/splash/splash_screen.md3" model_fovx 32.0 model_fovy 3.8 model_angle 180 - visible 1 + visible MENU_TRUE decoration backcolor 0 0 0 1 } itemdef { - name game - text "Game" - rect 35 6 65 40 + name game + text "Game" + rect BUTT_BAR_X BUTT_BAR_Y BUTT_W BUTT_H type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - textalign ITEM_ALIGN_CENTER - textalignx 32 - textaligny 28 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx -BUTT_TEXT_S textscale .4 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open ingame_game } } @@ -77,16 +86,15 @@ text "Options" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 100 6 70 40 + rect (BUTT_BAR_X+BUTT_W) BUTT_BAR_Y BUTT_W BUTT_H textalign ITEM_ALIGN_CENTER - textalignx 35 - textaligny 28 + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open ingame_options } } @@ -97,17 +105,16 @@ text "Exit" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - //rect 220 6 50 40 - rect 170 6 50 40 - textalign ITEM_ALIGN_CENTER - textalignx 25 - textaligny 28 + rect (BUTT_BAR_X+(2*BUTT_W)) BUTT_BAR_Y BUTT_W BUTT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textalignx BUTT_TEXT_S textscale .4 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open ingame_leave } } diff --git a/ui/ingame.txt b/ui/ingame.txt index 185ce97a..251aa779 100644 --- a/ui/ingame.txt +++ b/ui/ingame.txt @@ -1,6 +1,6 @@ // menu defs -// -{ +// +{ loadMenu { "ui/ingame.menu" } loadMenu { "ui/ingame_game.menu" } loadMenu { "ui/ingame_options.menu" } diff --git a/ui/ingame_game.menu b/ui/ingame_game.menu index 77931914..11603536 100644 --- a/ui/ingame_game.menu +++ b/ui/ingame_game.menu @@ -3,13 +3,67 @@ { \\ INGAME GAME BOX \\ +#define W 320 +#define H 290 +#define X 10 +#define Y 60 +#define BORDER 10 + +#define TOPBUTT_W 80 +#define TOPBUTT_H 30 + +#define SIDEBUTT_W 50 +#define SIDEBUTT_H 25 + +#define MAP_X (SIDEBUTT_W+BORDER) +#define MAP_Y ((2*BORDER)+TOPBUTT_H) +#define MAP_W 100 +#define MAP_H 75 +#define MAPLIST_X MAP_X +#define MAPLIST_Y ((3*BORDER)+TOPBUTT_H+MAP_H) +#define MAPLIST_W (W-((2*BORDER)+SIDEBUTT_W)) +#define MAPLIST_H (H-((4*BORDER)+MAP_H+TOPBUTT_H)) +#define MAPBUTT_X (MAP_X+MAP_W+BORDER) +#define MAPBUTT_Y MAP_Y +#define MAPBUTT_W (W-(MAPBUTT_X+BORDER)) +#define MAPBUTT_H 25 + +#define PBUTT_X MAP_X +#define PBUTT_Y (H-((2*PBUTT_H)+BORDER)) +#define PBUTT_W (W-((2*BORDER)+SIDEBUTT_W)) +#define PBUTT_H 25 +#define PLIST_X PBUTT_X +#define PLIST_Y ((2*BORDER)+TOPBUTT_H) +#define PLIST_W PBUTT_W +#define PLIST_H (H-((4*BORDER)+(2*PBUTT_H)+TOPBUTT_H)) + +#define PLAYER_C 0.7 +#define IGN_C 0.15 +#define IGNY_C 0.15 +#define IGNHEAD_H 15 +#define IGNHEAD_Y ((2*BORDER)+TOPBUTT_H) +#define IGNBUTT_W ((W-(2*BORDER))/2) +#define IGNBUTT_H 25 +#define IGNBUTT_X BORDER +#define IGNBUTT_Y (H-(BORDER+IGNBUTT_H)) +#define IGNORE_W (W-(2*BORDER)) +#define IGNORE_W2 ((W-(2*BORDER))-15) +#define IGNORE_H (H-((4*BORDER)+TOPBUTT_H+IGNHEAD_H+IGNBUTT_H)) +#define IGNORE_X BORDER +#define IGNORE_Y ((2*BORDER)+TOPBUTT_H+IGNHEAD_H) +#define IGNORE_TOFF 5 + +#define INFO_Y ((2*BORDER)+TOPBUTT_H+10) +#define INFOELEM_H 15 +#define INFO_OFF (0-(W-90)) + menuDef { name "ingame_game" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 10 56 292 280 + rect X Y W H focusColor 1 .75 0 1 onopen { @@ -28,14 +82,14 @@ itemDef { name window - rect 10 5 292 270 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration - border WINDOW_BORDER_KCGRADIENT - borderSize 2.0 + border WINDOW_BORDER_FULL + borderSize 1.0 borderColor 0.5 0.5 0.5 1 } @@ -46,21 +100,20 @@ text "Vote" group menuGrp style WINDOW_STYLE_EMPTY - rect 35 22 40 20 + rect (W-((3*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show vote; show mapvote; - + setitemcolor infoBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor voteBtn forecolor 0.2 0.2 0.2 1.0; setitemcolor ignoreBtn forecolor 1.0 1.0 1.0 1.0 @@ -73,46 +126,44 @@ text "Ignore" group menuGrp style WINDOW_STYLE_EMPTY - rect 100 22 40 20 + rect (W-((2*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show ignore; - + setitemcolor infoBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor voteBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor ignoreBtn forecolor 0.2 0.2 0.2 1.0 } } - + itemDef { name infoBtn text "Info" group menuGrp style WINDOW_STYLE_EMPTY - rect 165 22 40 20 + rect (W-((1*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show info; - + setitemcolor infoBtn forecolor 0.2 0.2 0.2 1.0; setitemcolor voteBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor ignoreBtn forecolor 1.0 1.0 1.0 1.0 @@ -120,159 +171,6 @@ } -//////// INFO - - itemDef - { - name info - group gameGrp - rect 30 55 256 20 - type 4 - style 0 - text "Server Name:" - cvar ui_serverinfo_hostname - maxPaintChars 32 - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 70 256 20 - type 4 - style 0 - text "Time Limit:" - maxPaintChars 12 - cvar ui_serverinfo_timelimit - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 85 256 20 - type 4 - style 0 - text "Sudden Death Time:" - cvar ui_serverinfo_sd - maxPaintChars 12 - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 100 256 20 - type 4 - style 0 - text "Max Clients:" - cvar ui_serverinfo_maxclients - maxPaintChars 12 - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 115 256 20 - type 4 - style 0 - text "Map Name:" - cvar ui_serverinfo_mapname - maxPaintChars 12 - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 130 256 20 - type 11 - style 0 - text "Lag Correction:" - cvar ui_serverinfo_unlagged - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 145 256 20 - type ITEM_TYPE_MULTI - style 0 - text "Friendly Fire:" - cvarFloat ui_serverinfo_ff 0 0 7 - cvarFloatList { "Off" 0 "Humans Only" 1 "Aliens Only" 2 "Both Teams" 3 "Buildables Only" 4 "Humans and Buildables" 5 "Aliens and Buildables" 6 "Both Teams and Buildables" 7 } - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - - itemDef - { - name info - group gameGrp - rect 30 160 256 20 - type 4 - style 0 - text "Version:" - cvar ui_serverinfo_version - maxPaintChars 45 - textalign ITEM_ALIGN_RIGHT - textaligny 12 - textalignx 75 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - //////// VOTE //Vote menu @@ -282,17 +180,16 @@ text "Map" group gameGrp style WINDOW_STYLE_EMPTY - rect 20 60 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show mapvote; show vote; @@ -305,40 +202,38 @@ text "Players" group gameGrp style WINDOW_STYLE_EMPTY - rect 20 85 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+SIDEBUTT_H) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show playervote; show vote; } } - + itemDef { name vote text "Team" group gameGrp style WINDOW_STYLE_EMPTY - rect 20 110 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(2*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide gameGrp; show teamvote; show vote; @@ -348,48 +243,21 @@ ///// Map Vote itemDef { - name mapvote + name mapvote group gameGrp - style 0 + style WINDOW_STYLE_EMPTY ownerdraw UI_STARTMAPCINEMATIC - rect 111 61 80 60 - border 1 - bordercolor .5 .5 .5 .5 - visible 0 - } - - itemDef - { - name mapvote - group gameGrp - style WINDOW_STYLE_FILLED - rect 110 60 82 62 - border 1 + rect MAP_X MAP_Y MAP_W MAP_H + border WINDOW_BORDER_FULL bordercolor .5 .5 .5 .5 - visible 0 - } - - itemDef - { - name mapvote - group gameGrp - text "" - ownerdraw UI_ALLMAPS_SELECTION - textscale .225 - rect 200 80 110 20 - textalign 0 - textalignx 0 - textaligny 16 - forecolor 1 1 1 1 - decoration - visible 0 + visible MENU_FALSE } itemDef { name mapvote group gameGrp - rect 110 122 150 85 + rect MAPLIST_X MAPLIST_Y MAPLIST_W MAPLIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -397,12 +265,12 @@ textscale .225 elementtype LISTBOX_TEXT feeder FEEDER_ALLMAPS - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 0 + visible MENU_FALSE doubleclick { play "sound/misc/menu1.wav"; @@ -418,12 +286,11 @@ text "Load Selected Map" type ITEM_TYPE_BUTTON textscale .25 - rect 110 210 80 20 + rect MAPBUTT_X MAPBUTT_Y MAPBUTT_W MAPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -439,12 +306,11 @@ text "Restart Current Map" type ITEM_TYPE_BUTTON textscale .25 - rect 110 230 90 20 + rect MAPBUTT_X (MAPBUTT_Y+MAPBUTT_H) MAPBUTT_W MAPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -452,7 +318,7 @@ uiScript closeingame } } - + itemDef { name mapvote @@ -460,12 +326,11 @@ text "End Match In Draw" type ITEM_TYPE_BUTTON textscale .25 - rect 110 250 110 20 + rect MAPBUTT_X (MAPBUTT_Y+(2*MAPBUTT_H)) MAPBUTT_W MAPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -479,23 +344,7 @@ { name playervote group gameGrp - text "Selected Player:" - ownerdraw UI_PLAYERLIST_SELECTION - textscale .225 - rect 110 60 110 20 - textalign 0 - textalignx 0 - textaligny 16 - forecolor 1 1 1 1 - decoration - visible 0 - } - - itemDef - { - name playervote - group gameGrp - rect 110 80 170 85 + rect PLIST_X PLIST_Y PLIST_W PLIST_H style WINDOW_STYLE_EMPTY type ITEM_TYPE_LISTBOX elementwidth 120 @@ -503,73 +352,70 @@ textscale .225 elementtype LISTBOX_TEXT feeder FEEDER_PLAYER_LIST - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 0 + visible MENU_FALSE } - + itemDef { name playervote group gameGrp - text "Kick Selected Player" + text "Mute Player" type ITEM_TYPE_BUTTON textscale .25 - rect 110 175 90 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect PBUTT_X PBUTT_Y (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; - uiScript voteKick; + uiScript voteMute; uiScript closeingame } } - + itemDef { name playervote group gameGrp - text "Mute Selected Player" + text "Un-Mute Player" type ITEM_TYPE_BUTTON textscale .25 - rect 110 195 90 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect (PBUTT_X+(PBUTT_W/2)) PBUTT_Y (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; - uiScript voteMute; + uiScript voteUnMute; uiScript closeingame } } - + itemDef { name playervote group gameGrp - text "Un-Mute Selected Player" + text "Kick Player" type ITEM_TYPE_BUTTON textscale .25 - rect 110 215 100 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect PBUTT_X (PBUTT_Y+PBUTT_H) PBUTT_W PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; - uiScript voteUnMute; + uiScript voteKick; uiScript closeingame } } @@ -580,23 +426,7 @@ { name teamvote group gameGrp - text "Selected Teammate:" - ownerdraw UI_TEAMLIST_SELECTION - textscale .225 - rect 110 60 110 20 - textalign 0 - textalignx 0 - textaligny 16 - forecolor 1 1 1 1 - decoration - visible 0 - } - - itemDef - { - name teamvote - group gameGrp - rect 110 80 170 85 + rect PLIST_X PLIST_Y PLIST_W PLIST_H style WINDOW_STYLE_EMPTY type ITEM_TYPE_LISTBOX elementwidth 120 @@ -604,27 +434,26 @@ textscale .225 elementtype LISTBOX_TEXT feeder FEEDER_TEAM_LIST - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 0 + visible MENU_FALSE } - + itemDef { name teamvote group gameGrp - text "Kick Selected Teammate" + text "Kick Teammate" type ITEM_TYPE_BUTTON textscale .25 - rect 110 175 100 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect PBUTT_X PBUTT_Y (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -632,20 +461,19 @@ uiScript closeingame } } - + itemDef { name teamvote group gameGrp - text "Deny Building For Selected Teammate" + text "Deny Building For Teammate" type ITEM_TYPE_BUTTON textscale .25 - rect 110 195 150 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect (PBUTT_X+(PBUTT_W/2)) PBUTT_Y (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -653,20 +481,20 @@ uiScript closeingame } } - + itemDef { name teamvote group gameGrp - text "Allow Building For Selected Teammate" + text "Allow Building For Teammate" type ITEM_TYPE_BUTTON textscale .25 rect 110 215 150 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect PBUTT_X (PBUTT_Y+PBUTT_H) (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -674,7 +502,7 @@ uiScript closeingame } } - + itemDef { name teamvote @@ -682,12 +510,11 @@ text "Admit Defeat" type ITEM_TYPE_BUTTON textscale .25 - rect 110 235 150 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 15 + rect (PBUTT_X+(PBUTT_W/2)) (PBUTT_Y+PBUTT_H) (PBUTT_W/2) PBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -701,43 +528,50 @@ { name ignore group gameGrp - rect 45 70 40 5 + rect IGNORE_X IGNHEAD_Y (PLAYER_C*IGNORE_W2) IGNHEAD_H text "Player Name" - visible 0 - type ITEM_TYPE_TEXT + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textalignx IGNORE_TOFF + visible MENU_FALSE + type ITEM_TYPE_TEXT textscale .225 } itemDef { name ignore group gameGrp - rect 190 70 40 5 + rect (IGNORE_X+(PLAYER_C*IGNORE_W2)) IGNHEAD_Y (IGN_C*IGNORE_W2) IGNHEAD_H text "Ignored" - visible 0 - type ITEM_TYPE_TEXT + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + visible MENU_FALSE + type ITEM_TYPE_TEXT textscale .225 } itemDef { name ignore group gameGrp - rect 230 70 40 5 + rect (IGNORE_X+((PLAYER_C+IGN_C)*IGNORE_W2)) IGNHEAD_Y (IGNY_C*IGNORE_W2) IGNHEAD_H text "Ignoring You" - visible 0 - type ITEM_TYPE_TEXT + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + visible MENU_FALSE + type ITEM_TYPE_TEXT textscale .225 } itemDef { name ignore group gameGrp - rect 35 75 240 130 + rect IGNORE_X IGNORE_Y IGNORE_W IGNORE_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 elementheight 16 textscale .225 - border 1 + border WINDOW_BORDER_FULL bordersize 1 bordercolor .5 .5 .5 1 forecolor 1 1 1 1 @@ -745,52 +579,51 @@ outlinecolor 0.1 0.1 0.1 0.5 elementtype LISTBOX_TEXT feeder FEEDER_IGNORE_LIST - visible 0 + visible MENU_FALSE columns 3 - 2 40 ITEM_ALIGN_LEFT - 150 15 ITEM_ALIGN_LEFT - 190 15 ITEM_ALIGN_LEFT - doubleClick { - play "sound/misc/menu1.wav"; + IGNORE_TOFF ((PLAYER_C*IGNORE_W)-(3*IGNORE_TOFF)) ITEM_ALIGN_LEFT + (IGNORE_TOFF+((PLAYER_C)*IGNORE_W)) ((IGN_C*IGNORE_W)-(3*IGNORE_TOFF)) ITEM_ALIGN_CENTER + (IGNORE_TOFF+((PLAYER_C+IGN_C)*IGNORE_W)) ((IGNY_C*IGNORE_W)-(3*IGNORE_TOFF)) ITEM_ALIGN_CENTER + doubleClick + { + play "sound/misc/menu1.wav"; uiScript ToggleIgnore } } itemDef { - name ignore + name ignore text "Ignore Player" group gameGrp style WINDOW_STYLE_EMPTY - rect 60 210 64 20 + rect IGNBUTT_X IGNBUTT_Y IGNBUTT_W IGNBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; uiScript IgnorePlayer } } - + itemDef { - name ignore + name ignore text "Stop Ignoring Player" group gameGrp style WINDOW_STYLE_EMPTY - rect 190 210 64 20 + rect (IGNBUTT_X+IGNBUTT_W) IGNBUTT_Y IGNBUTT_W IGNBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { play "sound/misc/menu1.wav"; @@ -798,5 +631,151 @@ } } +//////// INFO + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(0*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Server Name:" + cvar ui_serverinfo_hostname + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(1*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Time Limit:" + cvar ui_serverinfo_timelimit + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(2*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Sudden Death Time:" + cvar ui_serverinfo_sd + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(3*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Max Clients:" + cvar ui_serverinfo_maxclients + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(4*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Map Name:" + cvar ui_serverinfo_mapname + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(5*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + text "Lag Correction:" + cvar ui_serverinfo_unlagged + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(6*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_MULTI + style WINDOW_STYLE_EMPTY + text "Friendly Fire:" + cvarFloat ui_serverinfo_ff 0 0 7 + cvarFloatList { "Off" 0 "Humans Only" 1 "Aliens Only" 2 "Both Teams" 3 "Buildables Only" 4 "Humans and Buildables" 5 "Aliens and Buildables" 6 "Both Teams and Buildables" 7 } + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } + + itemDef + { + name info + group gameGrp + rect 0 (INFO_Y+(7*INFOELEM_H)) W INFOELEM_H + type ITEM_TYPE_EDITFIELD + style WINDOW_STYLE_EMPTY + text "Version:" + cvar ui_serverinfo_version + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx INFO_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + decoration + } } } diff --git a/ui/ingame_leave.menu b/ui/ingame_leave.menu index 07bd0b2c..38fcb931 100644 --- a/ui/ingame_leave.menu +++ b/ui/ingame_leave.menu @@ -3,13 +3,27 @@ { \\ INGAME_LEAVE MENU \\ +#define X 160 +#define Y 60 +#define W 120 +#define H 100 + +#define L1_X 0 +#define L1_Y (H/6) +#define L1_W W +#define L1_H (H/3) +#define L2_X 0 +#define L2_Y (H/2) +#define L2_W W +#define L2_H (H/3) + menuDef { name "ingame_leave" - visible 1 + visible MENU_TRUE fullScreen 0 outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 160 56 128 125 + rect X Y W H focusColor 1 .75 0 1 onOpen { @@ -21,33 +35,32 @@ { name leave style WINDOW_STYLE_FILLED - rect 5 5 107 90 + rect 0 0 W H backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration - border WINDOW_BORDER_KCGRADIENT - borderSize 2.0 + border WINDOW_BORDER_FULL + borderSize 1.0 borderColor 0.5 0.5 0.5 1 } itemDef { name leave + type ITEM_TYPE_BUTTON text "Main Menu" group grpMenu - style WINDOW_STYLE_EMPTY - rect 0 20 128 20 - type 1 - textalign 1 - textalignx 64 - textaligny 18 + style WINDOW_STYLE_EMPTY + rect L1_X L1_Y L1_W L1_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide grpMenu; show leaveConfirm } @@ -57,41 +70,18 @@ { name leave group grpMenu - text "Restart" - style WINDOW_STYLE_EMPTY - type 1 - rect 0 40 128 20 - textalign 1 - textalignx 65 - textaligny 18 - textscale .25 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - hide grpMenu; - show restartConfirm - } - } - - itemDef - { - name leave - group grpMenu - type 1 + type ITEM_TYPE_BUTTON text "Quit" - style WINDOW_STYLE_EMPTY - rect 0 60 128 20 - textalign 1 - textalignx 64 - textaligny 18 + style WINDOW_STYLE_EMPTY + rect L2_X L2_Y L2_W L2_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide grpMenu; show quitConfirm } @@ -104,33 +94,16 @@ itemDef { name leaveConfirm - text "Exit to" - group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 23 128 20 - textalign 1 - textalignx 64 - textaligny 18 - textscale .25 - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name leaveConfirm - text "Main Menu?" + text "Return To Main Menu?" group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 40 128 20 - textalign 1 - textalignx 64 - textaligny 18 + style WINDOW_STYLE_EMPTY + rect L1_X L1_Y L1_W L1_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 decoration forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef @@ -138,18 +111,17 @@ name leaveConfirm text "Yes" group grpConfirm - type 1 + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 18 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 + rect L2_X L2_Y (L2_W/2) L2_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript leave } } @@ -159,95 +131,17 @@ name leaveConfirm text "No" group grpConfirm - type 1 - textscale .25 - style WINDOW_STYLE_EMPTY - rect 70 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu3.wav"; - hide grpConfirm; - show grpMenu - } - } - - itemDef - { - name restartConfirm - text "Want to" - group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 23 128 20 - textalign 1 - textalignx 64 - textaligny 18 - textscale .25 - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name restartConfirm - text "Restart Map?" - group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 40 128 20 - textalign 1 - textalignx 64 - textaligny 18 - textscale .25 - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name restartConfirm - text "Yes" - group grpConfirm - type 1 - textscale .25 - style WINDOW_STYLE_EMPTY - rect 18 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - exec "map_restart"; - close ingame_leave; - close ingame - } - } - - itemDef - { - name restartConfirm - text "No" - group grpConfirm - type 1 + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 70 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 + rect (L2_X+(L2_W/2)) L2_Y (L2_W/2) L2_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; hide grpConfirm; show grpMenu } @@ -256,33 +150,16 @@ itemDef { name quitConfirm - text "Want to" + text "Want To Quit Game?" group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 23 128 20 - textalign 1 - textalignx 64 - textaligny 18 - textscale .25 - forecolor 1 1 1 1 - decoration - visible 1 - } - - itemDef - { - name quitConfirm - text "Quit Game?" - group grpConfirm - style WINDOW_STYLE_EMPTY - rect 0 40 128 20 - textalign 1 - textalignx 64 - textaligny 18 + style WINDOW_STYLE_EMPTY + rect L1_X L1_Y L1_W L1_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 decoration - visible 1 + visible MENU_TRUE } itemDef @@ -290,18 +167,17 @@ name quitConfirm text "Yes" group grpConfirm - type 1 + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 18 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 + rect L2_X L2_Y (L2_W/2) L2_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript quit } } @@ -311,18 +187,17 @@ name quitConfirm text "No" group grpConfirm - type 1 + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 70 70 40 20 - textalign 1 - textalignx 20 - textaligny 15 + rect (L2_X+(L2_W/2)) L2_Y (L2_W/2) L2_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action - { - play "sound/misc/menu3.wav"; + { + play "sound/misc/menu3.wav"; hide grpConfirm; show grpMenu } diff --git a/ui/ingame_options.menu b/ui/ingame_options.menu index e0f08aa4..74a42f76 100644 --- a/ui/ingame_options.menu +++ b/ui/ingame_options.menu @@ -3,13 +3,36 @@ { \\ INGAME OPTIONS BOX \\ +#define W 320 +#define H 290 +#define X 10 +#define Y 60 +#define BORDER 10 + +#define TOPBUTT_W 80 +#define TOPBUTT_H 30 + +#define CONTENT_X BORDER +#define CONTENT_Y ((2*BORDER)+TOPBUTT_H) +#define CONTENT_W (W-(2*BORDER)) +#define CONTENT_OFF (0-(CONTENT_W/2)) + +#define SIDEBUTT_W 65 +#define SIDEBUTT_H 25 +#define SCONTENT_X (SIDEBUTT_W+BORDER) +#define SCONTENT_Y CONTENT_Y +#define SCONTENT_W (W-(SIDEBUTT_W+(2*BORDER))) +#define SCONTENT_OFF (0-(SCONTENT_W/2)) + +#define ELEM_H 16 + menuDef { name "ingame_options" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 10 56 292 280 + rect X Y W H focusColor 1 .75 0 1 onopen { @@ -24,14 +47,14 @@ itemDef { name window - rect 10 5 292 270 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration - border WINDOW_BORDER_KCGRADIENT - borderSize 2.0 + border WINDOW_BORDER_FULL + borderSize 1.0 borderColor 0.5 0.5 0.5 1 } @@ -42,20 +65,19 @@ text "Game" group menuGrp style WINDOW_STYLE_EMPTY - rect 80 20 64 20 + rect (W-((3*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_CENTER - textalignx 34 - textaligny 18 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show game; - + setitemcolor gameBtn forecolor 0.2 0.2 0.2 1.0; setitemcolor controlsBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor systemBtn forecolor 1.0 1.0 1.0 1.0 @@ -68,21 +90,20 @@ text "Controls" group menuGrp style WINDOW_STYLE_EMPTY - rect 160 20 64 20 + rect (W-((2*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_CENTER - textalignx 34 - textaligny 18 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show controls; show look; - + setitemcolor gameBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor controlsBtn forecolor 0.2 0.2 0.2 1.0; setitemcolor systemBtn forecolor 1.0 1.0 1.0 1.0 @@ -95,21 +116,20 @@ text "System" group menuGrp style WINDOW_STYLE_EMPTY - rect 230 20 64 20 + rect (W-((1*TOPBUTT_W)+BORDER)) BORDER TOPBUTT_W TOPBUTT_H type ITEM_TYPE_BUTTON - textalign ITEM_ALIGN_CENTER - textalignx 34 - textaligny 18 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .35 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show system; show ghardware; - + setitemcolor gameBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor controlsBtn forecolor 1.0 1.0 1.0 1.0; setitemcolor systemBtn forecolor 0.2 0.2 0.2 1.0 @@ -123,20 +143,19 @@ name game group optionsGrp type ITEM_TYPE_EDITFIELD - style 0 + style WINDOW_STYLE_EMPTY text "Name:" cvar "name" - maxchars 31 - maxPaintChars 31 - rect 50 85 220 15 - textalign ITEM_ALIGN_LEFT - textalignx 64 - textaligny 12 - textscale .25 + maxchars 40 + rect CONTENT_X (CONTENT_Y+(0*ELEM_H)) CONTENT_W ELEM_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE } - + itemDef { name game @@ -144,76 +163,76 @@ type ITEM_TYPE_YESNO text "Auto Download:" cvar "cl_allowDownload" - rect 80 115 192 15 + rect CONTENT_X (CONTENT_Y+(1*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name game + name game group optionsGrp type ITEM_TYPE_YESNO text "Taunts Sounds Off:" cvar "cg_noTaunt" - rect 80 130 192 15 + rect CONTENT_X (CONTENT_Y+(2*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name game + name game group optionsGrp type ITEM_TYPE_YESNO text "Team Chats Only:" cvar "cg_teamChatsOnly" - rect 80 145 192 15 + rect CONTENT_X (CONTENT_Y+(3*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name game + name game group optionsGrp type ITEM_TYPE_YESNO text "Auto Wallwalk Pitching:" cvar "cg_wwFollow" - rect 80 160 192 15 + rect CONTENT_X (CONTENT_Y+(4*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -225,36 +244,36 @@ text "Wallwalking Speed:" cvarfloat "cg_wwSmoothTime" 300 0 1000 cvarFloatList { "Medium" 300 "Fast" 150 "Instant" 0 "Slow" 600 } - rect 80 175 192 15 + rect CONTENT_X (CONTENT_Y+(5*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { - name game + name game group optionsGrp type ITEM_TYPE_YESNO text "Wallwalk Control Toggles:" cvar "cg_wwToggle" - rect 80 190 192 15 + rect CONTENT_X (CONTENT_Y+(6*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -265,16 +284,16 @@ type ITEM_TYPE_YESNO text "Disable Warning Dialogs:" cvar "cg_disableWarningDialogs" - rect 80 205 192 15 + rect CONTENT_X (CONTENT_Y+(7*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -285,19 +304,19 @@ type ITEM_TYPE_YESNO text "Tutorial Mode:" cvar "cg_tutorial" - rect 80 220 192 15 + rect CONTENT_X (CONTENT_Y+(8*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name game @@ -306,16 +325,16 @@ text "Show Clock:" cvar "cg_drawClock" cvarFloatList { "No" 0 "12 Hour" 1 "24 Hour" 2 } - rect 80 235 192 15 + rect CONTENT_X (CONTENT_Y+(9*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -327,16 +346,16 @@ text "Draw Crosshair:" cvar "cg_drawCrosshair" cvarFloatList { "Never" 0 "Ranged Weapons Only" 1 "Always" 2 } - rect 80 250 192 15 + rect CONTENT_X (CONTENT_Y+(10*ELEM_H)) CONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx CONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -349,17 +368,16 @@ text "Look" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 60 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(0*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show controls; show look @@ -375,17 +393,16 @@ type ITEM_TYPE_BIND text "Lookup:" cvar "+lookup" - rect 96 85 192 15 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -396,17 +413,16 @@ type ITEM_TYPE_BIND text "Look Down:" cvar "+lookdown" - rect 96 100 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -417,20 +433,19 @@ type ITEM_TYPE_BIND text "Mouse Look:" cvar "+mlook" - rect 96 115 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name look @@ -438,17 +453,16 @@ type ITEM_TYPE_BIND text "Centerview:" cvar "centerview" - rect 96 130 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -459,17 +473,16 @@ type ITEM_TYPE_YESNO text "Free Look:" cvar "cl_freelook" - rect 96 145 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -480,14 +493,13 @@ type ITEM_TYPE_SLIDER text "Mouse Sensitivity:" cvarfloat "sensitivity" 5 1 30 - rect 96 160 192 20 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 15 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE } itemDef @@ -497,17 +509,16 @@ type ITEM_TYPE_YESNO text "Invert Mouse:" cvar "ui_mousePitch" - rect 96 180 192 15 + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 - action + visible MENU_FALSE + action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript update ui_mousePitch } } @@ -519,20 +530,19 @@ type ITEM_TYPE_YESNO text "Smooth Mouse:" cvar "m_filter" - rect 96 195 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 - action + visible MENU_FALSE + action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + //////// MOVE itemDef @@ -541,17 +551,16 @@ text "Move" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 80 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(1*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show controls; show move @@ -565,20 +574,19 @@ type ITEM_TYPE_YESNO text "Always Run:" cvar "cl_run" - rect 96 65 192 15 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name move @@ -586,17 +594,16 @@ type ITEM_TYPE_BIND text "Run / Walk:" cvar "+speed" - rect 96 80 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -607,17 +614,16 @@ type ITEM_TYPE_BIND text "Sprint:" cvar "boost" - rect 96 95 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -628,17 +634,16 @@ type ITEM_TYPE_BIND text "Forward:" cvar "+forward" - rect 96 110 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -649,20 +654,19 @@ type ITEM_TYPE_BIND text "Backpedal:" cvar "+back" - rect 96 125 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name move @@ -670,17 +674,16 @@ type ITEM_TYPE_BIND text "Move Left:" cvar "+moveleft" - rect 96 140 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -691,17 +694,16 @@ type ITEM_TYPE_BIND text "Move Right:" cvar "+moveright" - rect 96 155 192 15 + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -712,17 +714,16 @@ type ITEM_TYPE_BIND text "Jump:" cvar "+moveup" - rect 96 170 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -733,17 +734,16 @@ type ITEM_TYPE_BIND text "Crouch:" cvar "+movedown" - rect 96 185 192 15 + rect SCONTENT_X (SCONTENT_Y+(8*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -754,17 +754,16 @@ type ITEM_TYPE_BIND text "Turn Left:" cvar "+left" - rect 96 200 192 15 + rect SCONTENT_X (SCONTENT_Y+(9*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -775,20 +774,19 @@ type ITEM_TYPE_BIND text "Turn Right:" cvar "+right" - rect 96 215 192 15 + rect SCONTENT_X (SCONTENT_Y+(10*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name move @@ -796,17 +794,16 @@ type ITEM_TYPE_BIND text "Strafe:" cvar "+strafe" - rect 96 230 192 15 + rect SCONTENT_X (SCONTENT_Y+(11*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -820,17 +817,16 @@ text "Upgrades" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 100 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(2*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show controls; show upgrades @@ -839,43 +835,41 @@ itemDef { - name upgrades + name upgrades group optionsGrp type ITEM_TYPE_BIND text "Primary Attack:" cvar "+attack" - rect 96 90 192 15 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name upgrades + name upgrades group optionsGrp type ITEM_TYPE_BIND text "Secondary Attack:" cvar "+button5" - rect 96 105 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -886,17 +880,16 @@ type ITEM_TYPE_BIND text "Previous Upgrade:" cvar "weapprev" - rect 96 120 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -907,20 +900,19 @@ type ITEM_TYPE_BIND text "Next Upgrade:" cvar "weapnext" - rect 96 135 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name upgrades @@ -928,20 +920,19 @@ type ITEM_TYPE_BIND text "Activate Upgrade:" cvar "+button2" - rect 96 150 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name upgrades @@ -949,20 +940,19 @@ type ITEM_TYPE_BIND text "Reload:" cvar "reload" - rect 96 165 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name upgrades @@ -970,20 +960,19 @@ type ITEM_TYPE_BIND text "Buy Ammo:" cvar "buy ammo" - rect 96 180 192 15 + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name upgrades @@ -991,20 +980,19 @@ type ITEM_TYPE_BIND text "Use Medkit:" cvar "itemact medkit" - rect 96 195 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + //////// MISC itemDef @@ -1013,17 +1001,16 @@ text "Misc" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 120 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(3*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show controls; show misc @@ -1037,20 +1024,19 @@ type ITEM_TYPE_BIND text "Show Scores:" cvar "+scores" - rect 96 65 192 15 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name misc @@ -1058,20 +1044,19 @@ type ITEM_TYPE_BIND text "Scroll Scores Up:" cvar "scoresUp" - rect 96 80 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name misc @@ -1079,17 +1064,16 @@ type ITEM_TYPE_BIND text "Scroll Scores Down:" cvar "scoresDown" - rect 96 95 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1100,20 +1084,19 @@ type ITEM_TYPE_BIND text "Use Structure/Evolve:" cvar "+button7" - rect 96 110 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name misc @@ -1121,20 +1104,19 @@ type ITEM_TYPE_BIND text "Deconstruct Structure:" cvar "deconstruct" - rect 96 125 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name misc @@ -1142,20 +1124,19 @@ type ITEM_TYPE_BIND text "Gesture:" cvar "+button3" - rect 96 140 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name misc @@ -1163,17 +1144,16 @@ type ITEM_TYPE_BIND text "Chat:" cvar "messagemode" - rect 96 155 192 15 + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1184,17 +1164,16 @@ type ITEM_TYPE_BIND text "Team Chat:" cvar "messagemode2" - rect 96 170 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1205,17 +1184,16 @@ type ITEM_TYPE_BIND text "Target Chat:" cvar "messagemode3" - rect 96 185 192 15 + rect SCONTENT_X (SCONTENT_Y+(8*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1226,17 +1204,16 @@ type ITEM_TYPE_BIND text "Attack Chat:" cvar "messagemode4" - rect 96 200 192 15 + rect SCONTENT_X (SCONTENT_Y+(9*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1247,17 +1224,16 @@ type ITEM_TYPE_BIND text "Vote Yes:" cvar "vote yes" - rect 96 215 192 15 + rect SCONTENT_X (SCONTENT_Y+(10*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1268,17 +1244,16 @@ type ITEM_TYPE_BIND text "Vote No:" cvar "vote no" - rect 96 230 192 15 + rect SCONTENT_X (SCONTENT_Y+(11*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1289,17 +1264,16 @@ type ITEM_TYPE_BIND text "Team Vote Yes:" cvar "teamvote yes" - rect 96 245 192 15 + rect SCONTENT_X (SCONTENT_Y+(12*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1310,17 +1284,16 @@ type ITEM_TYPE_BIND text "Team Vote No:" cvar "teamvote no" - rect 96 260 192 15 + rect SCONTENT_X (SCONTENT_Y+(13*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - maxPaintChars 20 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1335,17 +1308,16 @@ text "GFX Hardware" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 60 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(0*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show system; show ghardware @@ -1356,44 +1328,26 @@ itemDef { - name ghardware + name ghardware group optionsGrp type ITEM_TYPE_MULTI text "Quality:" cvar "ui_glCustom" cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - rect 96 50 192 15 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript update "ui_glCustom" } } - itemDef - { - name ghardware - group optionsGrp - type ITEM_TYPE_EDITFIELD - text "GL Driver:" - cvar "r_gldriver" - //cvarFloatList { } - rect 96 65 192 15 - textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 - forecolor 1 1 1 1 - visible 0 - decoration - } - itemDef { name ghardware @@ -1401,20 +1355,20 @@ type ITEM_TYPE_YESNO text "GL Extensions:" cvar "r_allowExtensions" - rect 96 80 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCuston } } - + itemDef { name ghardware @@ -1425,16 +1379,16 @@ cvarFloatList { "320x240" 0 "400x300" 1 "512x384" 2 "640x480" 3 "800x600" 4 "960x720" 5 "1024x768" 6 "1152x864" 7 "1280x1024" 8 "1600x1200" 9 "2048x1536" 10 "856x480 wide screen" 11 } - rect 96 95 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1447,16 +1401,16 @@ text "Color Depth:" cvar "r_colorbits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 96 110 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom; uiScript update "r_colorbits" } @@ -1469,16 +1423,16 @@ type ITEM_TYPE_YESNO text "Fullscreen:" cvar "r_fullscreen" - rect 96 125 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1491,16 +1445,16 @@ text "Lighting:" cvar "r_vertexlight" cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } - rect 96 140 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1513,16 +1467,16 @@ text "Geometric Detail:" cvar "r_lodbias" cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } - rect 96 155 192 15 + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom; uiScript update "r_lodbias" } @@ -1536,20 +1490,20 @@ text "Texture Detail:" cvar "r_picmip" cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } - rect 96 170 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } - + itemDef { name ghardware @@ -1558,16 +1512,16 @@ text "Texture Quality:" cvar "r_texturebits" cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 96 185 192 15 + rect SCONTENT_X (SCONTENT_Y+(8*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1579,16 +1533,16 @@ text "Texture Filter:" cvar "r_texturemode" cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 96 200 192 15 + rect SCONTENT_X (SCONTENT_Y+(9*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1600,16 +1554,16 @@ type ITEM_TYPE_YESNO text "Anisotropic Filtering:" cvar "r_ext_texture_filter_anisotropic" - rect 96 215 192 15 + rect SCONTENT_X (SCONTENT_Y+(10*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1621,16 +1575,16 @@ type ITEM_TYPE_YESNO text "Compress Textures:" cvar "r_ext_compressed_textures " - rect 96 230 192 15 + rect SCONTENT_X (SCONTENT_Y+(11*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript glCustom } } @@ -1643,15 +1597,14 @@ text "APPLY" textscale .25 style WINDOW_STYLE_EMPTY - rect 144 245 75 20 + rect SCONTENT_X (SCONTENT_Y+(13*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_CENTER - textalignx 37 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; exec "vid_restart" } } @@ -1664,17 +1617,16 @@ text "GFX Software" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 80 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(1*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show system; show gsoftware @@ -1688,13 +1640,13 @@ type ITEM_TYPE_SLIDER text "Brightness:" cvarfloat "r_gamma" 1 .5 2 - rect 96 60 192 20 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 80 - textaligny 17 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE } itemDef @@ -1704,34 +1656,13 @@ type ITEM_TYPE_SLIDER text "Screen Size:" cvarfloat "cg_viewsize" 100 30 100 - //cvarFloatList { } - rect 96 80 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 80 - textaligny 17 - textscale .25 - forecolor 1 1 1 1 - visible 0 - } - - itemDef - { - name gsoftware - group optionsGrp - type ITEM_TYPE_YESNO - text "Simple Items:" - cvar "cg_simpleItems" - rect 96 100 192 15 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - } + visible MENU_FALSE } itemDef @@ -1741,19 +1672,19 @@ type ITEM_TYPE_YESNO text "Marks On Walls:" cvar "cg_marks" - rect 96 115 192 15 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } - + itemDef { name gsoftware @@ -1761,16 +1692,16 @@ type ITEM_TYPE_YESNO text "Dynamic Lights:" cvar "r_dynamiclight" - rect 96 130 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1781,16 +1712,16 @@ type ITEM_TYPE_YESNO text "Draw Gun:" cvar "cg_drawGun" - rect 96 145 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1801,16 +1732,16 @@ type ITEM_TYPE_YESNO text "Low Quality Sky:" cvar "r_fastsky" - rect 96 160 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1820,17 +1751,17 @@ group optionsGrp type ITEM_TYPE_YESNO text "Sync Every Frame:" - cvar "weapon 5" - rect 96 175 192 15 + cvar "r_finish" + rect SCONTENT_X (SCONTENT_Y+(6*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1841,98 +1772,98 @@ type ITEM_TYPE_YESNO text "Show Time:" cvar "cg_drawTimer" - rect 96 190 192 15 + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name gsoftware + name gsoftware group optionsGrp type ITEM_TYPE_YESNO text "In Game Videos:" cvar "r_inGameVideo" - rect 96 205 192 15 + rect SCONTENT_X (SCONTENT_Y+(8*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name gsoftware + name gsoftware group optionsGrp type ITEM_TYPE_YESNO text "Depth Sort Particles:" cvar "cg_depthSortParticles" - rect 96 220 192 15 + rect SCONTENT_X (SCONTENT_Y+(9*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name gsoftware + name gsoftware group optionsGrp type ITEM_TYPE_MULTI text "Particle Physics:" cvar "cg_bounceParticles" cvarFloatList { "Low Quality" 0 "High Quality" 1 } - rect 96 235 192 15 + rect SCONTENT_X (SCONTENT_Y+(10*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } itemDef { - name gsoftware + name gsoftware group optionsGrp type ITEM_TYPE_MULTI text "Light Flares:" cvar "cg_lightFlare" cvarFloatList { "Off" 0 "No Fade" 1 "Timed Fade" 2 "Real Fade" 3 } - rect 96 250 192 15 + rect SCONTENT_X (SCONTENT_Y+(11*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -1941,20 +1872,19 @@ itemDef { name system - text "GL Info" + text "OpenGL Info" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 100 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(2*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show system; show glinfo @@ -1965,36 +1895,36 @@ { name glinfo group optionsGrp - rect 104 35 230 230 - ownerdraw UI_GLINFO - textalign 1 - textscale .15 - textalignx 0 - textaligny 17 + rect SCONTENT_X SCONTENT_Y SCONTENT_W (H-(SCONTENT_Y+BORDER)) + ownerdraw UI_GLINFO + textscale .25 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx 4 + textaligny 4 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE decoration } //////// NET & SOUND - + itemDef { name system text "Net & Sound" group optionsGrp style WINDOW_STYLE_EMPTY - rect 20 120 64 20 + rect 0 ((2*BORDER)+TOPBUTT_H+(3*SIDEBUTT_H)) SIDEBUTT_W SIDEBUTT_H type ITEM_TYPE_BUTTON textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 16 + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; hide optionsGrp; show system; show netsound @@ -2003,21 +1933,20 @@ itemDef { - name netsound + name netsound group optionsGrp - style 1 + style WINDOW_STYLE_FILLED text "Sound" - rect 96 50 192 20 + rect SCONTENT_X (SCONTENT_Y+(0*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_CENTER - textalignx 80 - textaligny 17 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE decoration action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -2028,15 +1957,15 @@ type ITEM_TYPE_SLIDER text "Effects Volume:" cvarfloat "s_volume" 0.7 0 1 - rect 96 70 192 20 + rect SCONTENT_X (SCONTENT_Y+(1*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - textaligny 17 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE } - + itemDef { name netsound @@ -2044,32 +1973,32 @@ type ITEM_TYPE_SLIDER text "Music Volume:" cvarfloat "s_musicvolume" 0.25 0 1 - rect 96 90 192 20 + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 90 - textaligny 17 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE } itemDef { name netsound group optionsGrp - type ITEM_TYPE_YESNO + type ITEM_TYPE_YESNO text "OpenAL:" cvar "s_useOpenAL" - rect 96 120 192 15 + rect SCONTENT_X (SCONTENT_Y+(3*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -2077,20 +2006,20 @@ { name netsound group optionsGrp - type ITEM_TYPE_MULTI + type ITEM_TYPE_MULTI text "Sound Quality:" cvar "s_khz" cvarFloatList { "44 khz (very high)" 44 "22 khz (high)" 22 "11 khz (low)" 11 } - rect 96 135 192 15 + rect SCONTENT_X (SCONTENT_Y+(4*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -2098,19 +2027,19 @@ { name netsound group optionsGrp - type ITEM_TYPE_YESNO + type ITEM_TYPE_YESNO text "Doppler Sound:" cvar "s_doppler" - rect 96 150 192 15 + rect SCONTENT_X (SCONTENT_Y+(5*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 12 - textscale .25 + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -2118,41 +2047,39 @@ { name netsound group optionsGrp - type ITEM_TYPE_BUTTON - text "APPLY" - textscale .25 - style WINDOW_STYLE_EMPTY - rect 155 170 75 20 + style WINDOW_STYLE_FILLED + text "Network" + rect SCONTENT_X (SCONTENT_Y+(7*ELEM_H)) SCONTENT_W ELEM_H textalign ITEM_ALIGN_CENTER - textalignx 37 - textaligny 15 + textvalign ITEM_VALIGN_CENTER + textscale .25 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE + decoration action { - play "sound/misc/menu1.wav"; - exec "snd_restart" + play "sound/misc/menu1.wav"; } } - itemDef { - name netsound + name netsound group optionsGrp - style 1 - text "Network" - rect 96 200 192 20 - textalign ITEM_ALIGN_CENTER - textalignx 80 - textaligny 17 - textscale .25 + type ITEM_TYPE_MULTI + text "Net Data Rate:" + cvar "rate" + cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSl" 25000 } + rect SCONTENT_X (SCONTENT_Y+(8*ELEM_H)) SCONTENT_W ELEM_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 forecolor 1 1 1 1 - visible 0 - decoration + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; } } @@ -2160,20 +2087,19 @@ { name netsound group optionsGrp - type ITEM_TYPE_MULTI - text "Net Data Rate:" - cvar "rate" - cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSl" 25000 } - rect 96 220 192 20 - textalign ITEM_ALIGN_RIGHT - textalignx 100 - textaligny 17 - textscale .25 + type ITEM_TYPE_BUTTON + text "APPLY" + textscale .25 + style WINDOW_STYLE_EMPTY + rect SCONTENT_X (SCONTENT_Y+(10*ELEM_H)) SCONTENT_W ELEM_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; + exec "snd_restart" } } } diff --git a/ui/joinserver.menu b/ui/joinserver.menu index 499348dd..e169183e 100644 --- a/ui/joinserver.menu +++ b/ui/joinserver.menu @@ -4,83 +4,74 @@ \\ Server Join \\ +#define W 640 +#define H 480 +#define BORDER 10 + +#define PREVIEW_W 112 +#define PREVIEW_H 84 +#define TOP_W (W-((2*BORDER)+PREVIEW_W)) +#define TOP_H PREVIEW_H +#define TOP_X BORDER +#define TOP_Y BORDER +#define TOPBUTT_W (TOP_W/3) +#define TOPBUTT_H (TOP_H/2) +#define TOP_TOFF_X 20 +#define TOP_TOFF_Y 10 + +#define BCJ_W (W-(2*BORDER)) +#define BCJ_H 50 +#define BCJ_X BORDER +#define BCJ_Y (H-(BCJ_H+BORDER)) +#define ARROW_W 50 +#define ARROW_H BCJ_H + +#define BOT_W (W-(2*BORDER)) +#define BOT_H 45 +#define BOT_X BORDER +#define BOT_Y (BCJ_Y-BOT_H) +#define BOTBUTT_W (BOT_W/5) +#define BOTBUTT_H BOT_H + +#define SERVER_C 0.6 +#define MAP_C 0.2 +#define PLAYERS_C 0.1 +#define PING_C 0.1 +#define LIST_W (W-(2*BORDER)) +#define LIST_H (H-((2*BORDER)+TOP_H+BOT_H+BCJ_H)) +#define LIST_X BORDER +#define LIST_Y (BORDER+TOP_H) +#define LIST_TOFF 5 +#define HEADFOOT_H 25 + menuDef { name "joinserver" - visible 0 - fullscreen 1 - rect 0 0 640 480 + visible MENU_FALSE + fullscreen MENU_TRUE + rect 0 0 W H focusColor 1 .75 0 1 - outOfBoundsClick - style 0 + outOfBoundsClick + style WINDOW_STYLE_EMPTY onOpen { uiScript InitServerList 3; - hide accept_alt; + hide accept_alt; show accept; hide back_alt; show back; uiScript UpdateFilter } - + onEsc { uiScript closeJoin } itemDef { name background - rect 0 0 640 480 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 - decoration - } - - // DATE AND MESSAGE OF THE DAY // - - itemDef - { - name datewindow - rect 10 365 265 25 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor 0 0 0 .15 - visible 1 - } - - itemDef - { - name messagewindow - rect 275 365 355 25 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor 0 0 0 .15 - visible 1 - } - - itemDef - { - name refreshdate - ownerdraw UI_SERVERREFRESHDATE - textscale .33 - rect 10 365 265 25 - textalign 0 - textalignx 10 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - decoration - } - - itemDef - { - name messageoftheday - ownerdraw UI_SERVERMOTD - textscale .33 - rect 280 365 345 25 - forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE decoration } @@ -90,16 +81,18 @@ itemDef { name gametypefield + text "Source:" style WINDOW_STYLE_EMPTY ownerdraw UI_NETSOURCE - rect 26 20 128 26 - textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 22 + rect TOP_X TOP_Y TOPBUTT_W TOPBUTT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx TOP_TOFF_X + textaligny TOP_TOFF_Y textscale .4 forecolor 1 1 1 1 backcolor .5 .5 .5 .5 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav" @@ -115,18 +108,19 @@ type ITEM_TYPE_BUTTON textscale .4 style WINDOW_STYLE_EMPTY - rect 190 20 128 26 + rect (TOP_X+TOPBUTT_W) TOP_Y TOPBUTT_W TOPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 22 + textvalign ITEM_VALIGN_TOP + textalignx TOP_TOFF_X + textaligny TOP_TOFF_Y backcolor .5 .5 .5 .5 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; uiScript RefreshServers - } + } } itemDef @@ -136,18 +130,19 @@ textscale .4 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - rect 354 20 128 26 + rect (TOP_X+(2*TOPBUTT_W)) TOP_Y TOPBUTT_W TOPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 22 + textvalign ITEM_VALIGN_TOP + textalignx TOP_TOFF_X + textaligny TOP_TOFF_Y backcolor .5 .5 .5 .5 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; uiScript RefreshFilter - } + } } itemDef @@ -158,20 +153,21 @@ text "View Empty:" cvar "ui_browserShowEmpty" textscale .4 - rect 26 50 128 26 + rect TOP_X (TOP_Y+TOPBUTT_H) TOPBUTT_W TOPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 22 + textvalign ITEM_VALIGN_TOP + textalignx TOP_TOFF_X + textaligny TOP_TOFF_Y forecolor 1 1 1 1 backcolor .5 .5 .5 .5 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; uiScript RefreshFilter } } - + itemDef { name viewFull @@ -180,13 +176,14 @@ text "View Full:" cvar "ui_browserShowFull" textscale .4 - rect 190 50 128 26 + rect (TOP_X+TOPBUTT_W) (TOP_Y+TOPBUTT_H) TOPBUTT_W TOPBUTT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 22 + textvalign ITEM_VALIGN_TOP + textalignx TOP_TOFF_X + textaligny TOP_TOFF_Y forecolor 1 1 1 1 backcolor .5 .5 .5 .5 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -195,115 +192,21 @@ } - // map selection + // MAP PREVIEW // itemDef { name mappreview - style 0 + style WINDOW_STYLE_EMPTY ownerdraw UI_NETMAPCINEMATIC - rect 502 5 128 96 - border 1 - bordercolor 0 .5 0 .5 - visible 1 - } - - itemDef - { - name mappreview - style WINDOW_STYLE_FILLED - rect 502 5 128 96 - border 1 - bordercolor .5 .5 .5 .5 - visible 1 - } - - // COLUMNS // - - itemDef - { - name serverColumn - group grpColumn - rect 10 130 365 232 - style WINDOW_STYLE_FILLED - border 1 - backcolor 0 0 0 0 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration - } - - itemDef - { - name mapColumn - group grpColumn - rect 375 130 125 232 - style WINDOW_STYLE_FILLED - border 1 - backcolor 0 0 0 0 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration - } - - itemDef - { - name playerColumn - group grpColumn - rect 500 130 60 232 - style WINDOW_STYLE_FILLED - border 1 - backcolor 0 0 0 0 - bordersize 1 + rect (W-(PREVIEW_W+BORDER)) BORDER PREVIEW_W PREVIEW_H + border WINDOW_BORDER_FULL bordercolor .5 .5 .5 1 - visible 1 - decoration - } - - itemDef - { - name pingColumn - group grpColumn - rect 560 130 52 232 - style WINDOW_STYLE_FILLED - border 1 - backcolor 0 0 0 0 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration + visible MENU_TRUE } - itemDef - { - name serverlist - rect 10 130 620 232 - type ITEM_TYPE_LISTBOX - style WINDOW_STYLE_EMPTY - elementwidth 120 - elementheight 20 - textscale .33 - elementtype LISTBOX_TEXT - feeder FEEDER_SERVERS - border 1 - bordercolor 0.5 0.5 0.5 1 - forecolor 1 1 1 1 - backcolor 0.2 0.2 0.2 1 - outlinecolor 0.1 0.1 0.1 0.5 - visible 1 - columns 4 - 2 355 ITEM_ALIGN_LEFT - 375 100 ITEM_ALIGN_LEFT - 500 40 ITEM_ALIGN_LEFT - 560 30 ITEM_ALIGN_LEFT - - doubleClick { uiScript JoinServer } - } - - // SORT TABS // + // COLUMNS // itemDef { @@ -313,26 +216,40 @@ type ITEM_TYPE_BUTTON textscale .33 style WINDOW_STYLE_EMPTY - rect 10 103 365 26 + rect LIST_X LIST_Y (SERVER_C*LIST_W) HEADFOOT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 18 - border 1 + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 1 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript ServerSort 0; - - setitemcolor grpColumn backcolor 0 0 0 0; + play "sound/misc/menu1.wav"; + uiScript ServerSort 0; + + setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor serverColumn backcolor 0.3 1 1 0.5 } } + itemDef + { + name serverColumn + group grpColumn + rect LIST_X (LIST_Y+HEADFOOT_H) (SERVER_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + backcolor 0 0 0 0 + bordersize 1 + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + itemDef { name map @@ -341,26 +258,40 @@ text "Map Name" textscale .33 style WINDOW_STYLE_EMPTY - rect 375 103 125 26 + rect (LIST_X+(SERVER_C*LIST_W)) LIST_Y (MAP_C*LIST_W) HEADFOOT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 18 - border 1 + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 1 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript ServerSort 1; - - setitemcolor grpColumn backcolor 0 0 0 0; + play "sound/misc/menu1.wav"; + uiScript ServerSort 1; + + setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor mapColumn backcolor 0.3 1 1 0.5 } } + itemDef + { + name mapColumn + group grpColumn + rect (LIST_X+(SERVER_C*LIST_W)) (LIST_Y+HEADFOOT_H) (MAP_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + backcolor 0 0 0 0 + bordersize 1 + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + itemDef { name Players @@ -369,26 +300,39 @@ type ITEM_TYPE_BUTTON textscale .33 style WINDOW_STYLE_EMPTY - rect 500 103 60 26 + rect (LIST_X+((SERVER_C+MAP_C)*LIST_W)) LIST_Y (PLAYERS_C*LIST_W) HEADFOOT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 18 - border 1 + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 1 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript ServerSort 2; - - setitemcolor grpColumn backcolor 0 0 0 0; + play "sound/misc/menu1.wav"; + uiScript ServerSort 2; + + setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor playerColumn backcolor 0.3 1 1 0.5 } } + itemDef + { + name playerColumn + group grpColumn + rect (LIST_X+((SERVER_C+MAP_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PLAYERS_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + backcolor 0 0 0 0 + bordersize 1 + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } itemDef { @@ -398,44 +342,121 @@ type ITEM_TYPE_BUTTON textscale .33 style WINDOW_STYLE_EMPTY - rect 560 103 70 26 + rect (LIST_X+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) LIST_Y (PING_C*LIST_W) HEADFOOT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 18 - border 1 + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 1 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript ServerSort 3; - - setitemcolor grpColumn backcolor 0 0 0 0; + play "sound/misc/menu1.wav"; + uiScript ServerSort 3; + + setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor pingColumn backcolor 0.3 1 1 0.5 } } + itemDef + { + name pingColumn + group grpColumn + rect (LIST_X+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PING_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + backcolor 0 0 0 0 + bordersize 1 + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + + // SERVER LIST // + + itemDef + { + name serverlist + rect LIST_X (LIST_Y+HEADFOOT_H) LIST_W (LIST_H-(2*HEADFOOT_H)) + type ITEM_TYPE_LISTBOX + style WINDOW_STYLE_EMPTY + elementwidth 120 + elementheight 20 + textscale .33 + elementtype LISTBOX_TEXT + feeder FEEDER_SERVERS + border WINDOW_BORDER_FULL + bordercolor 0.5 0.5 0.5 1 + forecolor 1 1 1 1 + backcolor 0.2 0.2 0.2 1 + outlinecolor 0.1 0.1 0.1 0.5 + visible MENU_TRUE + columns 4 + LIST_TOFF ((SERVER_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT + (LIST_TOFF+((SERVER_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT + (LIST_TOFF+((SERVER_C+MAP_C)*LIST_W)) ((PLAYERS_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT + (LIST_TOFF+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) ((PING_C*LIST_W)-(3*LIST_TOFF)) ITEM_ALIGN_LEFT + + doubleClick { uiScript JoinServer } + } + + + // DATE AND MESSAGE OF THE DAY // + + itemDef + { + name refreshdate + ownerdraw UI_SERVERREFRESHDATE + textscale .33 + rect LIST_X (LIST_Y+(LIST_H-HEADFOOT_H)) (LIST_W/2) HEADFOOT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + forecolor 1 1 1 1 + border WINDOW_BORDER_FULL + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + + itemDef + { + name messageoftheday + ownerdraw UI_SERVERMOTD + textscale .33 + rect (LIST_X+(LIST_W/2)) (LIST_Y+(LIST_H-HEADFOOT_H)) (LIST_W/2) HEADFOOT_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textalignx LIST_TOFF + forecolor 1 1 1 1 + border WINDOW_BORDER_FULL + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + + + // BOTTOM BUTTONS // itemDef { name password - text "Password" + text "Set Password" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED - rect 20 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + rect BOT_X BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open password_popmenu } } @@ -443,113 +464,105 @@ itemDef { name createFavorite - text "New Favorite" + text "Create Favorite" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED - rect 148 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + rect (BOT_X+BOTBUTT_W) BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open createfavorite_popmenu } } - + itemDef { name addFavorite text "Add Favorite" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY ownerdrawFlag UI_SHOW_NOTFAVORITESERVERS - rect 276 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + rect (BOT_X+(2*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript addFavorite + play "sound/misc/menu1.wav"; + uiScript addFavorite } } itemDef { name delfavorite - text "Del. Favorite" + text "Delete Favorite" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY ownerdrawFlag UI_SHOW_FAVORITESERVERS - rect 276 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + rect (BOT_X+(2*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript DeleteFavorite; uiScript UpdateFilter } } - + itemDef { name serverinfo text "Server Info" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED - rect 404 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + rect (BOT_X+(3*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; open serverinfo_popmenu } } - + itemDef { name findplayer - text "Find Friend" + text "Find a Friend" type ITEM_TYPE_BUTTON textscale .4 - style WINDOW_STYLE_FILLED - rect 532 395 92 26 - textalign 1 - textalignx 46 // center - textaligny 22 - backcolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + rect (BOT_X+(4*BOTBUTT_W)) BOT_Y BOTBUTT_W BOTBUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open findplayer_popmenu } } - + + // BACK CREATE JOIN // + itemDef { name createServer @@ -557,36 +570,32 @@ textscale .5 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - rect 254 436 128 26 - textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 24 - backcolor .5 .5 .5 .5 + rect (BCJ_X+ARROW_W) BCJ_Y (BCJ_W-(2*ARROW_W)) BCJ_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open createserver - } + } } - // BACK BAR // - itemDef { name back - style 3 + style WINDOW_STYLE_SHADER background "ui/assets/backarrow.tga" - rect 16 424 50 50 - visible 1 + rect BCJ_X BCJ_Y ARROW_H ARROW_W + visible MENU_TRUE action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close joinserver } - + mouseEnter { hide back; @@ -599,29 +608,29 @@ name back_alt style WINDOW_STYLE_SHADER background "ui/assets/backarrow_alt.tga" - rect 16 424 50 50 + rect BCJ_X BCJ_Y ARROW_H ARROW_W backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 0 + visible MENU_FALSE type ITEM_TYPE_BUTTON - + text "Back" textalign ITEM_ALIGN_LEFT - textaligny 36 - textalignx 60 + textvalign ITEM_VALIGN_CENTER + textalignx ARROW_W textscale .6 - + mouseExit { hide back_alt; show back } - + action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close joinserver - } + } } @@ -630,21 +639,21 @@ itemDef { name accept - style 3 - rect 574 424 50 50 + style WINDOW_STYLE_SHADER + rect ((BCJ_X+BCJ_W)-ARROW_W) BCJ_Y ARROW_H ARROW_W background "ui/assets/forwardarrow.tga" backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE mouseEnter { hide accept; show accept_alt } - + action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript JoinServer } } @@ -653,29 +662,29 @@ { name accept_alt style WINDOW_STYLE_SHADER - rect 574 424 50 50 + rect ((BCJ_X+BCJ_W)-ARROW_W) BCJ_Y ARROW_H ARROW_W background "ui/assets/forwardarrow_alt.tga" backcolor 0 0 0 0 type ITEM_TYPE_BUTTON forecolor 1 1 1 1 - visible 0 - type ITEM_TYPE_BUTTON - + visible MENU_FALSE + type ITEM_TYPE_BUTTON + text "Join" - textalign ITEM_ALIGN_LEFT - textaligny 36 - textalignx -55 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textalignx -ARROW_W textscale .6 - + mouseExit { hide accept_alt; show accept } - + action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript JoinServer } } diff --git a/ui/loading.menu b/ui/loading.menu index 80718529..f7f35cfa 100644 --- a/ui/loading.menu +++ b/ui/loading.menu @@ -1,9 +1,39 @@ #include "ui/menudef.h" { + +#define W 640 +#define H 480 +#define BORDER 10 + +#define SHOT_W 320 +#define SHOT_H 240 +#define SHOT_X (W-(BORDER+SHOT_W)) +#define SHOT_Y BORDER + +#define INFO_X BORDER +#define INFO_W (W-((3*BORDER)+SHOT_W)) +#define LEVEL_Y BORDER +#define LEVEL_H 30 +#define HOST_Y (LEVEL_H+(2*BORDER)) +#define HOST_H 30 +#define MOTD_Y (LEVEL_H+HOST_H+(3*BORDER)) +#define MOTD_H ((BORDER+SHOT_H)-MOTD_Y) + +#define MAIN_W (W-(2*BORDER)) +#define LABEL_W 180 +#define LABEL_X (W-(LABEL_W+BORDER)) +#define BAR_H ((H-((6*BORDER)+SHOT_H))/4) +#define BAR_W (MAIN_W-(LABEL_W+BORDER)) +#define BAR_X BORDER +#define MEDIA_Y (H-((4*BORDER)+(4*BAR_H))) +#define BUILD_Y (H-((3*BORDER)+(3*BAR_H))) +#define CHAR_Y (H-((2*BORDER)+(2*BAR_H))) +#define OVER_Y (H-(BORDER+BAR_H)) + assetGlobalDef { - cursor "ui/assets/3_cursor3" // cursor + cursor "ui/assets/3_cursor3" // cursor gradientBar "ui/assets/gradientbar2.tga" // gradient bar fadeClamp 1.0 // sets the fadeup alpha fadeCycle 1 // how often fade happens in milliseconds @@ -21,100 +51,100 @@ menuDef { name "Loading" - rect 0 0 640 480 + rect 0 0 W H fullScreen MENU_TRUE itemDef { name background - rect 0 0 640 480 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration } itemDef { name "levelname" - rect 20 20 260 20 - visible 1 + rect INFO_X LEVEL_Y INFO_W LEVEL_H + visible MENU_TRUE decoration forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER textstyle ITEM_TEXTSTYLE_NORMAL textscale 0.4 - textaligny 28 - textalignx 0 ownerdraw CG_LOAD_LEVELNAME } itemDef { name "hostname" - rect 20 100 260 20 - visible 1 + rect INFO_X HOST_Y INFO_W HOST_H + visible MENU_TRUE decoration forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER textstyle ITEM_TEXTSTYLE_NORMAL textscale 0.4 - textaligny 28 - textalignx 0 ownerdraw CG_LOAD_HOSTNAME } - + itemDef { name "motd" - rect 20 180 260 20 - visible 1 + rect INFO_X MOTD_Y INFO_W MOTD_H + visible MENU_TRUE decoration forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER textstyle ITEM_TEXTSTYLE_NORMAL textscale 0.4 - textaligny 28 - textalignx 0 ownerdraw CG_LOAD_MOTD } itemDef { name "levelshot" - rect 300 20 320 240 - visible 1 + rect SHOT_X SHOT_Y SHOT_W SHOT_H + visible MENU_TRUE decoration forecolor 1 1 1 1 ownerdraw CG_LOAD_LEVELSHOT + + border WINDOW_BORDER_FULL + borderSize 1.0 + borderColor 0.5 0.5 0.5 1 } - + itemDef { name "media" - rect 20 300 380 30 - visible 1 + rect BAR_X MEDIA_Y BAR_W BAR_H + visible MENU_TRUE decoration forecolor 0.0 0.8 1 1 ownerdraw CG_LOAD_MEDIA - align ITEM_ALIGN_CENTER + textalign ITEM_ALIGN_CENTER textstyle ITEM_TEXTSTYLE_NEON textscale 0.5 special 1.0 } - + itemDef { name "medialabel" style WINDOW_STYLE_EMPTY textscale 0.6 - rect 420 300 200 40 - align ITEM_ALIGN_RIGHT - textaligny 28 - textalignx 0 + rect LABEL_X MEDIA_Y LABEL_W BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER forecolor 0.0 0.8 1 1 - visible 1 - decoration + visible MENU_TRUE + decoration ownerdraw CG_LOAD_MEDIA_LABEL } @@ -122,69 +152,68 @@ { name "buildables" rect 20 340 380 30 - visible 1 + rect BAR_X BUILD_Y BAR_W BAR_H + visible MENU_TRUE decoration forecolor 0.0 0.8 1 1 ownerdraw CG_LOAD_BUILDABLES - align ITEM_ALIGN_CENTER + textalign ITEM_ALIGN_CENTER textstyle ITEM_TEXTSTYLE_NEON textscale 0.5 special 1.0 } - + itemDef { name "buildableslabel" style WINDOW_STYLE_EMPTY textscale 0.6 - rect 420 340 200 40 - align ITEM_ALIGN_RIGHT - textaligny 28 - textalignx 0 + rect LABEL_X BUILD_Y LABEL_W BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER forecolor 0.0 0.8 1 1 - visible 1 - decoration + visible MENU_TRUE + decoration ownerdraw CG_LOAD_BUILDABLES_LABEL } itemDef { name "charmodel" - rect 20 380 380 30 - visible 1 + rect BAR_X CHAR_Y BAR_W BAR_H + visible MENU_TRUE decoration forecolor 0.0 0.8 1 1 ownerdraw CG_LOAD_CHARMODEL - align ITEM_ALIGN_CENTER + textalign ITEM_ALIGN_CENTER textstyle ITEM_TEXTSTYLE_NEON textscale 0.5 special 1.0 } - + itemDef { name "charmodellabel" style WINDOW_STYLE_EMPTY textscale 0.6 - rect 420 380 200 40 - align ITEM_ALIGN_RIGHT - textaligny 28 - textalignx 0 + rect LABEL_X CHAR_Y LABEL_W BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER forecolor 0.0 0.8 1 1 - visible 1 - decoration + visible MENU_TRUE + decoration ownerdraw CG_LOAD_CHARMODEL_LABEL } itemDef { name "overall" - rect 20 420 600 30 - visible 1 + rect BAR_X OVER_Y MAIN_W BAR_H + visible MENU_TRUE decoration forecolor 0.0 0.8 1 1 ownerdraw CG_LOAD_OVERALL - align ITEM_ALIGN_CENTER + textalign ITEM_ALIGN_CENTER textstyle ITEM_TEXTSTYLE_NEON textscale 0.5 special 1.0 diff --git a/ui/main.menu b/ui/main.menu index 1787dd87..d7745c3a 100644 --- a/ui/main.menu +++ b/ui/main.menu @@ -6,17 +6,17 @@ font "fonts/font" 26 // font smallFont "fonts/smallfont" 20 // font bigFont "fonts/bigfont" 34 // font - cursor "ui/assets/3_cursor3" // cursor + cursor "ui/assets/3_cursor3" // cursor gradientBar "ui/assets/gradientbar2.tga" // gradient bar itemFocusSound "sound/misc/menu2.wav" // sound for item getting focus (via keyboard or mouse ) - + fadeClamp 1.0 // sets the fadeup alpha fadeCycle 1 // how often fade happens in milliseconds fadeAmount 0.1 // amount to adjust alpha per cycle shadowColor 0.1 0.1 0.1 0.25 // shadow color } - + @@ -24,24 +24,14 @@ menuDef { name main - fullScreen MENU_TRUE + fullScreen MENU_TRUE rect 0 0 640 480 // Size and position of the menu visible MENU_TRUE // Visible on open focusColor 1 .75 0 1 // Menu focus color for text and items + background "ui/assets/mainmenu.jpg" - onOpen { uiScript stopRefresh ; playlooped "sound/ui/heartbeat.wav" } + onOpen { uiScript stopRefresh ; playlooped "sound/ui/heartbeat.wav" } onESC { open quit_popmenu } - - itemDef - { - name background - rect 0 0 640 480 - style WINDOW_STYLE_SHADER - backcolor 0 0 0 1 - visible 1 - decoration - background "ui/assets/mainmenu.jpg" - } itemDef { @@ -53,27 +43,30 @@ model_fovx 32.0 model_fovy 24.0 model_angle 180 - visible 1 + visible MENU_TRUE decoration } +#define X 536 +#define Y 20 +#define W 64 +#define ELEM_H 20 + itemDef { name mainmenu text "Play" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - rect 472 20 128 20 + textstyle ITEM_TEXTSTYLE_NORMAL + rect X Y W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 128 - textaligny 20 textscale .416 - forecolor 1 1 1 1 - visible 1 + forecolor 1 1 1 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open joinserver } } @@ -83,19 +76,17 @@ name mainmenu text "Options" type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY + style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL textscale .416 - rect 472 40 128 20 - textalignx 128 - textaligny 20 - textalign ITEM_ALIGN_RIGHT + rect X (Y+ELEM_H) W ELEM_H + textalign ITEM_ALIGN_RIGHT backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open simple_options } } @@ -105,19 +96,17 @@ name mainmenu text "Mods" type ITEM_TYPE_BUTTON - style WINDOW_STYLE_EMPTY + style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL textscale .416 - rect 472 60 128 20 - textalignx 128 - textaligny 20 - textalign ITEM_ALIGN_RIGHT + rect X (Y+(2*ELEM_H)) W ELEM_H + textalign ITEM_ALIGN_RIGHT backcolor 0 0 0 0 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; open mod } } @@ -129,13 +118,11 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL - rect 472 80 128 20 - textalignx 128 - textaligny 20 + rect X (Y+(3*ELEM_H)) W ELEM_H textscale .416 - textalign ITEM_ALIGN_RIGHT + textalign ITEM_ALIGN_RIGHT forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -146,17 +133,15 @@ itemDef { name copyright - text "Tremulous (C) 2005-2006 darklegion development" + text "Tremulous (C) 2005-2007 darklegion development" style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL textscale .25 - rect 0 440 640 40 - textalign 1 - textaligny 32 - textalignx 320 + rect 0 450 640 10 + textalign ITEM_ALIGN_CENTER forecolor .75 .75 .75 .75 - visible 1 - decoration + visible MENU_TRUE + decoration } } } diff --git a/ui/menudef.h b/ui/menudef.h index 0702698f..42196031 100644 --- a/ui/menudef.h +++ b/ui/menudef.h @@ -1,11 +1,13 @@ +#ifndef MENUDEF_H +#define MENUDEF_H #define ITEM_TYPE_TEXT 0 // simple text -#define ITEM_TYPE_BUTTON 1 // button, basically text with a border -#define ITEM_TYPE_RADIOBUTTON 2 // toggle button, may be grouped +#define ITEM_TYPE_BUTTON 1 // button, basically text with a border +#define ITEM_TYPE_RADIOBUTTON 2 // toggle button, may be grouped #define ITEM_TYPE_CHECKBOX 3 // check box #define ITEM_TYPE_EDITFIELD 4 // editable text, associated with a cvar #define ITEM_TYPE_COMBO 5 // drop down list -#define ITEM_TYPE_LISTBOX 6 // scrollable list +#define ITEM_TYPE_LISTBOX 6 // scrollable list #define ITEM_TYPE_MODEL 7 // model #define ITEM_TYPE_OWNERDRAW 8 // owner draw, name specs what it is #define ITEM_TYPE_NUMERICFIELD 9 // editable text, associated with a cvar @@ -13,11 +15,15 @@ #define ITEM_TYPE_YESNO 11 // yes no cvar setting #define ITEM_TYPE_MULTI 12 // multiple list setting, enumerated #define ITEM_TYPE_BIND 13 // multiple list setting, enumerated - + #define ITEM_ALIGN_LEFT 0 // left alignment #define ITEM_ALIGN_CENTER 1 // center alignment #define ITEM_ALIGN_RIGHT 2 // right alignment +#define ITEM_VALIGN_BOTTOM 0 // bottom alignment +#define ITEM_VALIGN_CENTER 1 // center alignment +#define ITEM_VALIGN_TOP 2 // top alignment + #define ITEM_TEXTSTYLE_NORMAL 0 // normal text #define ITEM_TEXTSTYLE_BLINK 1 // fast blinking #define ITEM_TEXTSTYLE_PULSE 2 // slow pulsing @@ -26,17 +32,17 @@ #define ITEM_TEXTSTYLE_OUTLINESHADOWED 5 // drop shadow ( need a color for this ) #define ITEM_TEXTSTYLE_SHADOWEDMORE 6 // drop shadow ( need a color for this ) #define ITEM_TEXTSTYLE_NEON 7 // drop shadow ( need a color for this ) - + #define WINDOW_BORDER_NONE 0 // no border #define WINDOW_BORDER_FULL 1 // full border based on border color ( single pixel ) #define WINDOW_BORDER_HORZ 2 // horizontal borders only -#define WINDOW_BORDER_VERT 3 // vertical borders only +#define WINDOW_BORDER_VERT 3 // vertical borders only #define WINDOW_BORDER_KCGRADIENT 4 // horizontal border using the gradient bars - + #define WINDOW_STYLE_EMPTY 0 // no background #define WINDOW_STYLE_FILLED 1 // filled with background color -#define WINDOW_STYLE_GRADIENT 2 // gradient bar based on background color -#define WINDOW_STYLE_SHADER 3 // gradient bar based on background color +#define WINDOW_STYLE_GRADIENT 2 // gradient bar based on background color +#define WINDOW_STYLE_SHADER 3 // gradient bar based on background color #define WINDOW_STYLE_TEAMCOLOR 4 // team color #define WINDOW_STYLE_CINEMATIC 5 // cinematic @@ -125,10 +131,10 @@ // owner draw types // ideally these should be done outside of this file but -// this makes it much easier for the macro expansion to +// this makes it much easier for the macro expansion to // convert them for the designers ( from the .menu files ) #define CG_OWNERDRAW_BASE 1 -#define CG_PLAYER_ARMOR_ICON 1 +#define CG_PLAYER_ARMOR_ICON 1 #define CG_PLAYER_ARMOR_VALUE 2 #define CG_PLAYER_HEAD 3 #define CG_PLAYER_HEALTH 4 @@ -193,13 +199,13 @@ #define CG_PLAYER_LOCATION 33 #define CG_TEAM_COLOR 34 #define CG_CTF_POWERUP 35 - + #define CG_AREA_POWERUP 36 #define CG_AREA_LAGOMETER 37 // painted with old system -#define CG_PLAYER_HASFLAG 38 +#define CG_PLAYER_HASFLAG 38 #define CG_GAME_TYPE 39 // not done -#define CG_SELECTEDPLAYER_ARMOR 40 +#define CG_SELECTEDPLAYER_ARMOR 40 #define CG_SELECTEDPLAYER_HEALTH 41 #define CG_PLAYER_STATUS 42 #define CG_FRAGGED_MSG 43 // painted with old system @@ -207,7 +213,7 @@ #define CG_AREA_FPSINFO 45 // painted with old system #define CG_GAME_STATUS 49 #define CG_KILLER 50 -#define CG_PLAYER_ARMOR_ICON2D 51 +#define CG_PLAYER_ARMOR_ICON2D 51 #define CG_PLAYER_AMMO_ICON2D 52 #define CG_ACCURACY 53 #define CG_ASSISTS 54 @@ -220,9 +226,9 @@ #define CG_TEAMINFO 61 #define CG_VOICE_HEAD 62 #define CG_VOICE_NAME 63 -#define CG_PLAYER_HASFLAG2D 64 +#define CG_PLAYER_HASFLAG2D 64 #define CG_HARVESTER_SKULLS2D 65 // only shows in harvester -#define CG_CAPFRAGLIMIT 66 +#define CG_CAPFRAGLIMIT 66 #define CG_1STPLACE 67 #define CG_2NDPLACE 68 #define CG_CAPTURES 69 @@ -249,6 +255,8 @@ #define CG_LAGOMETER 90 #define CG_PLAYER_CROSSHAIRNAMES 114 #define CG_STAGE_REPORT_TEXT 116 +#define CG_ALIENS_SCORE_LABEL 121 +#define CG_HUMANS_SCORE_LABEL 122 #define CG_DEMO_PLAYBACK 117 #define CG_DEMO_RECORDING 118 @@ -357,3 +365,5 @@ #define VOICECHAT_WHOISLEADER "whoisleader" // who is the team leader #define VOICECHAT_WANTONDEFENSE "wantondefense" // I want to be on defense #define VOICECHAT_WANTONOFFENSE "wantonoffense" // I want to be on offense + +#endif diff --git a/ui/menus.txt b/ui/menus.txt index 3fa3dcf6..25cc09bd 100644 --- a/ui/menus.txt +++ b/ui/menus.txt @@ -1,6 +1,6 @@ // menu defs -// -{ +// +{ loadMenu { "ui/main.menu" } loadMenu { "ui/joinserver.menu" } loadMenu { "ui/options.menu" } diff --git a/ui/mod.menu b/ui/mod.menu index bfebebd8..88045167 100644 --- a/ui/mod.menu +++ b/ui/mod.menu @@ -3,15 +3,21 @@ { \\ MOD \\ +#define W 300 +#define H 240 +#define BUTT_W 45 +#define BUTT_H 35 +#define BORDER 10 + menuDef { name "mod" - visible 0 - fullscreen 0 - rect 160 120 320 240 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onEsc { @@ -25,21 +31,21 @@ itemDef { name window - rect 0 0 320 240 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name modlist - rect 10 10 300 200 + rect BORDER BORDER (W-(2*BORDER)) (H-(BUTT_H+BORDER)) type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -49,53 +55,51 @@ feeder FEEDER_MODS textalign 3 textaligny 14 - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleClick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript RunMod } } itemDef { - name ok - text "OK" - type 1 + name load + text "Load" + type ITEM_TYPE_BUTTON textscale .25 - rect 250 210 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect (W-(2*BUTT_W)) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action - { + { play "sound/misc/menu1.wav"; close mod; uiScript RunMod } } - + itemDef { name cancel text "Cancel" - type 1 + type ITEM_TYPE_BUTTON textscale .25 - rect 280 210 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action - { + { play "sound/misc/menu3.wav"; close mod } diff --git a/ui/options.menu b/ui/options.menu index 6ce80d57..eb9c823c 100644 --- a/ui/options.menu +++ b/ui/options.menu @@ -3,29 +3,38 @@ { \\ FRONT END OPTIONS BOX \\ +#define X 0 +#define Y 20 +#define W 250 +#define H 280 +#define TOFF_X (0-(W/2)) +#define ELEM_H 16 +#define BUTT_W 35 +#define BUTT_H 35 + menuDef { name "simple_options" - visible 0 - fullscreen 0 - rect 200 80 240 320 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onEsc { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close simple_options } itemDef { name window - rect 0 0 240 320 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -38,17 +47,17 @@ itemDef { type ITEM_TYPE_EDITFIELD - style 0 + style WINDOW_STYLE_EMPTY text "Name:" cvar "name" maxchars 26 - rect 50 20 192 15 + rect X Y W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef @@ -57,13 +66,13 @@ text "Video Quality:" cvar "ui_glCustom" cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - rect 50 45 192 15 + rect X (Y+ELEM_H) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -76,16 +85,16 @@ type ITEM_TYPE_MULTI text "Video Mode:" cvar "r_mode" - cvarFloatList { "320x240" 0 "400x300" 1 "512x384" 2 "640x480" 3 + cvarFloatList { "Custom" -1 "320x240" 0 "400x300" 1 "512x384" 2 "640x480" 3 "800x600" 4 "960x720" 5 "1024x768" 6 "1152x864" 7 "1280x1024" 8 "1600x1200" 9 "2048x1536" 10 "856x480 wide screen" 11 } - rect 50 60 192 15 + rect X (Y+(2*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -98,13 +107,13 @@ type ITEM_TYPE_SLIDER text "Video Brightness:" cvarfloat "r_gamma" 1 .5 2 - rect 50 75 192 20 + rect X (Y+(3*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } @@ -114,13 +123,13 @@ type ITEM_TYPE_SLIDER text "Effects Volume:" cvarfloat "s_volume" 0.7 0 1 - rect 50 110 192 20 + rect X (Y+(4*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef @@ -128,13 +137,13 @@ type ITEM_TYPE_SLIDER text "Music Volume:" cvarfloat "s_musicvolume" 0.25 0 1 - rect 50 130 192 20 + rect X (Y+(5*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef @@ -142,13 +151,13 @@ type ITEM_TYPE_YESNO text "OpenAL Sound:" cvar "s_useOpenAL" - rect 50 145 192 15 + rect X (Y+(6*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -162,13 +171,13 @@ type ITEM_TYPE_SLIDER text "Mouse Sensitivity:" cvarfloat "sensitivity" 5 1 30 - rect 50 175 192 20 + rect X (Y+(7*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } itemDef @@ -176,13 +185,13 @@ type ITEM_TYPE_YESNO text "Invert Mouse:" cvar "ui_mousePitch" - rect 50 190 192 15 + rect X (Y+(8*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -197,14 +206,14 @@ type ITEM_TYPE_MULTI text "Network Connection:" cvar "rate" - cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSl" 25000 } - rect 50 220 192 20 + cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSL" 25000 } + rect X (Y+(9*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -216,13 +225,13 @@ type ITEM_TYPE_YESNO text "Allow Auto Download:" cvar "cl_allowDownload" - rect 50 235 192 15 + rect X (Y+(10*ELEM_H)) W ELEM_H textalign ITEM_ALIGN_RIGHT - textalignx 64 - textaligny 12 + textalignx TOFF_X + textvalign ITEM_VALIGN_CENTER textscale .25 forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -230,18 +239,32 @@ } + itemDef + { + text "For further options please use the in-game options menu" + style WINDOW_STYLE_EMPTY + textstyle ITEM_TEXTSTYLE_NORMAL + textscale .25 + rect 0 (H-60) W 10 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + forecolor 1 1 1 1 + visible MENU_TRUE + decoration + } + + itemDef { text "APPLY" type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 95 255 30 20 + rect (W-(2*BUTT_W)) (H-BUTT_H) BUTT_W BUTT_H textalign ITEM_ALIGN_CENTER - textalignx 15 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; @@ -255,33 +278,16 @@ type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 125 255 20 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H textalign ITEM_ALIGN_CENTER - textalignx 10 - textaligny 15 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; close simple_options } } - - - itemDef - { - text "For further options please use the in-game options menu" - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .25 - rect 0 300 240 40 - textalign ITEM_ALIGN_CENTER - textaligny 0 - textalignx 120 - forecolor 1 1 1 1 - visible 1 - decoration - } } } diff --git a/ui/password.menu b/ui/password.menu index 27eb72a4..1ac91cc3 100644 --- a/ui/password.menu +++ b/ui/password.menu @@ -3,89 +3,82 @@ { \\ PASSWORD POPUP MENU \\ +#define BUTT_W 45 +#define BUTT_H 35 +#define BORDER 10 +#define INPUT_H 20 +#define W 250 +#define H ((2*BORDER)+INPUT_H+BUTT_H) + menuDef { name "password_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup + + onOpen + { + setfocus passwordEntry + } + onESC { - close password_popmenu; - open joinserver + close password_popmenu } - + itemDef { name window - rect 47 47 144 144 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - - // PASSWORD // - itemDef - { - name password - text "Password" - style 0 - decoration - textscale .3 - rect 0 86 110 20 - textalign 1 - textalignx 117 - textaligny 16 - forecolor 1 1 1 1 - visible 1 - } - + // PASSWORD // + itemDef { name passwordEntry - style 1 - text "" - maxchars 15 - textscale .25 - TYPE 4 - cvar "password" - rect 60 106 120 20 + style WINDOW_STYLE_EMPTY + text "Password:" + maxChars 40 + textscale .4 + type ITEM_TYPE_EDITFIELD + cvar "password" + rect BORDER BORDER (W-(2*BORDER)) INPUT_H textalign ITEM_ALIGN_LEFT - textalignx 10 - textaligny 16 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .2 .2 .2 .5 - visible 1 + visible MENU_TRUE } itemDef { name yes text "OK" - type 1 + type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 103 140 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { play "sound/misc/menu1.wav"; - close password_popmenu; - open joinserver + close password_popmenu } } } diff --git a/ui/ptrc.menu b/ui/ptrc.menu index c11f11bd..c73e4b7d 100644 --- a/ui/ptrc.menu +++ b/ui/ptrc.menu @@ -3,30 +3,42 @@ { // PTRC POPUP MENU // +#define W 280 +#define H 140 +#define BORDER 10 + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-(2*BORDER)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X BORDER +#define INFO_Y BORDER + menuDef { name "ptrc_popmenu" - visible 0 - fullscreen 0 - rect 140 170 360 140 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onESC { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close ptrc_popmenu } - + itemDef { name window - rect 0 0 360 140 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -40,68 +52,53 @@ itemDef { name confirm - text "It seems that you disconnected during this game." - style 0 - textscale .4 - textstyle 3 - rect 180 40 0 0 - textalign ITEM_ALIGN_CENTER - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name confirm - text "Would you like to be restored to your previous state?" - style 0 - textscale .4 - textstyle 3 - rect 180 65 0 0 + text "It seems that you disconnected during this game. Would you like to be restored to your previous state?" + style WINDOW_STYLE_EMPTY + textscale .4 + textstyle WINDOW_STYLE_SHADER + rect INFO_X INFO_Y INFO_W INFO_H textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER decoration + wrapped forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } - itemDef { name yes text "YES" - type 1 - textscale .25 - rect 80 96 20 20 + type ITEM_TYPE_BUTTON + textscale .4 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H textalign ITEM_ALIGN_CENTER - textalignx 10 - textaligny 14 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action - { - play "sound/misc/menu4.wav"; + { + play "sound/misc/menu4.wav"; uiScript PTRCRestore; - close ptrc_popmenu + close ptrc_popmenu } } - + itemDef { name no text "NO" - type 1 - textscale .25 - rect 260 96 20 20 + type ITEM_TYPE_BUTTON + textscale .4 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H textalign ITEM_ALIGN_CENTER - textalignx 10 - textaligny 14 + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close ptrc_popmenu } } diff --git a/ui/quit.menu b/ui/quit.menu index 6926b93e..e3c6be24 100644 --- a/ui/quit.menu +++ b/ui/quit.menu @@ -3,30 +3,33 @@ { \\ QUIT POPUP MENU \\ +#define W 120 +#define H 120 + menuDef { name "quit_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onESC { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close quit_popmenu } - + itemDef { name window - rect 47 47 144 144 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -41,16 +44,15 @@ { name confirm text "Quit Tremulous?" - style 0 - textscale .3 - textstyle 3 - rect 0 90 110 20 - textalign 1 - textalignx 117 - textaligny 16 + style WINDOW_STYLE_EMPTY + textscale .3 + textstyle WINDOW_STYLE_SHADER + rect 0 0 W ((2*H)/3) + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER decoration forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE } @@ -58,37 +60,35 @@ { name yes text "YES" - type 1 + type ITEM_TYPE_BUTTON textscale .25 - rect 75 120 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect 0 (H/3) (W/2) ((2*H)/3) + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action - { - play "sound/misc/menu4.wav"; + { + play "sound/misc/menu4.wav"; open quitCredit } } - + itemDef { name no text "NO" - type 1 + type ITEM_TYPE_BUTTON textscale .25 - rect 128 120 30 26 - textalign 1 - textalignx 15 - textaligny 20 + rect (W/2) (H/3) (W/2) ((2*H)/3) + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close quit_popmenu } } diff --git a/ui/quitcredit.menu b/ui/quitcredit.menu index 679d6a80..e628026c 100644 --- a/ui/quitcredit.menu +++ b/ui/quitcredit.menu @@ -6,12 +6,12 @@ menuDef { name "quitCredit" - visible 0 - fullscreen 1 + visible MENU_FALSE + fullscreen MENU_TRUE rect 0 0 640 480 focusColor 1 .75 0 1 - style 1 - border 0 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_NONE onEsc { uiScript "quit" @@ -23,7 +23,7 @@ style WINDOW_STYLE_SHADER rect 0 0 640 480 type ITEM_TYPE_BUTTON - visible 1 + visible MENU_TRUE backcolor 0 0 0 1 background "ui/assets/credits_splash.jpg" action @@ -32,15 +32,15 @@ uiScript "quit" } } - + itemDef { name topstripe style WINDOW_STYLE_FILLED rect -5 -5 645 64 - visible 1 + visible MENU_TRUE backcolor 0 0 0 1 - + border WINDOW_BORDER_FULL borderSize 1.5 borderColor 1 0 0 1 @@ -51,9 +51,9 @@ name bottomstripe style WINDOW_STYLE_FILLED rect -5 416 645 485 - visible 1 + visible MENU_TRUE backcolor 0 0 0 1 - + border WINDOW_BORDER_FULL borderSize 1.5 borderColor 1 0 0 1 @@ -66,17 +66,15 @@ style WINDOW_STYLE_EMPTY rect 320 48 1 1 textalign ITEM_ALIGN_CENTER - textalignx 0 - textaligny 0 textscale 0.75 textstyle ITEM_TEXTSTYLE_NORMAL text "CREDITS" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } - + itemDef { name "credit1left" @@ -84,15 +82,13 @@ style WINDOW_STYLE_EMPTY rect 10 96 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Tim 'Timbo' Angus" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -101,15 +97,13 @@ style WINDOW_STYLE_EMPTY rect 630 96 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Programming and Direction" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -119,15 +113,13 @@ style WINDOW_STYLE_EMPTY rect 10 128 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Nick 'jex' Jansens" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -136,15 +128,13 @@ style WINDOW_STYLE_EMPTY rect 630 128 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Mapping, texturing and 2D artwork" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -154,15 +144,13 @@ style WINDOW_STYLE_EMPTY rect 10 160 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Robin 'OverFlow' Marshall" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -171,15 +159,13 @@ style WINDOW_STYLE_EMPTY rect 630 160 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Modelling, animation and mapping" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -189,15 +175,13 @@ style WINDOW_STYLE_EMPTY rect 10 192 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Jan 'Stannum' van der Weg" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -206,15 +190,13 @@ style WINDOW_STYLE_EMPTY rect 630 192 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Texturing and mapping" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -224,15 +206,13 @@ style WINDOW_STYLE_EMPTY rect 10 224 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Mike 'Veda' McInerney" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -241,15 +221,13 @@ style WINDOW_STYLE_EMPTY rect 630 224 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Modelling, animation and texturing" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -259,15 +237,13 @@ style WINDOW_STYLE_EMPTY rect 10 256 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Gordon 'Godmil' Miller" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -276,15 +252,13 @@ style WINDOW_STYLE_EMPTY rect 630 256 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Mapping" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -294,15 +268,13 @@ style WINDOW_STYLE_EMPTY rect 10 288 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "'Who-[Soup]'" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -311,15 +283,13 @@ style WINDOW_STYLE_EMPTY rect 630 288 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Mapping" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -329,15 +299,13 @@ style WINDOW_STYLE_EMPTY rect 10 320 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Tristan 'jhrx' Blease" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -346,15 +314,13 @@ style WINDOW_STYLE_EMPTY rect 630 320 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Mapping" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } itemDef @@ -364,15 +330,13 @@ style WINDOW_STYLE_EMPTY rect 10 352 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Paul 'MoP' Greveson" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -381,17 +345,15 @@ style WINDOW_STYLE_EMPTY rect 630 352 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Modelling and texturing" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } - + itemDef { name "credit10left" @@ -399,15 +361,13 @@ style WINDOW_STYLE_EMPTY rect 10 384 1 1 textalign ITEM_ALIGN_LEFT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Chris 'Dolby' McCarthy" forecolor 1 1 1 1 backcolor 1 0 0 1 visible 1 - decoration + decoration } itemDef { @@ -416,15 +376,13 @@ style WINDOW_STYLE_EMPTY rect 630 384 1 1 textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 10 textscale 0.50 textstyle ITEM_TEXTSTYLE_NORMAL text "Sound" forecolor 1 1 1 1 backcolor 0 1 0 1 visible 1 - decoration + decoration } } } diff --git a/ui/serverinfo.menu b/ui/serverinfo.menu index 18daf6ae..626788a6 100644 --- a/ui/serverinfo.menu +++ b/ui/serverinfo.menu @@ -3,15 +3,25 @@ { \\ SERVER INFO POPUP MENU \\ +#define W 400 +#define H 300 +#define BUTT_W 45 +#define BUTT_H 35 +#define BORDER 10 +#define LIST_W (W-(2*BORDER)) +#define LIST_DW (LIST_W-40) +#define LEFT_C 0.13 +#define RIGHT_C 0.61 + menuDef { name "serverinfo_popmenu" - visible 0 - fullscreen 0 - rect 158 80 320 340 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 - border 1 + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL popup onClose { } onOpen { uiScript ServerStatus } @@ -23,10 +33,10 @@ itemDef { name window - rect 10 15 300 320 - style 1 + rect 0 0 W H + style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -37,102 +47,65 @@ itemDef { name serverinfo - rect 0 20 320 20 - text "Server Information" - textstyle 3 - textalign 1 - textscale .333 - textalignx 160 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - decoration - } - - - itemDef - { - name serverinfo - rect 20 55 280 230 + rect BORDER BORDER LIST_W (H-(BUTT_H+BORDER)) type ITEM_TYPE_LISTBOX - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY elementwidth 120 elementheight 16 - textscale .225 - backcolor 0 0 0 1 - border 1 + textscale .25 + border WINDOW_BORDER_FULL bordersize 1 bordercolor .5 .5 .5 1 elementtype LISTBOX_TEXT feeder FEEDER_SERVERSTATUS notselectable - visible 1 + visible MENU_TRUE columns 4 - 2 90 ITEM_ALIGN_LEFT - 34 40 ITEM_ALIGN_LEFT - 66 40 ITEM_ALIGN_LEFT - 100 150 ITEM_ALIGN_LEFT - } - - itemDef - { - name window - rect 20 55 264 230 - style 1 - backcolor 0 0 0 0 - forecolor 0 0 0 0 - border 1 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration + 0 ((2*LEFT_C)*LIST_DW) ITEM_ALIGN_LEFT + (LEFT_C*LIST_DW) (LEFT_C*LIST_DW) ITEM_ALIGN_LEFT + ((2*LEFT_C)*LIST_DW) (LEFT_C*LIST_DW) ITEM_ALIGN_LEFT + ((1-RIGHT_C)*LIST_DW) (RIGHT_C*LIST_DW) ITEM_ALIGN_LEFT } // BUTTON // itemDef { - name exit - text "Exit" - type 1 - textscale .23 - group grpControlbutton + name refresh + text "Refresh" + type ITEM_TYPE_BUTTON + textscale .25 type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 95 295 45 26 - textalign 1 - textalignx 23 - textaligny 20 + rect (W-(2*BUTT_W)) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - close serverinfo_popmenu + play "sound/misc/menu1.wav"; + uiScript ServerStatus } } itemDef { - name refresh - text "Refresh" - type 1 - textscale .23 - group grpControlbutton + name close + text "Close" + type ITEM_TYPE_BUTTON + textscale .25 type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 180 295 45 26 - textalign 1 - textalignx 23 - textaligny 20 + rect (W-BUTT_W) (H-BUTT_H) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER forecolor 1 1 1 1 - backcolor .37 .1 .1 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript ServerStatus + play "sound/misc/menu1.wav"; + close serverinfo_popmenu } } } diff --git a/ui/teamscore.menu b/ui/teamscore.menu index 98eb5bc2..bf9f0f07 100644 --- a/ui/teamscore.menu +++ b/ui/teamscore.menu @@ -3,256 +3,327 @@ { \\ score_menu \\ +#define W 500 +#define H 338 +#define BORDER 10 + +#define TOFF 10 +#define SPEC_W 75 +#define BAR_H 30 + +#define LLIST_L 0 +#define LLIST_R (W/2) +#define RLIST_L (W/2) +#define RLIST_R W + menuDef { name "teamscore_menu" - visible 0 - fullscreen 0 - rect 0 0 640 480 + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 0 - border 1 - - // GAMETYPE BAR // + style WINDOW_STYLE_EMPTY - // TEAM NAME // + // TEAM NAME // itemDef { name teamNameWindow - rect 14 78 612 30 + rect 0 0 W BAR_H style WINDOW_STYLE_FILLED - border 1 + border WINDOW_BORDER_FULL + borderSize 1.0 bordercolor .5 .5 .5 1 forecolor 1 1 1 1 - backcolor 0 0 0 .5 - visible 1 + backcolor 0 0 0 .8 + visible MENU_TRUE decoration } - + itemDef { name alienteamname - text "Aliens" textalign ITEM_ALIGN_LEFT - textscale .5 - textaligny 26 - rect 20 78 306 23 - forecolor 1 1 1 1 + textvalign ITEM_VALIGN_CENTER + textalignx TOFF + textscale 0.4 + rect 0 0 (W/3) BAR_H + forecolor 1 1 1 1 decoration - visible 1 + visible MENU_TRUE + ownerdraw CG_ALIENS_SCORE_LABEL } itemDef { name stagereport - align ITEM_ALIGN_CENTER - textscale 0.4 - textaligny 24 - rect 14 78 612 23 - forecolor 1 1 1 1 + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER + textscale 0.33 + rect (W/3) 0 (W/3) BAR_H + forecolor 1 1 1 1 decoration - visible 1 + visible MENU_TRUE ownerdraw CG_STAGE_REPORT_TEXT } itemDef { name humanteamname - text "Humans" textalign ITEM_ALIGN_RIGHT - textscale .5 - textaligny 26 - rect 620 78 0 23 + textvalign ITEM_VALIGN_CENTER + textalignx -TOFF + textscale 0.4 + rect ((2*W)/3) 0 (W/3) BAR_H forecolor 1 1 1 1 decoration - visible 1 + visible MENU_TRUE + ownerdraw CG_HUMANS_SCORE_LABEL } - // TEAM BARS // - + // TEAM BARS // + itemDef { name leftteambar - rect 14 112 307 25 + rect 0 (BAR_H+BORDER) (W/2) BAR_H style WINDOW_STYLE_FILLED - border 1 + border WINDOW_BORDER_FULL + borderSize 1.0 bordercolor .5 .5 .5 1 forecolor 1 1 1 1 - backcolor 0 0 0 .5 - visible 1 + backcolor 0 0 0 .8 + visible MENU_TRUE decoration } itemDef { name rightteambar - rect 320 112 306 25 + rect (W/2) (BAR_H+BORDER) (W/2) BAR_H style WINDOW_STYLE_FILLED - border 1 + border WINDOW_BORDER_FULL + borderSize 1.0 bordercolor .5 .5 .5 1 forecolor 1 1 1 1 - backcolor 0 0 0 .5 - visible 1 + backcolor 0 0 0 .8 + visible MENU_TRUE decoration } - // TEAM HEADINGS // + // TEAM HEADINGS // itemDef { - name leftteamheadings - text "Status Name Kills Time Ping" - textscale .25 - style 0 - rect 25 112 128 30 - textalign 0 - textalignx 0 // x alignment point for text - // use it to offset left/right text from the edge - // or to center the text on a different point - textaligny 18 + text "Status" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_L+10) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER backcolor 0 0 0 0 forecolor 1 .75 0 1 decoration - visible 1 + visible MENU_TRUE } - + itemDef { - name rightteamheadings - text "Status Name Kills Time Ping" - textscale .25 - style 0 - rect 331 112 128 30 - textalign 0 - textalignx 0 // x alignment point for text - // use it to offset left/right text from the edge - // or to center the text on a different point - textaligny 18 + text "Name" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_L+50) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER backcolor 0 0 0 0 forecolor 1 .75 0 1 decoration - visible 1 + visible MENU_TRUE } + itemDef + { + text "Kills" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-95) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } - // GRADIENT BACKGROUNDS // + itemDef + { + text "Time" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-55) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } itemDef { - name window - rect 320 142 1 220 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - forecolor 1 1 1 1 - backcolor 0 0 0 1 - visible 1 + text "Ping" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-15) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 decoration + visible MENU_TRUE } itemDef { - name window - rect 300 142 1 220 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - visible 1 + text "Status" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_L+10) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 decoration + visible MENU_TRUE } itemDef { - name window - rect 606 142 1 220 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - visible 1 + text "Name" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_L+50) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 decoration + visible MENU_TRUE } + itemDef + { + text "Kills" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-95) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } - // LIST // + itemDef + { + text "Time" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-55) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + text "Ping" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-15) (BAR_H+BORDER) 1 BAR_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } itemDef { name leftlist - rect 14 136 306 222 + rect 0 ((2*BAR_H)+BORDER) (W/2) (H-((3*BAR_H)+(2*BORDER))) + style WINDOW_STYLE_FILLED + backcolor 0 0 0 .6 + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 forecolor .75 .75 .75 1 - visible 1 + visible MENU_TRUE type ITEM_TYPE_LISTBOX elementwidth 135 - elementheight 20 + elementheight 16 textscale .25 elementtype LISTBOX_TEXT feeder FEEDER_ALIENTEAM_LIST notselectable columns 7 - 5 15 ITEM_ALIGN_LEFT - 21 15 ITEM_ALIGN_LEFT - 7 30 ITEM_ALIGN_LEFT - 45 100 ITEM_ALIGN_LEFT - 172 20 ITEM_ALIGN_RIGHT - 209 20 ITEM_ALIGN_RIGHT - 247 20 ITEM_ALIGN_RIGHT + 5 15 ITEM_ALIGN_LEFT + 21 15 ITEM_ALIGN_LEFT + 7 30 ITEM_ALIGN_LEFT + 45 ((W/2)-200) ITEM_ALIGN_LEFT + ((W/2)-120) 20 ITEM_ALIGN_RIGHT + ((W/2)-80) 20 ITEM_ALIGN_RIGHT + ((W/2)-40) 20 ITEM_ALIGN_RIGHT } - itemDef + itemDef { name rightlist - rect 320 136 306 222 - forecolor 1 1 1 1 - visible 1 + rect (W/2) ((2*BAR_H)+BORDER) (W/2) (H-((3*BAR_H)+(2*BORDER))) + style WINDOW_STYLE_FILLED + backcolor 0 0 0 .6 + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor .75 .75 .75 1 + visible MENU_TRUE type ITEM_TYPE_LISTBOX elementwidth 135 - elementheight 20 + elementheight 16 textscale .25 elementtype LISTBOX_TEXT feeder FEEDER_HUMANTEAM_LIST notselectable columns 7 - 5 15 ITEM_ALIGN_LEFT - 21 15 ITEM_ALIGN_LEFT - 7 30 ITEM_ALIGN_LEFT - 45 100 ITEM_ALIGN_LEFT - 172 20 ITEM_ALIGN_RIGHT - 209 20 ITEM_ALIGN_RIGHT - 247 20 ITEM_ALIGN_RIGHT + 5 15 ITEM_ALIGN_LEFT + 21 15 ITEM_ALIGN_LEFT + 7 30 ITEM_ALIGN_LEFT + 45 ((W/2)-200) ITEM_ALIGN_LEFT + ((W/2)-120) 20 ITEM_ALIGN_RIGHT + ((W/2)-80) 20 ITEM_ALIGN_RIGHT + ((W/2)-40) 20 ITEM_ALIGN_RIGHT } - - // PLAYER LIST BORDER // + // spectators // itemDef { name window - rect 14 141 612 221 - style WINDOW_STYLE_EMPTY - border 1 - bordercolor .5 .5 .5 1 - forecolor 1 1 1 1 - backcolor 0 0 0 .5 - visible 1 - decoration - } - - - // spectators // - - itemDef - { - name window - rect 14 366 612 24 + rect 0 (H-BAR_H) W BAR_H style WINDOW_STYLE_FILLED - border 1 + border WINDOW_BORDER_FULL + borderSize 1.0 bordercolor .5 .5 .5 1 - forecolor 1 1 1 .7 - backcolor 0 0 0 .5 + backcolor 0 0 0 .8 textscale .33 - visible 1 + visible MENU_TRUE decoration } @@ -260,46 +331,28 @@ { name window text "Spectating:" - textaligny 20 - rect 19 366 82 24 + rect 0 (H-BAR_H) SPEC_W BAR_H style WINDOW_STYLE_FILLED forecolor 1 1 1 1 textscale .33 - textalignx 3 - visible 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textalignx TOFF + visible MENU_TRUE decoration } itemDef { name window - rect 100 366 520 24 + rect SPEC_W (H-BAR_H) (W-SPEC_W) BAR_H style WINDOW_STYLE_FILLED forecolor 1 1 1 1 textscale .33 - visible 1 + textvalign ITEM_VALIGN_CENTER + visible MENU_TRUE ownerdraw CG_SPECTATORS decoration } - - // WINNAR // - - itemDef - { - name winner - rect 310 400 612 40 - type 4 - style 0 - text "" - cvar ui_winner - maxPaintChars 24 - textalign ITEM_ALIGN_CENTER - textaligny 20 - textscale .5 - forecolor 1 1 1 1 - visible 1 - decoration - } - } } diff --git a/ui/tremulous.txt b/ui/tremulous.txt index 6bcc08f1..deb04d9a 100644 --- a/ui/tremulous.txt +++ b/ui/tremulous.txt @@ -1,18 +1,18 @@ // menu defs -// -{ +// +{ loadMenu { "ui/tremulous_teamselect.menu" } loadMenu { "ui/tremulous_alienclass.menu" } loadMenu { "ui/tremulous_humanitem.menu" } - + loadMenu { "ui/tremulous_alienbuild.menu" } loadMenu { "ui/tremulous_humanbuild.menu" } - + loadMenu { "ui/tremulous_humanarmoury.menu" } - + loadMenu { "ui/tremulous_humandialogs.menu" } loadMenu { "ui/tremulous_aliendialogs.menu" } - + loadMenu { "ui/tremulous_alienupgrade.menu" } loadMenu { "ui/ptrc.menu" } diff --git a/ui/tremulous_alien_builder_hud.menu b/ui/tremulous_alien_builder_hud.menu index bf75327c..5274d707 100644 --- a/ui/tremulous_alien_builder_hud.menu +++ b/ui/tremulous_alien_builder_hud.menu @@ -1,285 +1,26 @@ #include "ui/menudef.h" -// team menu -// -// defines from ui_shared.h - { + +#define W 640 +#define H 480 + menuDef { name "alien_builder_hud" fullScreen MENU_FALSE visible MENU_TRUE - rect 0 0 640 480 - - //CONSOLE - itemDef - { - name "console" - rect 8 8 560 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CONSOLE - } - - //TUTORIAL - itemDef - { - name "tutorial" - rect 8 250 640 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 0.35 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TUTORIAL - } - - //LAGOMETER - itemDef - { - name "lagometer" - rect 596 68 32 20 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_LAGOMETER - } - - //DEMO STATE - itemDef - { - name "demoRecording" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_RECORDING - background "ui/assets/neutral/circle.tga" - } - itemDef - { - name "demoPlayback" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_PLAYBACK - background "ui/assets/forwardarrow.tga" - } - - //SELECT - itemDef - { - name "select" - rect 240 435 160 32 - visible 0 - decoration - ownerdraw CG_PLAYER_SELECT - } - - ////////////////// - //STATIC OBJECTS// - ////////////////// + rect 0 0 W H - //LEFT RING CIRCLE - itemDef - { - name "left-ring-circle" - rect 47.5 410 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //LEFT ARM - itemDef - { - name "left-arm" - rect 77 404.75 104 52.5 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/alien/left-arm.tga" - } - - //LEFT ARM CIRCLE - itemDef - { - name "left-arm-circle" - rect 150 417.5 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //RIGHT RING CIRCLE - itemDef - { - name "right-ring-circle" - rect 567 410 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //RIGHT ARM - itemDef - { - name "right-arm" - rect 459 404.75 104 52.5 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/alien/right-arm.tga" - } - - /////////////////// - //DYNAMIC OBJECTS// - /////////////////// - - //BOLT - itemDef - { - name "bolt" - rect 52.5 412.5 15 20 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/bolt.tga" - ownerdraw CG_PLAYER_BOOST_BOLT - } - - //CROSS - itemDef - { - name "cross" - rect 155 422.5 15 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/cross.tga" - } - - //LEFT RING - itemDef - { - name "left-ring" - rect 7.25 369.5 90.5 106 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/left-ring.tga" - ownerdraw CG_PLAYER_BOOSTED - } - - //LEFT SPIKES - itemDef - { - name "left-spikes" - rect 18.5 381 59 83 - visible 1 - decoration - forecolor 1.0 0.0 0.0 1.0 - background "ui/assets/alien/left-spikes.tga" - ownerdraw CG_PLAYER_WALLCLIMBING - } - - //RIGHT RING - itemDef - { - name "right-ring" - rect 542.25 369.5 90.5 106 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/right-ring.tga" - ownerdraw CG_PLAYER_BOOSTED - } - - //RIGHT SPIKES - itemDef - { - name "right-spikes" - rect 562.5 381 59 83 - visible 1 - decoration - forecolor 1.0 0.0 0.0 1.0 - background "ui/assets/alien/right-spikes.tga" - ownerdraw CG_PLAYER_WALLCLIMBING - } - - //HEALTH - itemDef - { - name "health" - rect 78.5 421.5 60 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 .5 - ownerdraw CG_PLAYER_HEALTH - } - - //ALIEN CLASS ICON - itemDef - { - name "alien-icon" - rect 465 417.5 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.6 - ownerdraw CG_PLAYER_WEAPONICON - } - - //ORGANS - itemDef - { - name "organs" - rect 570.5 415.95 15 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 .5 - ownerdraw CG_PLAYER_CREDITS_VALUE_NOPAD - } +#include "ui/tremulous_alien_common_hud.h" +#include "ui/tremulous_common_hud.h" //BUILD TIMER itemDef { name "buildtimer" rect 567 410 25 25 - visible 1 + visible MENU_TRUE decoration forecolor 1.0 0.0 0.0 .5 ownerdraw CG_PLAYER_BUILD_TIMER @@ -290,82 +31,10 @@ { name "build-points" rect 483.5 421.5 60 15 - visible 1 + visible MENU_TRUE decoration forecolor 1.0 0.0 0.0 .5 ownerdraw CG_PLAYER_AMMO_VALUE } - - //FPS - itemDef - { - name "fps" - rect 572 8 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_FPS - } - - //TIMER - itemDef - { - name "timer" - rect 572 38 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TIMER - } - - //CLOCK - itemDef - { - name "clock" - rect 572 90 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.25 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CLOCK - } - - //ALIENSENSE - itemDef - { - name "aliensense" - rect 20 20 600 400 - visible 1 - decoration - ownerdraw CG_PLAYER_ALIEN_SENSE - } - - //PLAYER NAME - itemDef - { - name "playername" - rect 200 275 240 25 - visible 1 - decoration - textScale .5 - ownerdraw CG_PLAYER_CROSSHAIRNAMES - } } } diff --git a/ui/tremulous_alien_common_hud.h b/ui/tremulous_alien_common_hud.h new file mode 100644 index 00000000..6ac76733 --- /dev/null +++ b/ui/tremulous_alien_common_hud.h @@ -0,0 +1,186 @@ +#define COMMON_HUD_R 1.0 +#define COMMON_HUD_G 0.0 +#define COMMON_HUD_B 0.0 + +////////////////// +//STATIC OBJECTS// +////////////////// + +//LEFT RING CIRCLE +itemDef +{ + name "left-ring-circle" + rect 47.5 410 25 25 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 + style WINDOW_STYLE_SHADER + background "ui/assets/neutral/circle.tga" +} + +//LEFT ARM +itemDef +{ + name "left-arm" + rect 77 404.75 104 52.5 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 + style WINDOW_STYLE_SHADER + background "ui/assets/alien/left-arm.tga" +} + +//LEFT ARM CIRCLE +itemDef +{ + name "left-arm-circle" + rect 150 417.5 25 25 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 + style WINDOW_STYLE_SHADER + background "ui/assets/neutral/circle.tga" +} + +//RIGHT RING CIRCLE +itemDef +{ + name "right-ring-circle" + rect 567 410 25 25 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 + style WINDOW_STYLE_SHADER + background "ui/assets/neutral/circle.tga" +} + +//RIGHT ARM +itemDef +{ + name "right-arm" + rect 459 404.75 104 52.5 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 + style WINDOW_STYLE_SHADER + background "ui/assets/alien/right-arm.tga" +} + +/////////////////// +//DYNAMIC OBJECTS// +/////////////////// + +//BOLT +itemDef +{ + name "bolt" + rect 52.5 412.5 15 20 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 + background "ui/assets/alien/bolt.tga" + ownerdraw CG_PLAYER_BOOST_BOLT +} + +//CROSS +itemDef +{ + name "cross" + rect 155 422.5 15 15 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 + style WINDOW_STYLE_SHADER + background "ui/assets/neutral/cross.tga" +} + +//LEFT RING +itemDef +{ + name "left-ring" + rect 7.25 369.5 90.5 106 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 + background "ui/assets/alien/left-ring.tga" + ownerdraw CG_PLAYER_BOOSTED +} + +//LEFT SPIKES +itemDef +{ + name "left-spikes" + rect 18.5 381 59 83 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1.0 + background "ui/assets/alien/left-spikes.tga" + ownerdraw CG_PLAYER_WALLCLIMBING +} + +//RIGHT RING +itemDef +{ + name "right-ring" + rect 542.25 369.5 90.5 106 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 + background "ui/assets/alien/right-ring.tga" + ownerdraw CG_PLAYER_BOOSTED +} + +//RIGHT SPIKES +itemDef +{ + name "right-spikes" + rect 562.5 381 59 83 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1.0 + background "ui/assets/alien/right-spikes.tga" + ownerdraw CG_PLAYER_WALLCLIMBING +} + +//HEALTH +itemDef +{ + name "health" + rect 78.5 421.5 60 15 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 + ownerdraw CG_PLAYER_HEALTH +} + +//ALIEN CLASS ICON +itemDef +{ + name "alien-icon" + rect 465 417.5 25 25 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.6 + ownerdraw CG_PLAYER_WEAPONICON +} + +//ORGANS +itemDef +{ + name "organs" + rect 570.5 415.95 15 15 + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 + ownerdraw CG_PLAYER_CREDITS_VALUE_NOPAD +} + +//ALIENSENSE +itemDef +{ + name "aliensense" + rect 20 20 600 400 + visible MENU_TRUE + decoration + ownerdraw CG_PLAYER_ALIEN_SENSE +} diff --git a/ui/tremulous_alien_general_hud.menu b/ui/tremulous_alien_general_hud.menu index cc816008..62e8af86 100644 --- a/ui/tremulous_alien_general_hud.menu +++ b/ui/tremulous_alien_general_hud.menu @@ -1,360 +1,29 @@ #include "ui/menudef.h" -// team menu -// -// defines from ui_shared.h - { + +#define W 640 +#define H 480 + menuDef { name "alien_general_hud" fullScreen MENU_FALSE visible MENU_TRUE - rect 0 0 640 480 - - //CONSOLE - itemDef - { - name "console" - rect 8 8 560 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CONSOLE - } - - //TUTORIAL - itemDef - { - name "tutorial" - rect 8 250 640 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 0.35 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TUTORIAL - } - - //LAGOMETER - itemDef - { - name "lagometer" - rect 596 68 32 20 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_LAGOMETER - } - - //DEMO STATE - itemDef - { - name "demoRecording" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_RECORDING - background "ui/assets/neutral/circle.tga" - } - itemDef - { - name "demoPlayback" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_PLAYBACK - background "ui/assets/forwardarrow.tga" - } - - //SELECT - itemDef - { - name "select" - rect 240 435 160 32 - visible 0 - decoration - ownerdraw CG_PLAYER_SELECT - } - - ////////////////// - //STATIC OBJECTS// - ////////////////// + rect 0 0 W H - //LEFT RING CIRCLE - itemDef - { - name "left-ring-circle" - rect 47.5 410 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //LEFT ARM - itemDef - { - name "left-arm" - rect 77 404.75 104 52.5 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/alien/left-arm.tga" - } - - //LEFT ARM CIRCLE - itemDef - { - name "left-arm-circle" - rect 150 417.5 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //RIGHT RING CIRCLE - itemDef - { - name "right-ring-circle" - rect 567 410 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/circle.tga" - } - - //RIGHT ARM - itemDef - { - name "right-arm" - rect 459 404.75 104 52.5 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.25 - style WINDOW_STYLE_SHADER - background "ui/assets/alien/right-arm.tga" - } - - /////////////////// - //DYNAMIC OBJECTS// - /////////////////// +#include "ui/tremulous_alien_common_hud.h" +#include "ui/tremulous_common_hud.h" //BLOB itemDef { name "blob" rect 479 419 57 18 - visible 1 + visible MENU_TRUE forecolor 1.0 0.0 0.0 0.5 background "ui/assets/alien/tremublob.tga" ownerdraw CG_PLAYER_POISON_BARBS } - - //BOLT - itemDef - { - name "bolt" - rect 52.5 412.5 15 20 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/bolt.tga" - ownerdraw CG_PLAYER_BOOST_BOLT - } - - //CROSS - itemDef - { - name "cross" - rect 155 422.5 15 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - style WINDOW_STYLE_SHADER - background "ui/assets/neutral/cross.tga" - } - - //LEFT RING - itemDef - { - name "left-ring" - rect 7.25 369.5 90.5 106 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/left-ring.tga" - ownerdraw CG_PLAYER_BOOSTED - } - - //LEFT SPIKES - itemDef - { - name "left-spikes" - rect 18.5 381 59 83 - visible 1 - decoration - forecolor 1.0 0.0 0.0 1.0 - background "ui/assets/alien/left-spikes.tga" - ownerdraw CG_PLAYER_WALLCLIMBING - } - - //RIGHT RING - itemDef - { - name "right-ring" - rect 542.25 369.5 90.5 106 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.5 - background "ui/assets/alien/right-ring.tga" - ownerdraw CG_PLAYER_BOOSTED - } - - //RIGHT SPIKES - itemDef - { - name "right-spikes" - rect 562.5 381 59 83 - visible 1 - decoration - forecolor 1.0 0.0 0.0 1.0 - background "ui/assets/alien/right-spikes.tga" - ownerdraw CG_PLAYER_WALLCLIMBING - } - - //HEALTH - itemDef - { - name "health" - rect 78.5 421.5 60 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 .5 - ownerdraw CG_PLAYER_HEALTH - } - - //ALIEN CLASS ICON - itemDef - { - name "alien-icon" - rect 465 417.5 25 25 - visible 1 - decoration - forecolor 1.0 0.0 0.0 0.6 - ownerdraw CG_PLAYER_WEAPONICON - } - - //ORGANS - itemDef - { - name "organs" - rect 570.5 415.95 15 15 - visible 1 - decoration - forecolor 1.0 0.0 0.0 .5 - ownerdraw CG_PLAYER_CREDITS_VALUE_NOPAD - } - - //FPS - itemDef - { - name "fps" - rect 572 8 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_FPS - } - - //TIMER - itemDef - { - name "timer" - rect 572 38 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TIMER - } - - //CLOCK - itemDef - { - name "clock" - rect 572 90 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1.0 0.0 0.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.25 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CLOCK - } - - //ALIENSENSE - itemDef - { - name "aliensense" - rect 20 20 600 400 - visible 1 - decoration - ownerdraw CG_PLAYER_ALIEN_SENSE - } - - //PLAYER NAME - itemDef - { - name "playername" - rect 200 275 240 25 - visible 1 - decoration - textScale .5 - ownerdraw CG_PLAYER_CROSSHAIRNAMES - } } } diff --git a/ui/tremulous_alienbuild.menu b/ui/tremulous_alienbuild.menu index 6ea6c0d1..522d17f5 100644 --- a/ui/tremulous_alienbuild.menu +++ b/ui/tremulous_alienbuild.menu @@ -1,36 +1,55 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_alienbuild" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadAlienBuilds; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,78 +57,78 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMALIENBUILD - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 - doubleclick + visible MENU_TRUE + doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript BuildAlienBuildable; close tremulous_alienbuild } } - + itemDef { name infopane ownerdraw UI_ABUILDINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript BuildAlienBuildable; close tremulous_alienbuild } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_alienbuild } } diff --git a/ui/tremulous_alienclass.menu b/ui/tremulous_alienclass.menu index 0d8cf5eb..ad891757 100644 --- a/ui/tremulous_alienclass.menu +++ b/ui/tremulous_alienclass.menu @@ -1,36 +1,55 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_alienclass" - visible 1 - fullscreen 0 + visible MENU_TRUE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadAlienClasses; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,100 +57,99 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMALIENCLASSES - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript SpawnAsAlienClass; close tremulous_alienclass } } - + itemDef { name infopane ownerdraw UI_ACLASSINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "Back" text "< Back" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 152 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3 - textaligny 18 + rect ((2*BORDER)+LIST_W) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close tremulous_alienclass; open tremulous_teamselect } } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript SpawnAsAlienClass; close tremulous_alienclass } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_alienclass } } diff --git a/ui/tremulous_aliendialogs.menu b/ui/tremulous_aliendialogs.menu index 1e55ed79..159afb02 100644 --- a/ui/tremulous_aliendialogs.menu +++ b/ui/tremulous_aliendialogs.menu @@ -1,13 +1,26 @@ #include "ui/menudef.h" { + +#define W 280 +#define H 190 +#define BORDER 10 + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-(2*BORDER)) +#define INFO_H (H-((4*BORDER)+(2*BUTT_H))) +#define INFO_X BORDER +#define INFO_Y ((2*BORDER)+BUTT_H) + menuDef { name "tremulous_alien_dialog" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 185 140 280 190 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 style WINDOW_STYLE_EMPTY popup @@ -15,17 +28,17 @@ itemDef { name window - rect 0 0 280 190 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name alien_dialog @@ -33,51 +46,49 @@ type ITEM_TYPE_TEXT textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 115 10 50 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 18 + rect BORDER BORDER INFO_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name alien_dialog textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 10 50 250 80 + rect INFO_X INFO_Y INFO_W INFO_H cvar "ui_dialog" - autowrapped - textalignx 5 - textaligny 18 + wrapped + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .33 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name alien_dialog text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 242 150 28 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close tremulous_alien_dialog } } diff --git a/ui/tremulous_alienupgrade.menu b/ui/tremulous_alienupgrade.menu index 5dc67318..d31b2832 100644 --- a/ui/tremulous_alienupgrade.menu +++ b/ui/tremulous_alienupgrade.menu @@ -1,25 +1,44 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_alienupgrade" - visible 1 - fullscreen 0 + visible MENU_TRUE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadAlienUpgrades; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL @@ -30,7 +49,7 @@ itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,78 +57,78 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMALIENUPGRADE - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript UpgradeToNewClass; close tremulous_alienupgrade } } - + itemDef { name infopane ownerdraw UI_AUPGRADEINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL - style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + style WINDOW_STYLE_EMPTY + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript UpgradeToNewClass; close tremulous_alienupgrade } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_alienupgrade } } diff --git a/ui/tremulous_common_hud.h b/ui/tremulous_common_hud.h new file mode 100644 index 00000000..025bc68e --- /dev/null +++ b/ui/tremulous_common_hud.h @@ -0,0 +1,158 @@ +#define BORDER 10 + +#define STAT_W 45 +#define STAT_H 22 +#define STAT_X (W-(BORDER+STAT_W)) + +#define CONSOLE_W (W-((3*BORDER)+STAT_W)) +#define CONSOLE_H 180 +#define MAIN_W (W-(2*BORDER)) + +//CONSOLE +itemDef +{ + name "console" + rect BORDER BORDER CONSOLE_W CONSOLE_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor 1 1 1 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textscale 0.4 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_CONSOLE +} + +//TUTORIAL +itemDef +{ + name "tutorial" + rect BORDER 250 MAIN_W 180 + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor 1 1 1 0.35 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textscale 0.3 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_TUTORIAL +} + +//FPS +itemDef +{ + name "fps" + rect STAT_X BORDER STAT_W STAT_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textscale 0.3 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_FPS +} +//TIMER +itemDef +{ + name "timer" + rect STAT_X ((2*BORDER)+STAT_H) STAT_W STAT_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textscale 0.3 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_TIMER +} +//LAGOMETER +itemDef +{ + name "lagometer" + rect STAT_X ((3*BORDER)+(2*STAT_H)) STAT_W STAT_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1 + textscale 0.3 + textalignx 1 + textaligny 0.5 + ownerdraw CG_LAGOMETER +} +//CLOCK +itemDef +{ + name "clock" + rect 572 90 56 22 + rect STAT_X ((4*BORDER)+(3*STAT_H)) STAT_W STAT_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1 + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER + textscale 0.25 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_CLOCK +} +//DEMO STATE +itemDef +{ + name "demoRecording" + rect (STAT_X+(STAT_W-32)) ((5*BORDER)+(4*STAT_H)) 32 32 + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor 1 0 0 1 + textscale 0.3 + textalignx 1 + textaligny 0.5 + ownerdraw CG_DEMO_RECORDING + background "ui/assets/neutral/circle.tga" +} +itemDef +{ + name "demoPlayback" + rect (STAT_X+(STAT_W-32)) ((5*BORDER)+(4*STAT_H)) 32 32 + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor 1 1 1 1 + textscale 0.3 + textalignx 1 + textaligny 0.5 + ownerdraw CG_DEMO_PLAYBACK + background "ui/assets/forwardarrow.tga" +} + +//SNAPSHOT +itemDef +{ + name "snapshot" + rect BORDER 196 MAIN_W STAT_H + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_CENTER + textscale 0.4 + textstyle ITEM_TEXTSTYLE_NORMAL + ownerdraw CG_SNAPSHOT +} + +//PLAYER NAME +itemDef +{ + name "playername" + rect 200 275 240 25 + visible MENU_TRUE + decoration + textScale .5 + ownerdraw CG_PLAYER_CROSSHAIRNAMES +} diff --git a/ui/tremulous_default_hud.menu b/ui/tremulous_default_hud.menu index 0eed6404..02689861 100644 --- a/ui/tremulous_default_hud.menu +++ b/ui/tremulous_default_hud.menu @@ -1,165 +1,20 @@ #include "ui/menudef.h" { + +#define W 640 +#define H 480 + menuDef { name "default_hud" fullScreen MENU_FALSE visible MENU_TRUE - rect 0 0 640 480 - - //CONSOLE - itemDef - { - name "console" - rect 8 8 560 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CONSOLE - } - - //TUTORIAL - itemDef - { - name "tutorial" - rect 8 250 640 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 0.35 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TUTORIAL - } + rect 0 0 W H - //FPS - itemDef - { - name "fps" - rect 572 8 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_FPS - } - //TIMER - itemDef - { - name "timer" - rect 572 38 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TIMER - } - //CLOCK - itemDef - { - name "clock" - rect 572 90 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.25 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CLOCK - } - - //SNAPSHOT - itemDef - { - name "snapshot" - rect 8 196 200 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_SNAPSHOT - } - //LAGOMETER - itemDef - { - name "lagometer" - rect 596 68 32 20 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_LAGOMETER - } - //DEMO STATE - itemDef - { - name "demoRecording" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_RECORDING - background "ui/assets/neutral/circle.tga" - } - itemDef - { - name "demoPlayback" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_PLAYBACK - background "ui/assets/forwardarrow.tga" - } - - //PLAYER NAME - itemDef - { - name "playername" - rect 200 275 240 25 - visible 1 - decoration - textScale .5 - ownerdraw CG_PLAYER_CROSSHAIRNAMES - } +#define COMMON_HUD_R 1.0 +#define COMMON_HUD_G 1.0 +#define COMMON_HUD_B 1.0 +#include "ui/tremulous_common_hud.h" } } diff --git a/ui/tremulous_human_hud.menu b/ui/tremulous_human_hud.menu index 8fe00950..38354b4a 100644 --- a/ui/tremulous_human_hud.menu +++ b/ui/tremulous_human_hud.menu @@ -1,163 +1,21 @@ #include "ui/menudef.h" -// team menu -// -// defines from ui_shared.h - { + +#define W 640 +#define H 480 + menuDef { name "human_hud" fullScreen MENU_FALSE visible MENU_TRUE - rect 0 0 640 480 - - //CONSOLE - itemDef - { - name "console" - rect 8 8 560 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CONSOLE - } - - //TUTORIAL - itemDef - { - name "tutorial" - rect 8 250 640 180 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 0.35 - align ITEM_ALIGN_LEFT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TUTORIAL - } - - //LAGOMETER - itemDef - { - name "lagometer" - rect 596 68 32 20 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 0 0.8 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_LAGOMETER - } - - //DEMO STATE - itemDef - { - name "demoRecording" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 0 0 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_RECORDING - background "ui/assets/neutral/circle.tga" - } - itemDef - { - name "demoPlayback" - rect 596 120 32 32 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - textscale 0.3 - textalignx 1 - textaligny 0.5 - ownerdraw CG_DEMO_PLAYBACK - background "ui/assets/forwardarrow.tga" - } - - //FPS - itemDef - { - name "fps" - rect 572 8 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 0.0 0.8 1.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_FPS - } - - //TIMER - itemDef - { - name "timer" - rect 572 38 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 0.0 0.8 1.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.3 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_TIMER - } - - //CLOCK - itemDef - { - name "clock" - rect 572 90 56 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 0.0 0.8 1.0 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.25 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_CLOCK - } + rect 0 0 W H - //SNAPSHOT - itemDef - { - name "snapshot" - rect 8 196 200 22 - style WINDOW_STYLE_EMPTY - visible 1 - decoration - forecolor 1 1 1 1 - align ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 18 - textscale 0.4 - textstyle ITEM_TEXTSTYLE_NORMAL - ownerdraw CG_SNAPSHOT - } +#define COMMON_HUD_R 0.0 +#define COMMON_HUD_G 0.8 +#define COMMON_HUD_B 1.0 +#include "ui/tremulous_common_hud.h" ////////////////// //STATIC OBJECTS// @@ -168,72 +26,72 @@ { name "left-circle" rect 35 417.5 25 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/neutral/circle.tga" - } + } //LEFT ARM itemDef { name "left-arm" rect 68.25 420 94.5 35 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/human/left-arm.tga" - } + } //CREDITS LABEL itemDef { name "credits-label" rect 508 403 7 7.5 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 style WINDOW_STYLE_SHADER background "ui/assets/human/credits.tga" - } + } //RIGHT CIRCLE itemDef { name "right-circle" rect 580 417.5 25 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/neutral/circle.tga" - } + } //RIGHT ARM itemDef { name "right-arm" rect 477.25 420 94.5 35 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/human/right-arm.tga" - } + } //RIGHT CAP itemDef { name "right-cap" rect 500 400 80 15 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/human/right-cap.tga" - } + } /////////////////// //DYNAMIC OBJECTS// @@ -244,82 +102,82 @@ { name "bolt" rect 40 420 15 20 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/bolt.tga" ownerdraw CG_PLAYER_STAMINA_BOLT - } + } //CROSS itemDef { name "cross" rect 137.5 430 15 15 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/neutral/cross.tga" ownerdraw CG_PLAYER_HEALTH_CROSS - } + } //STAMINA 1 itemDef { name "stamina1" rect 34.5 403.5 9 11.5 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/stamina1.tga" ownerdraw CG_PLAYER_STAMINA_1 - } + } //STAMINA 2 itemDef { name "stamina2" rect 24 410.75 11.5 10.5 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/stamina2.tga" ownerdraw CG_PLAYER_STAMINA_2 - } + } //STAMINA 3 itemDef { name "stamina3" rect 20.75 423.5 10.5 7 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/stamina3.tga" ownerdraw CG_PLAYER_STAMINA_3 - } + } //STAMINA 4 itemDef { name "stamina4" rect 21 402.5 54 55 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/stamina4.tga" ownerdraw CG_PLAYER_STAMINA_4 - } + } //RING itemDef { name "ring" - // rect 20 402.5 55 55 // Guide for Stamina alignment + //rect 20 402.5 55 55 // Guide for Stamina alignment rect 565 402.5 55 55 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 background "ui/assets/human/ring.tga" ownerdraw CG_PLAYER_CLIPS_RING } @@ -329,20 +187,20 @@ { name "credits" rect 515 402 45 11.25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 ownerdraw CG_PLAYER_CREDITS_VALUE - } + } //HEALTH itemDef { name "health" rect 67 430 60 15 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 ownerdraw CG_PLAYER_HEALTH } @@ -351,21 +209,21 @@ { name "weapon" rect 482.5 425 25 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 ownerdraw CG_PLAYER_WEAPONICON - } + } - //WEAPON SELECT TEXT - itemDef - { - name "selecttext" + //WEAPON SELECT TEXT + itemDef + { + name "selecttext" rect 200 300 240 25 - visible 1 - decoration - textScale .5 - ownerdraw CG_PLAYER_SELECTTEXT + visible MENU_TRUE + decoration + textScale .5 + ownerdraw CG_PLAYER_SELECTTEXT } //AMMO @@ -373,9 +231,9 @@ { name "ammo" rect 494 430 60 15 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 ownerdraw CG_PLAYER_AMMO_VALUE } @@ -384,9 +242,9 @@ { name "clips" rect 538 423 60 15 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 ownerdraw CG_PLAYER_CLIPS_VALUE } @@ -395,20 +253,20 @@ { name "buildtimer" rect 580 417.5 25 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 ownerdraw CG_PLAYER_BUILD_TIMER } //USABLE - itemDef - { + itemDef + { name "usable" rect 307.5 380 25 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 background "ui/assets/neutral/use.tga" ownerdraw CG_PLAYER_USABLE_BUILDABLE } @@ -418,9 +276,9 @@ { name "scanner" rect 164 340 312 72 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 .5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B .5 background "ui/assets/human/scanner.tga" ownerdraw CG_PLAYER_HUMAN_SCANNER } @@ -430,9 +288,9 @@ { name "inventory" rect 232.5 425 175 25 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.5 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5 ownerdraw CG_PLAYER_SELECT } @@ -441,22 +299,11 @@ { name "selected" rect 306 424 27 27 - visible 1 + visible MENU_TRUE decoration - forecolor 0.0 0.8 1.0 0.25 + forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.25 style WINDOW_STYLE_SHADER background "ui/assets/neutral/selected.tga" - } - - //PLAYER NAME - itemDef - { - name "playername" - rect 200 275 240 25 - visible 1 - decoration - textScale .5 - ownerdraw CG_PLAYER_CROSSHAIRNAMES } } } diff --git a/ui/tremulous_humanarmoury.menu b/ui/tremulous_humanarmoury.menu index 74514fa2..60bc70b1 100644 --- a/ui/tremulous_humanarmoury.menu +++ b/ui/tremulous_humanarmoury.menu @@ -1,15 +1,38 @@ #include "ui/menudef.h" { + +#define W 550 +#define H 250 +#define BORDER 10 +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_LX BORDER +#define LIST_LY BORDER +#define LIST_RX (W-(BORDER+LIST_W)) +#define LIST_RY BORDER + +#define BUTT_H 25 +#define BUTT_Y (H-(BORDER+BUTT_H)) + +#define INFO_W (W-((4*BORDER)+(2*LIST_W))) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + +#define BUTT_X INFO_X +#define BUTT_W (INFO_W/3) + menuDef { name "tremulous_humanarmoury" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 44 111 544 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { @@ -21,21 +44,21 @@ itemDef { name window - rect 0 0 544 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "buylist" - rect 8 8 136 231 + rect LIST_LX LIST_LY LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -43,23 +66,23 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMHUMANARMOURYBUY - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript BuyFromArmoury } } - + itemDef { name "selllist" - rect 400 8 136 231 + rect LIST_RX LIST_RY LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -67,98 +90,97 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMHUMANARMOURYSELL - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript SellToArmoury } } - + itemDef { name infopane ownerdraw UI_HBUYINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { - name "Close" - text "Close" + name "Sell" + text "< Sell" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 254 218 50 21 + rect BUTT_X BUTT_Y BUTT_W BUTT_H textalign ITEM_ALIGN_LEFT - textalignx 3 - textaligny 18 + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu4.wav"; - close tremulous_humanarmoury + play "sound/misc/menu1.wav"; + uiScript SellToArmoury } } - + itemDef { - name "Buy" - text "Buy >" + name "Close" + text "Close" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 152 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (BUTT_X+BUTT_W) BUTT_Y BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript BuyFromArmoury + play "sound/misc/menu4.wav"; + close tremulous_humanarmoury } } - + itemDef { - name "Sell" - text "< Sell" + name "Buy" + text "Buy >" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (BUTT_X+(2*BUTT_W)) BUTT_Y BUTT_W BUTT_H + textalign ITEM_ALIGN_RIGHT + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; - uiScript SellToArmoury + play "sound/misc/menu1.wav"; + uiScript BuyFromArmoury } } } diff --git a/ui/tremulous_humanbuild.menu b/ui/tremulous_humanbuild.menu index a44b84bf..a2f84c85 100644 --- a/ui/tremulous_humanbuild.menu +++ b/ui/tremulous_humanbuild.menu @@ -1,36 +1,55 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_humanbuild" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadHumanBuilds; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,77 +57,77 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMHUMANBUILD - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript BuildHumanBuildable; close tremulous_humanbuild } } - + itemDef { name infopane ownerdraw UI_HBUILDINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript BuildHumanBuildable; close tremulous_humanbuild } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_humanbuild } } diff --git a/ui/tremulous_humandialogs.menu b/ui/tremulous_humandialogs.menu index ee77c21a..8db2f027 100644 --- a/ui/tremulous_humandialogs.menu +++ b/ui/tremulous_humandialogs.menu @@ -1,13 +1,27 @@ #include "ui/menudef.h" { + +#define W 280 +#define H 190 +#define BORDER 10 + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-(2*BORDER)) +#define INFO_H (H-((4*BORDER)+(2*BUTT_H))) +#define INFO_X BORDER +#define INFO_Y ((2*BORDER)+BUTT_H) +#define INFO_TOFF 6 + menuDef { name "tremulous_human_dialog" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 185 140 280 190 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 style WINDOW_STYLE_EMPTY popup @@ -15,17 +29,17 @@ itemDef { name window - rect 0 0 280 190 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name human_dialog @@ -33,51 +47,49 @@ type ITEM_TYPE_TEXT textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 115 10 50 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 18 + rect BORDER BORDER INFO_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name human_dialog textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 10 50 250 80 + rect INFO_X INFO_Y INFO_W INFO_H cvar "ui_dialog" - autowrapped - textalignx 5 - textaligny 18 + wrapped + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .33 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name human_dialog text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 242 150 28 20 - textalign ITEM_ALIGN_LEFT - textalignx 5 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; close tremulous_human_dialog } } diff --git a/ui/tremulous_humanitem.menu b/ui/tremulous_humanitem.menu index b8374ea9..bc2204f6 100644 --- a/ui/tremulous_humanitem.menu +++ b/ui/tremulous_humanitem.menu @@ -1,36 +1,55 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_humanitem" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadHumanItems; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,100 +57,99 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMHUMANITEMS - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript SpawnWithHumanItem; close tremulous_humanitem } } - + itemDef { name infopane ownerdraw UI_HITEMINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "Back" text "< Back" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 152 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3 - textaligny 18 + rect ((2*BORDER)+LIST_W) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu4.wav"; + play "sound/misc/menu4.wav"; close tremulous_humanitem; open tremulous_teamselect } } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript SpawnWithHumanItem; close tremulous_humanitem } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_humanitem } } diff --git a/ui/tremulous_teamselect.menu b/ui/tremulous_teamselect.menu index 72c1dffc..7d638784 100644 --- a/ui/tremulous_teamselect.menu +++ b/ui/tremulous_teamselect.menu @@ -1,36 +1,55 @@ #include "ui/menudef.h" { + +#define W 450 +#define H 250 +#define BORDER 10 + +#define LIST_W 140 +#define LIST_H (H-(2*BORDER)) +#define LIST_X BORDER +#define LIST_Y BORDER + +#define BUTT_H 25 +#define BUTT_W 45 + +#define INFO_W (W-((3*BORDER)+LIST_W)) +#define INFO_H (H-((3*BORDER)+BUTT_H)) +#define INFO_X ((2*BORDER)+LIST_W) +#define INFO_Y BORDER +#define INFO_TOFF 6 + menuDef { name "tremulous_teamselect" - visible 0 - fullscreen 0 + visible MENU_FALSE + fullscreen MENU_FALSE outOfBoundsClick - rect 112 111 400 247 + rect (320-(W/2)) (240-(H/2)) W H focusColor 1 .75 0 1 - style 1 + style WINDOW_STYLE_FILLED popup onOpen { uiScript LoadTeams; setFocus list } itemDef { name window - rect 0 0 400 247 + rect 0 0 W H style WINDOW_STYLE_FILLED backcolor 0 0 0 1 - visible 1 + visible MENU_TRUE decoration border WINDOW_BORDER_FULL borderSize 1.0 borderColor 0.5 0.5 0.5 1 } - + itemDef { name "list" - rect 8 8 136 231 + rect LIST_X LIST_Y LIST_W LIST_H type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 @@ -38,78 +57,78 @@ textscale .33 elementtype LISTBOX_TEXT feeder FEEDER_TREMTEAMS - border 1 + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE doubleclick { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript JoinTeam; close tremulous_teamselect } } - + itemDef { name infopane ownerdraw UI_TEAMINFOPANE textstyle ITEM_TEXTSTYLE_NORMAL style WINDOW_STYLE_EMPTY - rect 152 8 240 204 + rect INFO_X INFO_Y INFO_W INFO_H textscale .33 - textalignx 6 - textaligny 12 - border 1 + textalign ITEM_ALIGN_LEFT + textvalign ITEM_VALIGN_TOP + textalignx INFO_TOFF + textaligny INFO_TOFF + border WINDOW_BORDER_FULL bordercolor 0.5 0.5 0.5 0.5 forecolor 1 1 1 1 backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.1 0.1 0.5 - visible 1 + visible MENU_TRUE decoration } - + itemDef { name "OKCancel" text "OK" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 305 218 34 21 - textalign ITEM_ALIGN_LEFT - textalignx 12.5 - textaligny 18 + rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu1.wav"; + play "sound/misc/menu1.wav"; uiScript JoinTeam; close tremulous_teamselect } } - + itemDef { name "OKCancel" text "Cancel" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 344 218 50 21 - textalign ITEM_ALIGN_LEFT - textalignx 3.8 - textaligny 18 + rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H + textalign ITEM_ALIGN_CENTER + textvalign ITEM_VALIGN_CENTER textscale .4 forecolor 1 1 1 1 backcolor .5 0 0 .25 - visible 1 + visible MENU_TRUE action { - play "sound/misc/menu3.wav"; + play "sound/misc/menu3.wav"; close tremulous_teamselect } } -- cgit