From 373d05079b7c0c966465835f0817eaf2de5380fe Mon Sep 17 00:00:00 2001 From: Tomi Isoaho Date: Wed, 18 Mar 2009 19:49:03 +0000 Subject: [PATCH] Latest UI files --- reaction/uifiles/cdkey.menu | 10 +- reaction/uifiles/connect.menu | 141 +- reaction/uifiles/controls.menu | 495 ++++++ reaction/uifiles/controls_common.h | 99 ++ reaction/uifiles/createserver.menu | 656 ++++++- reaction/uifiles/credit.menu | 152 +- reaction/uifiles/demo.menu | 380 ++-- reaction/uifiles/error.menu | 148 +- reaction/uifiles/ingame.menu | 10 +- reaction/uifiles/ingame_about.menu | 3 +- reaction/uifiles/ingame_addbot.menu | 3 +- reaction/uifiles/ingame_callvote.menu | 3 +- reaction/uifiles/ingame_controls.menu | 3 +- reaction/uifiles/ingame_devmode.menu | 3 +- reaction/uifiles/ingame_ignore.menu | 3 +- reaction/uifiles/ingame_item.menu | 3 +- reaction/uifiles/ingame_join.menu | 3 +- reaction/uifiles/ingame_join_dm.menu | 3 +- reaction/uifiles/ingame_leave.menu | 3 +- reaction/uifiles/ingame_matchmode.menu | 3 +- .../uifiles/ingame_matchmode_captain.menu | 3 +- .../uifiles/ingame_matchmode_referee.menu | 3 +- .../uifiles/ingame_matchmode_settings.menu | 3 +- reaction/uifiles/ingame_options.menu | 3 +- reaction/uifiles/ingame_player.menu | 7 +- reaction/uifiles/ingame_presets.menu | 3 +- reaction/uifiles/ingame_presets_edit.menu | 3 +- reaction/uifiles/ingame_system.menu | 3 +- reaction/uifiles/ingame_tkok.menu | 3 +- reaction/uifiles/ingame_vote.menu | 3 +- reaction/uifiles/ingame_weapon.menu | 3 +- reaction/uifiles/joinserver.menu | 1273 +++---------- reaction/uifiles/main.menu | 178 +- reaction/uifiles/memory.menu | 148 +- reaction/uifiles/menudef.h | 68 +- reaction/uifiles/menus.txt | 7 +- reaction/uifiles/mod.menu | 378 ++-- reaction/uifiles/options.menu | 440 ++++- reaction/uifiles/password.menu | 90 +- reaction/uifiles/player.menu | 464 +++-- reaction/uifiles/quit.menu | 39 +- reaction/uifiles/replacements.menu | 10 +- reaction/uifiles/setup.menu | 529 +++++- reaction/uifiles/shared.h | 194 ++ reaction/uifiles/specify.menu | 134 +- reaction/uifiles/system.menu | 1580 +++++------------ reaction/uifiles/tabs.h | 112 ++ 47 files changed, 4632 insertions(+), 3173 deletions(-) create mode 100644 reaction/uifiles/controls.menu create mode 100644 reaction/uifiles/controls_common.h create mode 100644 reaction/uifiles/shared.h create mode 100644 reaction/uifiles/tabs.h diff --git a/reaction/uifiles/cdkey.menu b/reaction/uifiles/cdkey.menu index d1c9d83e..53b922aa 100644 --- a/reaction/uifiles/cdkey.menu +++ b/reaction/uifiles/cdkey.menu @@ -83,7 +83,7 @@ name "cdkey_icon" style WINDOW_STYLE_SHADER rect 8 8 48 48 - background "menu/art/rq3-setup-cdkey.tga" + background UI_ASSETS"/icons/rq3-setup-cdkey.tga" decoration visible 1 } @@ -92,7 +92,7 @@ name "cdkey_title" style WINDOW_STYLE_SHADER rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" + background UI_ASSETS"/icons/rq3-title-setup.tga" decoration visible 1 } @@ -315,13 +315,13 @@ shortcutKey "B" rect 12 432 32 32 style WINDOW_STYLE_SHADER - background "menu/art/rq3-menu-back.tga" + background UI_ASSETS"/icons/rq3-menu-back.tga" type 1 visible 1 action { close *self; open setup_menu ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-back-focus-anim" ; show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-back.tga" ; timeFade back_hint forecolor .9 .9 .9 0 0 250 } } diff --git a/reaction/uifiles/connect.menu b/reaction/uifiles/connect.menu index c3787644..bd01b5f9 100644 --- a/reaction/uifiles/connect.menu +++ b/reaction/uifiles/connect.menu @@ -1,84 +1,97 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 + + +{ menuDef { - name "connect" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the current background + name "connect" // Makro: rename it to "main-rq3" + background UI_ASSETS"/main" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" fullScreen MENU_TRUE - visible MENU_TRUE // Visible on open + + visible 0 // Visible on open focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + soundLoop "music/rq3_title_loop" + soundIntro "music/rq3_title_intro" onOpen { - transition demolist 80 108 480 0 80 108 480 280 10 10 ; - uiScript LoadDemos ; - play "sound/misc/menu1.wav" ; + play "sound/ui/whoosh3.wav" ; + uiScript stopRefresh ; } - onEsc { close demo ; open main } + onFirstShow { + setoverlaycolor 0 0 0 1 ; + fadeoverlay 0 0 0 0 0 1000 ; + setfocus btn_join ; + } + + onESC { open quit_popmenu } -//=================== -// RQ3 stuff -//=================== +//-------------------------------------------- +#include "ui/shared.h" +//-------------------------------------------- + + + //Boomstick logo + + itemDef { + style WINDOW_STYLE_SHADER + rect 280 288 120 120 + anglevectors 9 -81 + background UI_ASSETS"/logo" + forecolor 1 1 1 0.2 + decoration + visible 1 + } + + // REACTION QUAKE 3 VERSION 3.3 // + + itemdef { + group main + subgroup "main_title" + text "REACTION QUAKE 3 v3.3" + forecolor 0 0 .05 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_CENTER + textscale .4 + textalignx 120 + textaligny 24 + rect 108 144 240 36 + anglevectors 9 -81 + visible 1 + autowrapped + decoration + } itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 + group main + alignrect "main_title" ITEM_ALIGN_LEFT 0 20 240 36 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_CENTER + textscale .275 + textalignx 120 + textaligny 24 + forecolor 0 0 0.05 1 + text "(c) 2000-2005 Boomstick Studios\n\n\n\n\n" + "www.reactionquake3.com" + autowrapped + visible 1 + decoration } - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration - visible 1 - } + //Dark overlay - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } + itemDef { + style WINDOW_STYLE_FILLED + backcolor 0 0 0 0.9 + rect 0 0 640 480 + decoration + visible 1 + } - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - -} \ No newline at end of file +} diff --git a/reaction/uifiles/controls.menu b/reaction/uifiles/controls.menu new file mode 100644 index 00000000..022e5046 --- /dev/null +++ b/reaction/uifiles/controls.menu @@ -0,0 +1,495 @@ +#include "ui/menudef.h" +#include "ui/controls_common.h" +#include "ui/tabs.h" + + +//////////////////////////////////// +// +// CONSTANTS +// +// + + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define LINE_WIDTH 240 + + +//////////////////////////////////// +// +// MENU DEFINITION +// +// + +{ + menuDef { + name "controls_menu" + __CONTROLS_WINDOW_DEF__ + visible MENU_FALSE // Visible on open + + onOOBClick { close _self } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript loadControls ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide hints ; + ACTIVATE_TAB(1) ; + } + onClose { uiScript saveControls ; open _prev } + onEsc { close _self } + + onOpenSpecial { + //normal items + setItemColor "fade_alpha" forecolor 5 5 5 0 ; + timeFade "fade_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + __CONTROLS_PAPER__ + __CONTROLS_TITLE__ + + + // Line + __CONTROLS_LINE__ + + + // Hints + __CONTROLS_HINTS__ + + + + // Sub-options // + + + //Look + + ADD_TAB( + "^_L^_ook.", + "L", 1, "group2,group3,group4,group5", + alignrect "title" ITEM_ALIGN_LEFT 2 28 28 16 + ) + ADD_HINT("hint_tab1", "Settings that affect your vision", "group2,group3,group4,group5") + + + //Move + + ADD_TAB( + "^_M^_ove.", + "M", 2, "group1,group3,group4,group5", + alignrect "tab1" ITEM_ALIGN_LEFT 28 0 32 16 + ) + ADD_HINT("hint_tab2", "Settings that affect your movement", "group1,group3,group4,group5") + + //Shoot + + ADD_TAB( + "^_S^_hoot.", + "S", 3, "group1,group2,group4,group5", + alignrect "tab2" ITEM_ALIGN_LEFT 32 0 32 16 + ) + ADD_HINT("hint_tab3", "Weapon-specific controls", "group1,group2,group4,group5") + + + //Misc + + ADD_TAB( + "M^_i^_sc.", + "I", 4, "group1,group2,group3,group5", + alignrect "tab3" ITEM_ALIGN_LEFT 32 0 28 16 + ) + ADD_HINT("hint_tab4", "User interface related controls", "group1,group2,group3,group5") + + + //Reaction + + ADD_TAB( + "^_R^_eaction.", + "R", 5, "group1,group2,group3,group4", + alignrect "tab4" ITEM_ALIGN_LEFT 28 0 40 16 + ) + ADD_HINT("hint_tab5", "Things you might not see every day", "group1,group2,group3,group4") + + +/* +========================================================== + +Group # 1 - Look + +========================================================== +*/ + + // Icon + __CONTROLS_ICON__( UI_ASSETS"/icons/rq3-controls-looking", 1) + + BEGIN_SLIDER("Mouse Speed", "sensitivity", 5, 1, 30, 1, 1) + alignrect "line" ITEM_ALIGN_CENTER 56 44 112 VSIZE + ASSIGN_HINT("SliderMessage") + END_OPTION + + + BEGIN_OPTION("Smooth Mouse", "m_filter", ITEM_TYPE_YESNO, 2, 1) + OPTION_BELOW("gr1_ctrl1") + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_OPTION("Invert Mouse", "ui_mousePitch", ITEM_TYPE_YESNO, 3, 1) + OPTION_BELOW("gr1_ctrl2") + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_OPTION("Look Up", "+lookup", ITEM_TYPE_BIND, 4, 1) + OPTION_BELOW("gr1_ctrl3") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Look Down", "+lookdown", ITEM_TYPE_BIND, 5, 1) + OPTION_BELOW("gr1_ctrl4") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Mouse Look", "+mlook", ITEM_TYPE_BIND, 6, 1) + OPTION_BELOW("gr1_ctrl5") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Free Look", "cl_freelook", ITEM_TYPE_YESNO, 7, 1) + OPTION_BELOW("gr1_ctrl6") + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_OPTION("Center View", "centerview", ITEM_TYPE_BIND, 8, 1) + OPTION_BELOW("gr1_ctrl7") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Use Joystick", "in_joystick", ITEM_TYPE_YESNO, 9, 1) + OPTION_BELOW("gr1_ctrl8") + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_SLIDER("Joystick Threshold", "joy_threshold", 0.15, 0.05, 0.75, 10, 1) + OPTION_BELOW("gr1_ctrl9") + ASSIGN_HINT("SliderMessage") + END_OPTION + +/* +========================================================== + +Group # 2 - Move + +========================================================== +*/ + + // Icon + __CONTROLS_ICON__( UI_ASSETS"/icons/rq3-controls-movement", 2) + + BEGIN_OPTION("Always Run", "cl_run", ITEM_TYPE_YESNO, 1, 2) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 20 + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_OPTION("Run / Walk", "+speed", ITEM_TYPE_BIND, 2, 2) + OPTION_BELOW("gr2_ctrl1") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Walk Forward", "+forward", ITEM_TYPE_BIND, 3, 2) + OPTION_BELOW("gr2_ctrl2") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Backpedal", "+back", ITEM_TYPE_BIND, 4, 2) + OPTION_BELOW("gr2_ctrl3") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Step Left", "+moveleft", ITEM_TYPE_BIND, 5, 2) + OPTION_BELOW("gr2_ctrl4") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Step Right", "+moveright", ITEM_TYPE_BIND, 6, 2) + OPTION_BELOW("gr2_ctrl5") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Up / Jump", "+moveup", ITEM_TYPE_BIND, 7, 2) + OPTION_BELOW("gr2_ctrl6") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Down / Crouch", "+movedown", ITEM_TYPE_BIND, 8, 2) + OPTION_BELOW("gr2_ctrl7") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Turn Left", "+left", ITEM_TYPE_BIND, 9, 2) + OPTION_BELOW("gr2_ctrl8") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Turn Right", "+right", ITEM_TYPE_BIND, 10, 2) + OPTION_BELOW("gr2_ctrl9") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Sidestep / Turn", "+strafe", ITEM_TYPE_BIND, 11, 2) + OPTION_BELOW("gr2_ctrl10") + ASSIGN_HINT("keyBindStatus") + END_OPTION + +/* +========================================================== + +Group # 3 - Shoot + +========================================================== +*/ + + // Icon + __CONTROLS_ICON__( UI_ASSETS"/icons/rq3-controls-weapons", 3) + + BEGIN_OPTION("Attack", "+attack", ITEM_TYPE_BIND, 1, 3) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 20 + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Next Weapon", "weapnext", ITEM_TYPE_BIND, 2, 3) + OPTION_BELOW("gr3_ctrl1") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Previous Weapon", "weapprev", ITEM_TYPE_BIND, 3, 3) + OPTION_BELOW("gr3_ctrl2") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Autoswitch Weapons", "cg_autoswitch", ITEM_TYPE_YESNO, 4, 3) + OPTION_BELOW("gr3_ctrl3") + ASSIGN_HINT("YesNoMessage") + END_OPTION + + + BEGIN_OPTION("MK23 Pistol", "weapon 1", ITEM_TYPE_BIND, 5, 3) + OPTION_BELOW("gr3_ctrl4") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("M3 Assault Shotgun", "weapon 2", ITEM_TYPE_BIND, 6, 3) + OPTION_BELOW("gr3_ctrl5") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("MP5/10 Sub", "weapon 3", ITEM_TYPE_BIND, 7, 3) + OPTION_BELOW("gr3_ctrl6") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Handcannon", "weapon 4", ITEM_TYPE_BIND, 8, 3) + OPTION_BELOW("gr3_ctrl7") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("SSG Sniper Rifle", "weapon 5", ITEM_TYPE_BIND, 9, 3) + OPTION_BELOW("gr3_ctrl8") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("M4 Assault Rifle", "weapon 6", ITEM_TYPE_BIND, 10, 3) + OPTION_BELOW("gr3_ctrl9") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Dual MK23 Pistols", "weapon 7", ITEM_TYPE_BIND, 11, 3) + OPTION_BELOW("gr3_ctrl10") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Combat Knife", "weapon 8", ITEM_TYPE_BIND, 12, 3) + OPTION_BELOW("gr3_ctrl11") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("M26 Grenade", "weapon 9", ITEM_TYPE_BIND, 13, 3) + OPTION_BELOW("gr3_ctrl12") + ASSIGN_HINT("keyBindStatus") + END_OPTION + +/* +========================================================== + +Group # 4 - Misc + +========================================================== +*/ + + // Icon + __CONTROLS_ICON__( UI_ASSETS"/icons/rq3-controls-misc", 4) + + BEGIN_OPTION("Show Scores", "scores", ITEM_TYPE_BIND, 1, 4) + alignrect "line" ITEM_ALIGN_CENTER 56 44 112 20 + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Show Scores", "+button3", ITEM_TYPE_BIND, 2, 4) + OPTION_BELOW("gr4_ctrl1") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Chat", "messagemode", ITEM_TYPE_BIND, 3, 4) + OPTION_BELOW("gr4_ctrl2") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Chat - Team", "messagemode2", ITEM_TYPE_BIND, 4, 4) + OPTION_BELOW("gr4_ctrl3") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Chat - Target", "messagemode3", ITEM_TYPE_BIND, 5, 4) + OPTION_BELOW("gr4_ctrl4") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Chat - Attacker", "messagemode4", ITEM_TYPE_BIND, 6, 4) + OPTION_BELOW("gr4_ctrl5") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Screenshot", "screenshot", ITEM_TYPE_BIND, 7, 4) + OPTION_BELOW("gr4_ctrl6") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Screenshot - JPEG", "screenshotJPEG", ITEM_TYPE_BIND, 8, 4) + OPTION_BELOW("gr4_ctrl7") + ASSIGN_HINT("keyBindStatus") + END_OPTION + +/* +========================================================== + +Group # 5 - Reaction + +========================================================== +*/ + + // Icon + __CONTROLS_ICON__( UI_ASSETS"/icons/rq3-controls-reaction", 5) + + BEGIN_OPTION("Bandage", "bandage", ITEM_TYPE_BIND, 1, 5) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 20 + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Reload", "+button5", ITEM_TYPE_BIND, 2, 5) + OPTION_BELOW("gr5_ctrl1") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Weapon Mode", "weapon", ITEM_TYPE_BIND, 3, 5) + OPTION_BELOW("gr5_ctrl2") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Open Door", "opendoor", ITEM_TYPE_BIND, 4, 5) + OPTION_BELOW("gr5_ctrl3") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Drop Weapon", "dropweapon", ITEM_TYPE_BIND, 5, 5) + OPTION_BELOW("gr5_ctrl4") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Drop Item", "dropitem", ITEM_TYPE_BIND, 6, 5) + OPTION_BELOW("gr5_ctrl5") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("IR Vision", "irvision", ITEM_TYPE_BIND, 7, 5) + OPTION_BELOW("gr5_ctrl6") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Special Weapon Cycle", "specialweapon", ITEM_TYPE_BIND, 8, 5) + OPTION_BELOW("gr5_ctrl7") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Weapon/Item Choice", "ui_RQ3_loadout", ITEM_TYPE_BIND, 9, 5) + OPTION_BELOW("gr5_ctrl8") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Join Team", "ui_RQ3_joinTeam", ITEM_TYPE_BIND, 10, 5) + OPTION_BELOW("gr5_ctrl9") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Presets Menu", "ui_RQ3_presets", ITEM_TYPE_BIND, 11, 5) + OPTION_BELOW("gr5_ctrl10") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + +} +} diff --git a/reaction/uifiles/controls_common.h b/reaction/uifiles/controls_common.h new file mode 100644 index 00000000..60f87bf7 --- /dev/null +++ b/reaction/uifiles/controls_common.h @@ -0,0 +1,99 @@ + +#define __CONTROLS_WINDOW_DEF__ \ + focusColor RQ3_MAIN_FOCUSCOLOR \ + rect 140 80 300 348 \ + anglevectors 5 -85 \ + style WINDOW_STYLE_EMPTY \ + popup + + +#define __CONTROLS_PAPER__ \ + itemDef { \ + menuAnchor \ + renderpoint \ + name "paper" \ + subgroup "fade_alpha" \ + style WINDOW_STYLE_SHADER \ + background UI_ASSETS"/paper_1" \ + forecolor MENUCOLOR_CONTROLS 1 \ + rect 0 -20 320 420 \ + anglevectors 5 -85 \ + visible 1 \ + decoration \ + } + + +#define __CONTROLS_TITLE__ \ + itemdef { \ + renderpoint \ + name "title" \ + subgroup "fade_alpha" \ + text "Controls:" \ + forecolor .6 .0 .0 1 \ + style WINDOW_STYLE_EMPTY \ + textalign ITEM_ALIGN_LEFT \ + textalignx 4 \ + textaligny 24 \ + textscale RQ3_MAIN_TEXTSIZE \ + alignrect paper ITEM_ALIGN_LEFT 32 40 240 36 \ + visible 1 \ + autowrapped \ + decoration \ + } + +#define __CONTROLS_LINE__ \ + itemDef { \ + name "line" \ + subgroup "fade_alpha" \ + style WINDOW_STYLE_FILLED \ + backcolor .25 .25 .25 LINE_ALPHA \ + alignrect "title" ITEM_ALIGN_LEFT 0 48 LINE_WIDTH 2 \ + visible 1 \ + decoration \ + } + +#define __CONTROLS_ICON__(ICON_SHADER, ICON_GROUP) \ + itemdef { \ + name "icon,allgroups,group"#ICON_GROUP \ + background ICON_SHADER \ + forecolor 1 1 1 ICON_ALPHA \ + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 \ + style WINDOW_STYLE_SHADER \ + visible 1 \ + decoration \ + } + +#define BEGIN_HINT(HINT_NAME)\ + itemdef { \ + name HINT_NAME \ + autowrapped \ + group "hints" \ + subgroup "fade_alpha" \ + forecolor HINT_COLOR 1 \ + textalign ITEM_ALIGN_LEFT \ + textalignx 6 \ + textaligny 10 \ + textscale .2 \ + alignrect "line" ITEM_ALIGN_LEFT 0 8 220 40 \ + style WINDOW_STYLE_EMPTY \ + visible 0 \ + decoration + +#define END_HINT\ + } + +#define __CONTROLS_HINTS__ \ + BEGIN_HINT(keyBindStatus) \ + ownerdraw UI_KEYBINDSTATUS \ + END_HINT \ + BEGIN_HINT(YesNoMessage) \ + text "Click to toggle Yes/No" \ + END_HINT \ + BEGIN_HINT(SliderMessage) \ + text "Drag the slider to increase/decrease" \ + END_HINT + +//#define ASSIGN_HINT(HINT_NAME)\ +// onFocus { show HINT_NAME ; timeFade HINT_NAME forecolor 5 5 5 1 0 HINT_FADE_TIME } \ +// leaveFocus { timeFade HINT_NAME forecolor 5 5 5 0 0 HINT_FADE_TIME } + diff --git a/reaction/uifiles/createserver.menu b/reaction/uifiles/createserver.menu index 436c5421..1a79ca64 100644 --- a/reaction/uifiles/createserver.menu +++ b/reaction/uifiles/createserver.menu @@ -1,4 +1,638 @@ #include "ui/menudef.h" +#include "ui/tabs.h" + +#define TEXT_COLOR 0 0 0 +#define LINE_WIDTH 260 + +#define ANGLES -7 -97 + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +//#define LINE_WIDTH 240 +{ + + menuDef { + renderpoint + name "createserver" + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 160 8 560 440 + anglevectors ANGLES + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open _prev } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript "loadArenas" ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide "hints" ; + ACTIVATE_TAB(1) ; + } + onEsc { uiScript closeJoin } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_MOD 1 + rect -16 -16 360 500 + anglevectors ANGLES + visible 1 + decoration + } + + //Title + + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Host a game:" + forecolor .0 .0 .1 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignRect paper ITEM_ALIGN_LEFT 28 44 480 20 + visible 1 + autowrapped + decoration + } + + //Line + + itemDef { + name "line" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 56 LINE_WIDTH 2 + visible 1 + decoration + } + + //Icon used to be here + + + itemdef { + name icon + background UI_ASSETS"/icons/rq3-menu-start.tga" + forecolor 1 1 1 ICON_ALPHA + //rect 336 12 32 32 + alignrect "line" ITEM_ALIGN_RIGHT 0 -32 32 32 + style WINDOW_STYLE_SHADER + visible 0 + decoration + } + + + // GO // + + itemdef { + name "btn_run,allgroups,group3" + subgroup "fade_fore_alpha" + text "> ^_G^_O <" + shortcutKey "G" + forecolor .5 0 0 1 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_RIGHT + textscale .25 + textalignx 36 + textaligny 14 + alignRect line ITEM_ALIGN_RIGHT 0 -28 40 24 + visible 1 + autowrapped + action { uiScript StartServer } + } + + //map + + ADD_TAB( + "^_1^_. Map.", + "M", 1, "group2,group3", + alignrect "title" ITEM_ALIGN_LEFT 2 32 36 20 + ) + ADD_HINT("hint_tab1", "Step 1 : map selection", "group2,group3") + + + //Gameplay + + ADD_TAB( + "^_2^_.Gameplay.", + "G", 2, "group1,group3", + alignrect "tab1" ITEM_ALIGN_LEFT 40 0 56 16 + ) + ADD_HINT("hint_tab2", "Step 2 : gameplay options", "group1,group3") + + //Advanced + + ADD_TAB( + "^_3^_.Advanced.", + "A", 3, "group1,group2", + alignrect "tab2" ITEM_ALIGN_LEFT 64 0 56 16 + ) + ADD_HINT("hint_tab3", "Final step : configure advanced options", "group1,group2") + +/* +========================================================== + +Group # 1 + +========================================================== +*/ + // Map list // + + itemdef { + name "maplist" + subgroup "fade_fore_alpha,group1,allgroups" + LISTBOX_STYLE(.225, 8) + alignrect "line" ITEM_ALIGN_RIGHT 4 88 128 200 + feeder FEEDER_ALLMAPS + visible 1 + columns 1 2 140 22 + ASSIGN_HINT("hint_maps") + } + + ADD_HINT("hint_maps", "Select a map", "group1") + + itemDef { + renderpoint + name "postit" + group "fade_fore_alpha,group1,allgroups" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/post_it" + forecolor .85 .85 .85 1 + rect -60 204 188 160 + anglevectors 7 -83 + visible 1 + decoration + } + + //Title + + itemdef { + renderpoint + name "static" + subgroup "fade_fore_alpha,group1,allgroups" + text "Map:" + forecolor .0 .0 .1 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 8 + textaligny 4 + textscale .225 + alignRect "postit" ITEM_ALIGN_LEFT 28 20 100 32 + visible 1 + decoration + } + + + itemdef { + name map_preview + //group "fade_fore_alpha" + subgroup "fade_fore_alpha,group1,allgroups" + alignrect postit ITEM_ALIGN_LEFT 40 40 96 72 + ownerdraw UI_STARTMAPCINEMATIC + style WINDOW_STYLE_EMPTY + decoration + visible 1 + } + + // Host name + + itemdef { + name "host_caption" + group "fade_fore_alpha,group1,allgroups" + style 0 + text "Host Name:" + alignrect "line" ITEM_ALIGN_LEFT 16 36 208 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemdef { + name "host_dots" + group "fade_fore_alpha,group1,allgroups" + style 0 + text ".............................................." + alignrect "host_caption" ITEM_ALIGN_RIGHT 0 0 168 20 + textscale .225 + textalign ITEM_ALIGN_RIGHT + textalignx 198 + textaligny 20 + forecolor OPTION_COLOR + visible 1 + decoration + } + + itemdef { + //name "host_field" + //BEGIN_SIMPLE_OPTION(1, 1) + name "allgroups,group1,gr1_ctrl1,fade_alpha" + group "fade_fore_alpha,group1,allgroups" + alignrect "host_caption" ITEM_ALIGN_RIGHT -32 0 168 20 + type ITEM_TYPE_EDITFIELD + style 0 + text "" + cvar "sv_hostname" + backcolor 0 0 0 .1 + forecolor 0 0 0 1 + outlinecolor 0 0 1 .5 + border 0 + textstyle 0 + maxChars 32 + maxPaintChars 18 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + visible 1 + ASSIGN_HINT("hint_hostname") + } + + ADD_HINT("hint_hostname", "Specifies the name of the server as shown in the server browser", "group1") + + // Gametype + + BEGIN_OPTION("Gametype", "g_gametype", ITEM_TYPE_MULTI, 2, 1) + //OPTION_BELOW("gr1_ctrl1") + alignrect "host_caption" ITEM_ALIGN_LEFT 64 24 208 20 + //cvarFloatList { + // "Deathmatch" 0 + // "Team Deathmatch" 3 + // "Teamplay (TP)" 4 + // "Capture the Briefcase (CTB)" 5 + //} + ownerdraw UI_NETGAMETYPE + ASSIGN_HINT("hint_gametype") + END_OPTION + ADD_HINT("hint_gametype", "Sets the general mode of gameplay", "group1") + +/* +========================================================== + +Group # 2 + +========================================================== +*/ + //Max players + + BEGIN_OPTION("Maximum Players", "sv_maxclients", ITEM_TYPE_NUMERICFIELD, 1, 2) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE + maxChars 4 + ASSIGN_HINT("hint_maxclients") + END_OPTION + ADD_HINT("hint_maxclients", "The maximum number of players allowed on your server at once", "group2") + + // Time limit + + BEGIN_OPTION("Time Limit", "timelimit", ITEM_TYPE_NUMERICFIELD, 2, 2) + OPTION_BELOW("gr2_ctrl1") + maxChars 4 + ASSIGN_HINT("hint_time") + END_OPTION + ADD_HINT("hint_time", "Sets the amount of time in minutes that each map will take (Set to 0 for no limit)", "group2") + + // Gametype-specific options + + // Deathmatch + // Frag limit + + BEGIN_OPTION("Frag Limit", "fraglimit", ITEM_TYPE_NUMERICFIELD, 3, 2) + OPTION_BELOW("gr2_ctrl2") + maxChars 4 + ASSIGN_HINT("hint_frag") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "0" } + END_OPTION + ADD_HINT("hint_frag", "Sets the amount of frags needed to win (Set to 0 for no limit)", "group2") + + + // Capture the Briefcase + // Capture limit + + BEGIN_OPTION("Capture Limit", "capturelimit", ITEM_TYPE_NUMERICFIELD, 4, 2) + OPTION_BELOW("gr2_ctrl2") + maxChars 4 + ASSIGN_HINT("hint_capture") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "5" } + END_OPTION + ADD_HINT("hint_capture", "Sets the number of briefcase captures that must be reached to win", "group2") + + // Force join + + BEGIN_OPTION("Force Join", "g_teamautojoin", ITEM_TYPE_YESNO, 5, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl4") + ASSIGN_HINT("hint_autojoin") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "5" } + END_OPTION + ADD_HINT("hint_autojoin", "Force players to automatically join a team on connect", "group2") + + // Even teams + + BEGIN_OPTION("Even Teams", "g_teamforcebalance", ITEM_TYPE_YESNO, 6, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl5") + ASSIGN_HINT("hint_even") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "5" } + END_OPTION + ADD_HINT("hint_even", "Force team balancing", "group2") + + // Friendly fire + + BEGIN_OPTION("Friendly Fire", "g_friendlyfire", ITEM_TYPE_MULTI, 7, 2) + OPTION_BELOW("gr2_ctrl6") + cvarFloatList { + "Off" 0 + "Off/knockback" 2 + "On" 1 + } + ASSIGN_HINT("hint_ff") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "5" } + END_OPTION + ADD_HINT("hint_ff", "Determines if players can damage their own teammates", "group2") + + // Bandolier grenades + + BEGIN_OPTION("Bandolier Grenades", "g_RQ3_tgren", ITEM_TYPE_MULTI, 8, 2) + OPTION_BELOW("gr2_ctrl7") + cvarFloatList { + "1" 1 + "2" 2 + "None" 0 + } + ASSIGN_HINT("hint_tgren") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "5" } + END_OPTION + ADD_HINT("hint_tgren", "Sets the number of grenades that come with the bandolier", "group2") + + + // Team Deathmatch + // Frag limit + + BEGIN_OPTION("Frag Limit", "fraglimit", ITEM_TYPE_NUMERICFIELD, 9, 2) + OPTION_BELOW("gr2_ctrl2") + maxChars 4 + ASSIGN_HINT("hint_frag") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + + // Force join + + BEGIN_OPTION("Force Join", "g_teamautojoin", ITEM_TYPE_YESNO, 10, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl9") + ASSIGN_HINT("hint_autojoin") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + + // Even teams + + BEGIN_OPTION("Even Teams", "g_teamforcebalance", ITEM_TYPE_YESNO, 11, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl10") + ASSIGN_HINT("hint_even") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + + // Friendly fire + + BEGIN_OPTION("Friendly Fire", "g_friendlyfire", ITEM_TYPE_MULTI, 12, 2) + OPTION_BELOW("gr2_ctrl11") + cvarFloatList { + "Off" 0 + "Off/knockback" 2 + "On" 1 + } + ASSIGN_HINT("hint_ff") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + + // Bandolier grenades + + BEGIN_OPTION("Bandolier Grenades", "g_RQ3_tgren", ITEM_TYPE_MULTI, 13, 2) + OPTION_BELOW("gr2_ctrl12") + cvarFloatList { + "1" 1 + "2" 2 + "None" 0 + } + ASSIGN_HINT("hint_tgren") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + + // Team Deathmatch Mode + + BEGIN_OPTION("TeamDM Mode", "g_RQ3_tdmMode", ITEM_TYPE_MULTI, 14, 2) + OPTION_BELOW("gr2_ctrl13") + cvarFloatList { + "Classic" 0 + "TP Style" 1 + } + ASSIGN_HINT("hint_tdm_mode") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "3" } + END_OPTION + ADD_HINT("hint_tdm_mode", "Toggles TP/DM Style weapon/item selection", "group2") + + // RQ3 Teamplay + // Round limit + + BEGIN_OPTION("Round Limit", "g_RQ3_roundlimit", ITEM_TYPE_NUMERICFIELD, 15, 2) + OPTION_BELOW("gr2_ctrl2") + maxChars 4 + ASSIGN_HINT("hint_rounds") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + ADD_HINT("hint_rounds", "The map will end when one of the teams wins this many rounds", "group2") + + // Round time limit + + BEGIN_OPTION("Round Time Limit", "g_RQ3_roundTimeLimit", ITEM_TYPE_NUMERICFIELD, 16, 2) + OPTION_BELOW("gr2_ctrl15") + maxChars 4 + ASSIGN_HINT("hint_roundtime") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + ADD_HINT("hint_roundtime", "Each round will end after this many minutes", "group2") + + // Force join + + BEGIN_OPTION("Force Join", "g_teamautojoin", ITEM_TYPE_YESNO, 17, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl16") + ASSIGN_HINT("hint_autojoin") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + + // Even teams + + BEGIN_OPTION("Even Teams", "g_teamforcebalance", ITEM_TYPE_YESNO, 18, 2) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr2_ctrl17") + ASSIGN_HINT("hint_even") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + + // Friendly fire + + BEGIN_OPTION("Friendly Fire", "g_friendlyfire", ITEM_TYPE_MULTI, 19, 2) + OPTION_BELOW("gr2_ctrl18") + cvarFloatList { + "Off" 0 + "Off/knockback" 2 + "On" 1 + } + ASSIGN_HINT("hint_ff") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + + // Bandolier grenades + + BEGIN_OPTION("Bandolier Grenades", "g_RQ3_tgren", ITEM_TYPE_MULTI, 20, 2) + OPTION_BELOW("gr2_ctrl19") + cvarFloatList { + "1" 1 + "2" 2 + "None" 0 + } + ASSIGN_HINT("hint_tgren") + //cvarTest "g_gametype" + cvarTest "ui_actualNetGameType" + showCvar { "4" } + END_OPTION + + +/* +========================================================== + +Group # 3 + +========================================================== +*/ + + // Pure server + + BEGIN_OPTION("Pure Server", "sv_pure", ITEM_TYPE_YESNO, 1, 3) + kind YESNO_ICON_RIGHT + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE + ASSIGN_HINT("hint_pure") + END_OPTION + ADD_HINT("hint_pure", "Enable Pure Server to ensure that the content on client machines match the content on your server", "group3") + + // Allow download + + BEGIN_OPTION("Allow Download", "sv_allowdownload", ITEM_TYPE_YESNO, 2, 3) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr3_ctrl1") + ASSIGN_HINT("hint_download") + END_OPTION + ADD_HINT("hint_download", "Allows clients to download missing content from the server", "group3") + + // Allow voting + + BEGIN_OPTION("Allow Voting", "g_allowvote", ITEM_TYPE_YESNO, 3, 3) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr3_ctrl2") + ASSIGN_HINT("hint_vote") + END_OPTION + ADD_HINT("hint_vote", "Allows players to call votes for map changes, restarting games, and other options", "group3") + + // Password + + BEGIN_OPTION("Require Password", "g_needpass", ITEM_TYPE_YESNO, 4, 3) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr3_ctrl3") + ASSIGN_HINT("hint_needpass") + END_OPTION + ADD_HINT("hint_needpass", "Specifies whether the password is needed in order to connect to your server", "group3") + + BEGIN_OPTION("Password", "g_password", ITEM_TYPE_EDITFIELD, 5, 3) + OPTION_BELOW("gr3_ctrl4") + maxChars 32 + maxPaintChars 12 + ASSIGN_HINT("hint_pass") + END_OPTION + ADD_HINT("hint_pass", "Sets a password for the server", "group3") + + // Synchronous clients + + BEGIN_OPTION("Synchronous Clients", "g_synchronousclients", ITEM_TYPE_YESNO, 6, 3) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr3_ctrl5") + ASSIGN_HINT("hint_sync") + END_OPTION + ADD_HINT("hint_sync", "Toggles synchronization of all clients to allow demo recording on the server", "group3") + + +} + +} + + +#if 0 +#include "ui/menudef.h" + { @@ -42,7 +676,7 @@ name top_bar //rq3: Top bar rect 0 58 640 12 style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" + background UI_ASSETS"/rq3-main-shadow-1" decoration visible 1 } @@ -87,7 +721,7 @@ name "join_icon" style WINDOW_STYLE_SHADER rect 8 8 48 48 - background "menu/art/rq3-menu-start.tga" + background UI_ASSETS"/icons/rq3-menu-start.tga" decoration visible 1 } @@ -96,7 +730,7 @@ name "join_title" style WINDOW_STYLE_SHADER rect 64 12 256 32 - background "menu/art/rq3-title-start.tga" + background UI_ASSETS"/icons/rq3-title-start.tga" decoration visible 1 } @@ -1099,11 +1733,11 @@ style WINDOW_STYLE_SHADER rect 560 432 64 32 type 1 - background "menu/art/rq3-menu-go.tga" + background UI_ASSETS"/icons/rq3-menu-go.tga" action { uiScript StartServer ; } - onFocus { setbackground "menu/art/rq3-menu-go-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-go-focus-anim" ; show start_hint ; timeFade start_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-go.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-go.tga" ; timeFade start_hint forecolor .9 .9 .9 0 0 250 } visible 1 } @@ -1177,11 +1811,11 @@ style WINDOW_STYLE_SHADER rect 12 432 32 32 type 1 - background "menu/art/rq3-menu-back.tga" + background UI_ASSETS"/icons/rq3-menu-back.tga" action { close _self ; open main ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-back-focus-anim" ; show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-back.tga" ; timeFade back_hint forecolor .9 .9 .9 0 0 250 } visible 1 } @@ -1203,4 +1837,6 @@ } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/reaction/uifiles/credit.menu b/reaction/uifiles/credit.menu index a8d4c4c6..b07c2eb3 100644 --- a/reaction/uifiles/credit.menu +++ b/reaction/uifiles/credit.menu @@ -4,7 +4,7 @@ menuDef { name "credit" - background UI_ASSETS"/main" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" + background UI_ASSETS"/main_new" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" // to use the current background fullScreen 1 visible 0 // Visible on open @@ -17,24 +17,22 @@ onOpen { uiScript "backupMusicVolume" ; play "sound/ui/whoosh3.wav" ; - //exec "s_musicvolume 1" ; + //exec "set s_musicvolume 1" ; playlooped "music/sonic1" ; - //transition hint 0 -40 640 40 0 10 640 40 20 10 ; + transition hint 0 "-40" 640 40 0 0 640 40 20 10 ; //hide timer ; - startTimer ; + startTimer } onShow { setitemcolor main forecolor 5 5 5 0 ; timefade main forecolor 5 5 5 1 0 500 ; - setitemcolor overlay backcolor 0 0 0 .5 ; - timeFade overlay backcolor 0 0 0 1 0 20000 ; } - //onClose { uiScript "restoreMusicVolume" } - //onEsc { uiScript "restoreMusicVolume" ; stopTimer ; close credit ; uiScript "quit" } + onClose { uiScript "restoreMusicVolume" } + onEsc { uiScript "restoreMusicVolume" ; stopTimer ; close credit ; uiScript "quit" } //onEsc { uiScript "restoreMusicVolume" ; stopTimer ; close credit ; open main } - onEsc { uiScript "restoreMusicVolume" ; stopTimer ; close _self ; open _prev } + //onEsc { uiScript "restoreMusicVolume" ; stopTimer ; close _self ; open _prev } @@ -70,7 +68,7 @@ itemDef { style WINDOW_STYLE_SHADER - rect 280 288 120 120 + rect 276 288 120 120 anglevectors 9 -81 background UI_ASSETS"/logo" forecolor 1 1 1 0.2 @@ -83,8 +81,9 @@ itemdef { group main subgroup "main_title" - text "REACTION QUAKE 3 v3.3" - forecolor 0 0 .05 1 + //text "REACTION QUAKE 3 v3.3" + text "REACTION v1.0" + forecolor 0 0 .05 1 style WINDOW_STYLE_EMPTY textalign ITEM_ALIGN_CENTER textscale .4 @@ -107,8 +106,8 @@ textalignx 120 textaligny 24 forecolor 0 0 0.05 1 - text "(c) 2000-2005 Boomstick Studios\n\n\n\n\n" - "www.reactionquake3.com" + text "(c) 2000-2009 Boomstick Studios\n\n\n\n\n" + "www.rq3.com" autowrapped visible 1 decoration @@ -164,10 +163,10 @@ textaligny 24 forecolor 0 0 0.1 1 text "Richard Allen\n" + "Andrei Drexler\n" "Bryce Hutchings\n" "Scott Brooks\n" "Victor Chow\n" - "Andrei Drexler\n" "Bruno Covacha\n" "Daniel Simoes" autowrapped @@ -186,10 +185,10 @@ textaligny 24 forecolor 0 0 0.1 1 text "JBravo\n" + "Makro\n" "NiceAss\n" "Blaze\n" "Elder_MMHS\n" - "Makro\n" "aasimon\n" "sLiCeR" autowrapped @@ -247,6 +246,7 @@ "Dan Chin\n" "Malcolm Bechard\n" "Tomas Edwardsson\n" + "Tomi Isoaho\n" autowrapped visible 1 decoration @@ -266,6 +266,7 @@ "Lt. Hawkins\n" "Tsunami\n" "Freud\n" + "T.T.I.\n" autowrapped visible 1 decoration @@ -317,12 +318,14 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Ian McEachern\n" + text "Mark Potnick\n" + "Andrei Drexler\n" + "Tomi Isoaho\n" + "Paul Greveson\n" "Brian Mills\n" "Linh Nguyen\n" - "Mark Potnick\n" + "Ian McEachern\n" "Ryan Vance\n" - "Paul Greveson\n" autowrapped visible 1 decoration @@ -338,12 +341,14 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Frost\n" + text "Cloud\n" + "Makro\n" + "T.T.I.\n" + "MoP\n" "Birdman\n" "Sonique128\n" - "Cloud\n" + "Frost\n" "BraGoblin\n" - "MoP\n" autowrapped visible 1 decoration @@ -394,18 +399,19 @@ textscale .3 textalignx 112 textaligny 24 + textHeight 20 forecolor 0 0 0.1 1 text "Scott DeLeury\n" - "Tomi Isoaho\n" "Christopher\nJayawardena\n" "Shay McCarty\n" + "Johnny Pesola\n" "Malcolm Ramsay\n" "Jesse Smith\n" "Jaymz Plummer\n" "Hannu Saarinen\n" "Henri Tervapuro\n" "Julien\n" - "Kyle VanMeurs" + "Kyle VanMeurs\n" autowrapped visible 1 decoration @@ -420,18 +426,19 @@ textscale .3 textalignx 96 textaligny 24 + textHeight 20 forecolor 0 0 0.1 1 text "CannonFodder\n" - "T.T.I.\n" "EvilFutsin\n\n" "Shaymon\n" + "jopes\n" "shenka\n" "Spyder\n" "LST\n" "Presenter\n" "Leon\n" "Zenogaist-Zero\n" - "R0oK" + "R0oK\n" autowrapped visible 1 decoration @@ -483,17 +490,16 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "David Costello\n" + text "Tomi Isoaho\n" "Andrei Drexler\n" "Alexander Axelsson\n" - "Tomi Isoaho\n" + "Walter Somol\n" + "Jordan Zylstra\n" + "Jesse Smith\n" "Shay McCarty\n" "David Pike\n" "Kelly Rush\n" - "Jesse Smith\n" - "Walter Somol\n" - "Jordan Zylstra\n" - "Geraldo Espinal\n" + "David Costello\n" autowrapped visible 1 decoration @@ -509,17 +515,16 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Sze\n" + text "T.T.I.\n" "Makro\n" "Lognoreng\n" - "T.T.I.\n" + "Johnny Rocket\n" + "Guy Incognito\n" + "Spyder\n" "Shaymon\n" "Centurion\n" "Hexydes\n" - "Spyder\n" - "Johnny Rocket\n" - "Guy Incognito\n" - "WarMachine\n" + "Sze\n" autowrapped visible 1 decoration @@ -555,7 +560,7 @@ textalignx 120 textaligny 24 textscale RQ3_MAIN_TEXTSIZE - alignrect "t7_paper" ITEM_ALIGN_CENTER -28 80 240 36 + alignrect "t7_paper" ITEM_ALIGN_CENTER -16 80 240 36 visible 1 autowrapped decoration @@ -571,11 +576,15 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Jason Irby\n" + textHeight 20 + text "Tomi Vainikka\n" + "Daniel Platt\n" + "Johnny Pesola\n" + "Chris Polan\n" "Gregory Simmons\n" "John Gilbertson\n" - "Tomi Vainikka\n" - "Chris Polan\n" + "Jason Irby\n" + "Geraldo Espinal\n" autowrapped visible 1 decoration @@ -591,18 +600,22 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Irby\n" + textHeight 20 + text "zakath\n" + "voodoochopstiks\n" + "jopes\n" + "God Incarnate\n" "Smoke\n" "Homicide\n" - "Zakath\n" - "God Incarnate\n" + "Irby\n" + "WarMachine\n" autowrapped visible 1 decoration } - - + + // SOUND DESIGN // itemDef { @@ -648,7 +661,8 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Erwin Peil\n" + text "Ryan Buckley\n" + "Erwin Peil\n" "Andre Beardsley-Dusette\n" "Caryn Law" autowrapped @@ -667,7 +681,8 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "SpecOps\n" + text "Foxfingers\n" + "SpecOps\n" "Nicodem-X\n" "Hellchick" autowrapped @@ -721,7 +736,8 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Jesse Smith" + text "Rob Anastasi\n" + "Jesse Smith" autowrapped visible 1 decoration @@ -737,7 +753,8 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Spyder" + text "Baka\n" + "Spyder" autowrapped visible 1 decoration @@ -861,7 +878,8 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Victor Chow\n" + text "Tomi Isoaho\n" + "Victor Chow\n" "Christopher A.\n" "Strickler\n" "Malcolm Ramsay\n" @@ -883,7 +901,8 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Elder_MMHS\n" + text "T.T.I.\n" + "Elder_MMHS\n" "Preacher\n" "\n" "shenka\n" @@ -1015,11 +1034,11 @@ textalignx 112 textaligny 24 forecolor 0 0 0.1 1 - text "Alexander Bergereau\n" + text "Rob Anastasi\n" + "Alexander Bergereau\n" "Mark Somol\n" "Andrew Harrell\n" - "Christopher\n" - "Jayawardena\n" + "Christopher\nJayawardena\n" "Justin Pickles\n" "Michael Morris\n" "Paul Greveson\n" @@ -1040,11 +1059,11 @@ textalignx 96 textaligny 24 forecolor 0 0 0.1 1 - text "Arild\n" + text "Baka\n" + "Arild\n" "ColdMiser\n" "EdgeCrusher\n" - "EvilFutsin\n" - "\n" + "EvilFutsin\n\n" "GoKu^^*L\n" "JesterRace\n" "MoP\n" @@ -1130,7 +1149,7 @@ "Homicide\n" "Mud\n" "WizardExt\n" - "Zakath\n" + "zakath\n" "ShishKabob" autowrapped visible 1 @@ -1351,7 +1370,7 @@ textalignx 120 textaligny 24 textscale RQ3_MAIN_TEXTSIZE - alignrect t19_paper ITEM_ALIGN_CENTER -20 48 240 36 + alignrect t19_paper ITEM_ALIGN_CENTER -40 48 240 36 visible 1 autowrapped decoration @@ -1364,9 +1383,10 @@ style WINDOW_STYLE_EMPTY textalign ITEM_ALIGN_RIGHT textscale .3 - textalignx 76 + textalignx 96 textaligny 24 forecolor 0 0 0.1 1 + textHeight 20 text "A-TEAM\n" "ZCam\n" "Unlagged\n" @@ -1383,9 +1403,10 @@ style WINDOW_STYLE_EMPTY textalign ITEM_ALIGN_LEFT textscale .3 - textalignx 100 + textalignx 120 textaligny 24 forecolor 0 0 0.1 1 + textHeight 20 text "Dwayne Douglass\n" "Avi 'Zung!' Rozen\n" "Neil 'haste' Toronto\n" @@ -1464,6 +1485,7 @@ group timer subgroup "t21_title" text "ART RESOURCES\n\n" + "CG Textures\n" "Mastaba Solutions\n" "PolyCount\n" "QWorkShop3\n" @@ -1706,6 +1728,7 @@ timeFade hint forecolor .25 .25 .25 5 0 1000 ; } onTimerHide { + hide "_common_" ; } } @@ -1925,7 +1948,7 @@ textalignx 220 textaligny 80 text "THIS HAS BEEN A BOOMSTICK STUDIOS\nPRODUCTION\n\n" - "Copyright 2000 - 2005" + "Copyright 2000 - 2009" autowrapped visible 1 decoration @@ -1956,6 +1979,7 @@ forecolor 1 1 1 1 rect 0 0 640 480 visible 0 + randomizeTexCoords decoration } diff --git a/reaction/uifiles/demo.menu b/reaction/uifiles/demo.menu index 5f36586b..84acef5d 100644 --- a/reaction/uifiles/demo.menu +++ b/reaction/uifiles/demo.menu @@ -1,266 +1,182 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 + { menuDef { + renderpoint name "demo" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the current background - fullScreen MENU_TRUE - visible MENU_TRUE // Visible on open - focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items - - - onOpen { - uiScript LoadDemos ; - play "sound/misc/menu1.wav" ; - } - - onEsc { close demo ; open main } - - -//=================== -// RQ3 stuff -//=================== - - - itemdef { - name overlay - style 1 - forecolor 0 0 0 1 - backcolor RQ3_MENU_OVERLAY_COLOR - rect 0 58 640 360 - visible 1 - decoration - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration - visible 1 - } - - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemdef { - name "demos_icon" - style WINDOW_STYLE_SHADER - rect 8 8 48 48 - background "menu/art/rq3-menu-demos.tga" - decoration - visible 1 - } - - itemdef { - name "demos_title" - style WINDOW_STYLE_SHADER - rect 64 12 256 32 - background "menu/art/rq3-title-demos.tga" - decoration - visible 1 - } - -//================= -// Buttons, lists -//================= - - -//Window - - itemdef { - rect 170 100 300 240 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - shadowStyle 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - text "Available demos:" - textscale .25 - type 0 + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 52 112 280 340 + anglevectors 12 -78 style WINDOW_STYLE_EMPTY - rect 182 108 276 24 - forecolor 1 1 1 1 - textstyle 0 - textalign 0 - textalignx 8 - textaligny 16 - decoration + popup + + onOOBClick { close _self ; open main } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript LoadDemos ; + setitemcolor hints forecolor .9 .9 .9 1 ; hide hints ; + hide focus } + onEsc { close _self ; open main } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + + + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_DEMO 1 + rect -16 -20 320 420 + anglevectors 12 -78 visible 1 + decoration } -//Demo list + //Title + + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Demo playback:" + forecolor .0 .0 .1 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignRect paper ITEM_ALIGN_CENTER -12 40 220 20 + visible 1 + autowrapped + decoration + } + + //Hint + + itemdef { + text "Select a demo from the list below\n" + "and press the Play button" + autowrapped + subgroup "fade_fore_alpha" + forecolor .25 .25 .25 1 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 12 + textscale .2 + alignrect "title" ITEM_ALIGN_LEFT 0 28 220 16 + style WINDOW_STYLE_EMPTY + type ITEM_TYPE_BUTTON + visible 1 + decoration + } + + //Line + + itemDef { + name "line" + subgroup "fade_fore_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 60 220 2 + visible 1 + decoration + } + + //Icon + + itemdef { + name icon + background UI_ASSETS"/icons/rq3-menu-demos" + forecolor 1 1 1 ICON_ALPHA + //rect 336 12 32 32 + alignrect "line" ITEM_ALIGN_RIGHT 0 -48 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } itemdef { name "demolist" - type ITEM_TYPE_LISTBOX - rect 182 132 276 188 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - elementtype LISTBOX_TEXT - elementwidth 160 - elementheight 20 - textscale .25 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - outlinecolor .75 .75 1 .25 + subgroup "fade_fore_alpha" + LISTBOX_STYLE(.225, 8) + alignRect title ITEM_ALIGN_LEFT 0 92 220 168 feeder FEEDER_DEMOS - columns 1 4 40 40 + columns 2 4 148 0 160 32 0 visible 1 onFocus { show list_hint ; timeFade list_hint forecolor .9 .9 .9 1 0 250 } leaveFocus { timeFade list_hint forecolor .9 .9 .9 0 0 250 } doubleclick { close demo; uiScript RunDemo ; } } - //Scrollbar separator - itemdef { - rect 440 132 18 188 + itemdef { + name "col1_title" + subgroup "fade_fore_alpha" + text "demo name" + forecolor .25 .25 .25 1 style WINDOW_STYLE_EMPTY - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - decoration + textalign ITEM_ALIGN_LEFT + textscale .2 + textalignx 4 + textaligny 14 + alignRect demolist ITEM_ALIGN_LEFT 4 -16 72 16 visible 1 - } - - itemdef { - name list_hint - text "Select a demo from the list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 + autowrapped decoration } -//Play + itemdef { + name "col2_title" + subgroup "fade_fore_alpha" + text "version" + forecolor .25 .25 .25 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textscale .2 + textalignx 4 + textaligny 14 + alignRect demolist ITEM_ALIGN_LEFT 160 -16 44 16 + visible 1 + autowrapped + decoration + } - itemdef { + //Play + + itemdef { name "btn_play" + subgroup "fade_fore_alpha" + text "^_P^_lay >" shortcutKey "P" - style WINDOW_STYLE_SHADER - rect 592 432 32 32 - type 1 - background "menu/art/rq3-menu-play.tga" - action { close demo; uiScript RunDemo ; } - onFocus { setbackground "menu/art/rq3-menu-play-focus-anim" ; show play_hint ; - timeFade play_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-play.tga" ; - timeFade play_hint forecolor .9 .9 .9 0 0 250 } + forecolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_RIGHT + textscale .25 + textalignx 40 + textaligny 14 + alignRect demolist ITEM_ALIGN_RIGHT 0 180 44 20 visible 1 + autowrapped + action { uiScript RunDemo } } - itemdef { - name play_hint - text "^_P^_lay the selected demo" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Back - - itemdef { - name "btn_back" - shortcutKey "B" - style WINDOW_STYLE_SHADER - rect 12 432 32 32 - type 1 - background "menu/art/rq3-menu-back.tga" - action { close _self ; open main ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; - show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; - timeFade back_hint forecolor .9 .9 .9 0 0 250 } - visible 1 - } - - - itemdef { - name back_hint - text "Go ^_b^_ack to main menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - } } \ No newline at end of file diff --git a/reaction/uifiles/error.menu b/reaction/uifiles/error.menu index b1e13cd0..0535a17f 100644 --- a/reaction/uifiles/error.menu +++ b/reaction/uifiles/error.menu @@ -6,101 +6,121 @@ name "error_popmenu" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 210 100 220 240 + rect 176 128 256 184 + anglevectors -3 -93 focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items style WINDOW_STYLE_EMPTY - shadowStyle 1 - border 0 - onOpen { play "sound/misc/menu1.wav" } - onClose { uiScript clearError } - onESC { close error_popmenu ; open main } + + onOOBClick { close _self } + onOpen { play "sound/misc/menu1.wav" ; setfocus "close" } + onClose { uiScript clearError ; open main } + onESC { close _self } popup - //Window - itemdef { - rect 0 0 220 240 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - //Title - - itemdef { - rect 101 1 120 24 + itemDef { + name "paper,fade_alpha" + menuAnchor style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" + background UI_ASSETS"/paper_1" + forecolor 1 1 .9 1 + rect 0 0 280 200 + anglevectors -3 -93 visible 1 + renderpoint decoration } - itemdef { - rect 101 1 120 24 + + itemdef { + renderpoint + name "title,fade_alpha" + text "ERROR" + forecolor .4 0 0 1 style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Error" + textscale .25 + textalignx 28 + textaligny 24 + alignrect "paper" ITEM_ALIGN_CENTER -12 20 240 24 visible 1 + autowrapped decoration } -//Error info - - itemdef { - name errorinfo - rect 12 40 196 168 + itemdef { + name "lines,line1" + alignrect "title" ITEM_ALIGN_CENTER 4 32 216 2 style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordersize 1 - bordercolor .5 .5 .5 1 + backcolor 0 0 0 .1 visible 1 decoration } - itemdef { - name errorinfo - rect 20 44 180 160 - type ITEM_TYPE_TEXT + itemdef { + style WINDOW_STYLE_SHADER + forecolor 1 1 1 .5 + alignrect title ITEM_ALIGN_RIGHT 16 8 24 24 + background UI_ASSETS"/icons/rq3-setup-options" + visible 1 + decoration + } + +#define LINE ".............................................................." + + itemdef { + name "text_background,fade_alpha" + autowrapped + text LINE"\n" + LINE"\n" + LINE"\n" + LINE"\n" + forecolor 0 0 0 1 style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_SHADOWED + textalign ITEM_ALIGN_CENTER + textscale .2 + textheight 16 + textalignx 112 + textaligny 28 + alignrect "title" ITEM_ALIGN_CENTER 0 32 224 72 + visible 1 + decoration + } + + itemdef { + name "text,fade_alpha" autowrapped cvar "com_errorMessage" - textalign ITEM_ALIGN_CENTER - textalignx 90 - textaligny 16 - textscale .225 - forecolor 1 1 1 1 + forecolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textscale .2 + textheight 16 + textalignx 0 + textaligny 24 + alignrect "title" ITEM_ALIGN_CENTER 0 32 188 72 visible 1 decoration } -//Close - itemdef { - name close - rect 80 216 60 16 - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_CENTER - textalignx 30 - textaligny 12 - text "^_C^_lose" + // Close // + + itemDef { + name "close,fade_alpha" + text "> ^_C^_lose <" shortcutKey "C" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textscale .25 + alignrect title ITEM_ALIGN_RIGHT 24 120 48 16 + textalign ITEM_ALIGN_CENTER + textalignx 24 + textaligny 12 + forecolor 0 0 .1 1 visible 1 - action { close _self ; open main } + action { close _self } } + } } diff --git a/reaction/uifiles/ingame.menu b/reaction/uifiles/ingame.menu index 8c5deb2c..8a00ae8c 100644 --- a/reaction/uifiles/ingame.menu +++ b/reaction/uifiles/ingame.menu @@ -6,7 +6,8 @@ font "fonts/font" 16 // font smallFont "fonts/smallfont" 12 // font bigFont "fonts/bigfont" 20 // font - cursor "gfx/rq3_ta_hud/3_cursor2.tga" // cursor + //cursor "gfx/rq3_ta_hud/3_cursor2.tga" // cursor + cursor UI_ASSETS"/cursor.tga" cursorSize 64 gradientBar "ui/assets/gradientbar2.tga" // gradient bar itemFocusSound "sound/ui/whoosh2.wav" // sound for item getting focus (via keyboard or mouse ) @@ -23,7 +24,8 @@ name "ingame" visible 0 fullScreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 0 0 640 36 focusColor 1 .75 0 1 disableColor .5 .5 .5 1 @@ -53,7 +55,7 @@ name "ig-logo" rect 4 0 96 32 style WINDOW_STYLE_SHADER - background "menu/art/rq3-title-logo" + background UI_ASSETS"/icons/rq3-title-logo" visible 1 decoration } @@ -388,7 +390,7 @@ textalign ITEM_ALIGN_RIGHT textalignx 236 textaligny 12 - text "Play against computer-controlled opponnents" + text "Play against computer-controlled opponents" forecolor Ingame_HintColor visible 0 decoration diff --git a/reaction/uifiles/ingame_about.menu b/reaction/uifiles/ingame_about.menu index dc13b5ee..f33fedd3 100644 --- a/reaction/uifiles/ingame_about.menu +++ b/reaction/uifiles/ingame_about.menu @@ -6,7 +6,8 @@ name "ingame_about" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 256 64 256 248 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_addbot.menu b/reaction/uifiles/ingame_addbot.menu index 9e805c42..0fdc5138 100644 --- a/reaction/uifiles/ingame_addbot.menu +++ b/reaction/uifiles/ingame_addbot.menu @@ -6,7 +6,8 @@ name "ingame_addbot" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 384 64 152 128 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_callvote.menu b/reaction/uifiles/ingame_callvote.menu index 52c4718b..94135d78 100644 --- a/reaction/uifiles/ingame_callvote.menu +++ b/reaction/uifiles/ingame_callvote.menu @@ -12,7 +12,8 @@ name "ingame_callvote" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 320 64 288 212 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_controls.menu b/reaction/uifiles/ingame_controls.menu index 6bc14bfa..73d42bcb 100644 --- a/reaction/uifiles/ingame_controls.menu +++ b/reaction/uifiles/ingame_controls.menu @@ -13,7 +13,8 @@ name "ingame_controls" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame } rect 176 64 372 340 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_devmode.menu b/reaction/uifiles/ingame_devmode.menu index c3fedd5e..d73cd218 100644 --- a/reaction/uifiles/ingame_devmode.menu +++ b/reaction/uifiles/ingame_devmode.menu @@ -6,7 +6,8 @@ name "ingame_devmode" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 368 64 256 192 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_ignore.menu b/reaction/uifiles/ingame_ignore.menu index 9a5fff9a..27bfd907 100644 --- a/reaction/uifiles/ingame_ignore.menu +++ b/reaction/uifiles/ingame_ignore.menu @@ -6,7 +6,8 @@ name "ingame_ignore" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 184 64 256 168 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_item.menu b/reaction/uifiles/ingame_item.menu index f5337cc9..2ae47cf9 100644 --- a/reaction/uifiles/ingame_item.menu +++ b/reaction/uifiles/ingame_item.menu @@ -6,7 +6,8 @@ name "ingame_item" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 80 64 264 176 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_join.menu b/reaction/uifiles/ingame_join.menu index 69524f42..d91813f4 100644 --- a/reaction/uifiles/ingame_join.menu +++ b/reaction/uifiles/ingame_join.menu @@ -6,7 +6,8 @@ name "ingame_join" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 176 64 180 140 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_join_dm.menu b/reaction/uifiles/ingame_join_dm.menu index 8919ea19..cc45e16d 100644 --- a/reaction/uifiles/ingame_join_dm.menu +++ b/reaction/uifiles/ingame_join_dm.menu @@ -6,7 +6,8 @@ name "ingame_join_dm" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 184 64 140 100 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_leave.menu b/reaction/uifiles/ingame_leave.menu index 69b68fb0..1bf77417 100644 --- a/reaction/uifiles/ingame_leave.menu +++ b/reaction/uifiles/ingame_leave.menu @@ -6,7 +6,8 @@ name "ingame_leave" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 496 64 128 112 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_matchmode.menu b/reaction/uifiles/ingame_matchmode.menu index 136095b9..e6d65733 100644 --- a/reaction/uifiles/ingame_matchmode.menu +++ b/reaction/uifiles/ingame_matchmode.menu @@ -6,7 +6,8 @@ name "ingame_matchmode" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame } rect 296 64 140 140 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_matchmode_captain.menu b/reaction/uifiles/ingame_matchmode_captain.menu index 564a0383..390d04e8 100644 --- a/reaction/uifiles/ingame_matchmode_captain.menu +++ b/reaction/uifiles/ingame_matchmode_captain.menu @@ -9,7 +9,8 @@ name "ingame_matchmode_captain" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame_matchmode } rect 296 64 288 212 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_matchmode_referee.menu b/reaction/uifiles/ingame_matchmode_referee.menu index 9a3ffd57..aed5d272 100644 --- a/reaction/uifiles/ingame_matchmode_referee.menu +++ b/reaction/uifiles/ingame_matchmode_referee.menu @@ -9,7 +9,8 @@ name "ingame_matchmode_referee" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame_matchmode } rect 296 64 288 212 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_matchmode_settings.menu b/reaction/uifiles/ingame_matchmode_settings.menu index 7acc70a3..5aeffb4a 100644 --- a/reaction/uifiles/ingame_matchmode_settings.menu +++ b/reaction/uifiles/ingame_matchmode_settings.menu @@ -6,7 +6,8 @@ name "ingame_matchmode_settings" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame_matchmode } rect 296 64 216 264 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_options.menu b/reaction/uifiles/ingame_options.menu index fb838232..0e232d3b 100644 --- a/reaction/uifiles/ingame_options.menu +++ b/reaction/uifiles/ingame_options.menu @@ -13,7 +13,8 @@ name "ingame_options" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame } rect 176 64 372 340 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_player.menu b/reaction/uifiles/ingame_player.menu index 28799590..bb9e83a1 100644 --- a/reaction/uifiles/ingame_player.menu +++ b/reaction/uifiles/ingame_player.menu @@ -5,7 +5,8 @@ name "ingame_player" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 112 64 320 264 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY @@ -193,8 +194,8 @@ textaligny 12 textscale .225 visible 1 - cvarTest "g_gameType" - showCvar { "4" ; "5" } + //cvarTest "g_gameType" + //showCvar { "4" ; "5" } onFocus { setcolor backcolor Ig_Sub_Color2 ; setcolor bordercolor Ig_Sub_BorderColor2 } leaveFocus { setcolor backcolor Ig_Sub_Color1 ; setcolor bordercolor Ig_Sub_BorderColor1 } } diff --git a/reaction/uifiles/ingame_presets.menu b/reaction/uifiles/ingame_presets.menu index 8770ae07..cb3a7399 100644 --- a/reaction/uifiles/ingame_presets.menu +++ b/reaction/uifiles/ingame_presets.menu @@ -6,7 +6,8 @@ name "ingame_presets" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 128 64 256 284 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_presets_edit.menu b/reaction/uifiles/ingame_presets_edit.menu index 5e0c1ed2..4fe44c7f 100644 --- a/reaction/uifiles/ingame_presets_edit.menu +++ b/reaction/uifiles/ingame_presets_edit.menu @@ -6,7 +6,8 @@ name "ingame_presets_edit" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } rect 104 64 420 272 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_system.menu b/reaction/uifiles/ingame_system.menu index 6128e191..c4c0b681 100644 --- a/reaction/uifiles/ingame_system.menu +++ b/reaction/uifiles/ingame_system.menu @@ -13,7 +13,8 @@ name "ingame_system" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open ingame } rect 176 64 372 340 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/ingame_tkok.menu b/reaction/uifiles/ingame_tkok.menu index dfe18de9..514ecca4 100644 --- a/reaction/uifiles/ingame_tkok.menu +++ b/reaction/uifiles/ingame_tkok.menu @@ -6,7 +6,8 @@ name "ingame_tkok" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 200 64 180 120 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_vote.menu b/reaction/uifiles/ingame_vote.menu index 59370daf..284b0204 100644 --- a/reaction/uifiles/ingame_vote.menu +++ b/reaction/uifiles/ingame_vote.menu @@ -6,7 +6,8 @@ name "ingame_vote" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 352 64 128 112 disableColor .5 .5 .5 1 focusColor 1 .75 0 1 // Menu focus color for text and items diff --git a/reaction/uifiles/ingame_weapon.menu b/reaction/uifiles/ingame_weapon.menu index 35eae328..c8c1ebd1 100644 --- a/reaction/uifiles/ingame_weapon.menu +++ b/reaction/uifiles/ingame_weapon.menu @@ -6,7 +6,8 @@ name "ingame_weapon" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self } rect 80 64 344 208 focusColor 1 .75 0 1 // Menu focus color for text and items style WINDOW_STYLE_EMPTY diff --git a/reaction/uifiles/joinserver.menu b/reaction/uifiles/joinserver.menu index 0714832a..5b83a0a0 100644 --- a/reaction/uifiles/joinserver.menu +++ b/reaction/uifiles/joinserver.menu @@ -1,938 +1,139 @@ #include "ui/menudef.h" -#define HeaderColor 0 0 0 .75 -#define HeaderColor2 .25 .25 .25 .75 -#define ColumnColor .5 .5 .5 0 -#define ColumnColor2 1 1 1 .075 + +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define TEXT_COLOR 0 0 0 + +#define ANGLES 7 -83 + +#define BEGIN_HINT(HINT_NAME)\ + itemdef { \ + name HINT_NAME \ + autowrapped \ + group "hints" \ + subgroup "fade_alpha" \ + forecolor HINT_COLOR 1 \ + textalign ITEM_ALIGN_LEFT \ + textalignx 6 \ + textaligny 10 \ + textscale .2 \ + alignrect "line" ITEM_ALIGN_LEFT 0 8 460 40 \ + style WINDOW_STYLE_EMPTY \ + visible 0 \ + decoration + + +#define ASSIGN_HINT(HINT_NAME)\ + onFocus { show HINT_NAME ; timeFade HINT_NAME forecolor 5 5 5 1 0 HINT_FADE_TIME } \ + leaveFocus { timeFade HINT_NAME forecolor 5 5 5 0 0 HINT_FADE_TIME } + +#define BUTTON_DIMX 116 +#define BUTTON_DIMY 16 +#define BUTTON_SPACEX 8 +#define BUTTON_SPACEY 4 + +#define BEGIN_CONTROL(row, idx, caption)\ + itemdef { \ + style WINDOW_STYLE_EMPTY \ + alignrect "serverlist_window" ITEM_ALIGN_LEFT $evalint((idx-1)*(BUTTON_DIMX+BUTTON_SPACEX)) $evalint((row-1)*(BUTTON_DIMY+BUTTON_SPACEY)+220) BUTTON_DIMX BUTTON_DIMY \ + text caption \ + textscale .225 \ + textalign ITEM_ALIGN_LEFT \ + textaligny 14 \ + forecolor TEXT_COLOR 1 \ + visible 1 + +#define BEGIN_BUTTON(row, idx, caption)\ + BEGIN_CONTROL(row, idx, caption) \ + type ITEM_TYPE_BUTTON \ + textalignx 8 + +#define ADD_HEADER(idx, pos, size, caption) \ + itemdef { \ + name "col"#idx"_title" \ + type ITEM_TYPE_BUTTON \ + subgroup "fade_fore_alpha" \ + text caption \ + forecolor TEXT_COLOR 1 \ + style WINDOW_STYLE_EMPTY \ + textalign ITEM_ALIGN_LEFT \ + textscale .2 \ + textalignx 4 \ + textaligny 14 \ + alignRect serverlist_window ITEM_ALIGN_LEFT pos -16 size 16 \ + visible 1 \ + ASSIGN_HINT(Hint_Col##idx) \ + action { uiScript ServerSort $evalint(idx-1) } \ + } + + { menuDef { - name "joinserver" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the old background - fullScreen MENU_TRUE - visible MENU_FALSE // Visible on open - focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + renderpoint + name "joinserver" + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 48 48 560 440 + anglevectors ANGLES + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open _prev } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript "UpdateFilter" ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide "hints" ; + } + onEsc { uiScript closeJoin } - onOpen { - uiScript "UpdateFilter" ; - play "sound/misc/menu1.wav" ; - } - - onEsc { uiScript closeJoin } + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } -//=================== -// RQ3 stuff -//=================== - - itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration - visible 1 - } - - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemdef { - name "join_icon" - style WINDOW_STYLE_SHADER - rect 8 8 48 48 - background "menu/art/rq3-menu-start.tga" - decoration - visible 1 - } - - itemdef { - name "join_title" - style WINDOW_STYLE_SHADER - rect 64 12 256 32 - background "menu/art/rq3-title-start.tga" - decoration - visible 1 - } - - itemdef { - name overlay - style 1 - forecolor 0 0 0 1 - backcolor RQ3_MENU_OVERLAY_COLOR - rect 0 58 640 360 + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_MOD 1 + rect -16 -16 620 520 + anglevectors ANGLES visible 1 decoration } -//=================== -// Buttons, lists -//=================== + //Title -//Shadow - - itemdef { + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Join game:" + forecolor .0 .0 .1 1 style WINDOW_STYLE_EMPTY - rect 20 76 600 328 - shadowstyle 1 - decoration - visible 1 - } - -//Server list - - itemdef { - name serverlist_window - group serverlist - rect 20 96 600 212 - type ITEM_TYPE_LISTBOX - style WINDOW_STYLE_FILLED - elementwidth 120 - elementheight 20 - textscale .225 - elementtype LISTBOX_TEXT - feeder FEEDER_SERVERS - border 1 - bordercolor .5 .5 .5 1 - forecolor 1 1 1 1 - backcolor HeaderColor - outlinecolor 1 1 1 .2 - visible 1 - columns 5 2 72 72 280 40 12 404 5 10 464 5 5 524 6 6 - //mouseenter { setitemcolor serverlist bordercolor .7 0 0 1 } - //mouseexit { setitemcolor serverlist bordercolor .5 .5 .5 1 } - onFocus { show serverlist_hint ; timeFade serverlist_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade serverlist_hint forecolor .9 .9 .9 0 0 250 } - doubleClick { uiScript JoinServer } - } - - itemdef { - name serverlist_hint - text "Select a server from the list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Headers - - itemdef { - name s_servername_header - group headers - rect 20 76 281 21 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - border 1 - bordercolor .5 .5 .5 1 - backcolor HeaderColor - forecolor 1 1 1 1 - textscale .225 - outlinecolor 1 1 1 .2 - textstyle 5 textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - text "Server name" - visible 1 - action { - play "sound/misc/menu1.wav" ; - uiScript ServerSort 0 ; - setitemcolor headers backcolor HeaderColor ; - setitemcolor s_servername_header backcolor HeaderColor2 ; - setitemcolor columns backcolor ColumnColor ; - setitemcolor s_servername_column backcolor ColumnColor2 } - onFocus { show sortserver_hint ; timeFade sortserver_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade sortserver_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name s_mapname_header - group headers - rect 300 76 121 21 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - border 1 - bordercolor .5 .5 .5 1 - backcolor HeaderColor - forecolor 1 1 1 1 - textscale .225 - outlinecolor 1 1 1 .2 - textstyle 5 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - text "Map name" - visible 1 - action { - play "sound/misc/menu1.wav" ; - uiScript ServerSort 1 ; - setitemcolor headers backcolor HeaderColor ; - setitemcolor s_mapname_header backcolor HeaderColor2 ; - setitemcolor columns backcolor ColumnColor ; - setitemcolor s_mapname_column backcolor ColumnColor2 } - onFocus { show sortmap_hint ; timeFade sortmap_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade sortmap_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name s_players_header - group headers - rect 420 76 61 21 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - border 1 - bordercolor .5 .5 .5 1 - backcolor HeaderColor - forecolor 1 1 1 1 - textscale .225 - outlinecolor 1 1 1 .2 - textstyle 5 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - text "#Plyrs" - visible 1 - action { - play "sound/misc/menu1.wav" ; - uiScript ServerSort 2 ; - setitemcolor headers backcolor HeaderColor ; - setitemcolor s_players_header backcolor HeaderColor2 ; - setitemcolor columns backcolor ColumnColor ; - setitemcolor s_players_column backcolor ColumnColor2 } - onFocus { show sortplayers_hint ; timeFade sortplayers_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade sortplayers_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name s_gametype_header - group headers - rect 480 76 61 21 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - border 1 - bordercolor .5 .5 .5 1 - backcolor HeaderColor - forecolor 1 1 1 1 - textscale .225 - outlinecolor 1 1 1 .2 - textstyle 5 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - text "Type" - visible 1 - action { - play "sound/misc/menu1.wav" ; - uiScript ServerSort 3 ; - setitemcolor headers backcolor HeaderColor ; - setitemcolor s_gametype_header backcolor HeaderColor2 ; - setitemcolor columns backcolor ColumnColor ; - setitemcolor s_gametype_column backcolor ColumnColor2 } - onFocus { show sorttype_hint ; timeFade sorttype_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade sorttype_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name s_ping_header - group headers - rect 540 76 80 21 - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - border 1 - bordercolor .5 .5 .5 1 - backcolor HeaderColor - forecolor 1 1 1 1 - textscale .225 - outlinecolor 1 1 1 .2 - textstyle 5 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - text "Ping" - visible 1 - action { - play "sound/misc/menu1.wav" ; - uiScript ServerSort 4 ; - setitemcolor headers backcolor HeaderColor ; - setitemcolor s_ping_header backcolor HeaderColor2 ; - setitemcolor columns backcolor ColumnColor ; - setitemcolor s_ping_column backcolor ColumnColor2 } - onFocus { show sortping_hint ; timeFade sortping_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade sortping_hint forecolor .9 .9 .9 0 0 250 } - } - -//Columns - - itemdef { - name s_servername_column - group columns - rect 20 96 281 212 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor ColumnColor - visible 1 - decoration - } - - itemdef { - name s_mapname_column - group columns - rect 300 96 121 212 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor ColumnColor - visible 1 - decoration - } - - itemdef { - name s_players_column - group columns - rect 420 96 61 212 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor ColumnColor - visible 1 - decoration - } - - itemdef { - name s_gametype_column - group columns - rect 480 96 61 212 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor ColumnColor - visible 1 - decoration - } - - itemdef { - name s_ping_column - group columns - rect 540 96 63 212 - style WINDOW_STYLE_FILLED - border 1 - bordercolor .5 .5 .5 1 - backcolor ColumnColor - visible 1 - decoration - } - -//Sort message - - itemdef { - name sortserver_hint - text "Click to sort server list by server name" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 + textalignx 4 + textaligny 24 textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - itemdef { - name sortmap_hint - text "Click to sort server list by map name" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - itemdef { - name sortplayers_hint - text "Click to sort server list by number of players" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - itemdef { - name sorttype_hint - text "Click to sort server list by game type" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - itemdef { - name sortping_hint - text "Click to sort server list by ping time" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Options - - //Window - - itemdef { - rect 20 307 600 65 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordercolor .5 .5 .5 1 + alignRect paper ITEM_ALIGN_LEFT 40 40 480 20 visible 1 - decoration - } - - //Window - - itemdef { - rect 20 370 600 32 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration - } - - //Map preview - -/* - itemdef { - rect 12 72 168 124 - style WINDOW_STYLE_EMPTY - //backcolor 0 0 0 .65 - border 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration - } -*/ - - itemdef { - name map_preview - rect 544 314 72 54 - ownerdraw UI_NETMAPCINEMATIC - style WINDOW_STYLE_EMPTY - decoration - visible 1 - } - - // 1st row // - // Server Info // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 28 316 100 20 - text "Server Info" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { open "serverinfo_popmenu" } - onFocus { show serverinfo_hint ; timeFade serverinfo_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade serverinfo_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name serverinfo_hint - text "Click to display information about the selected server" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Password // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 148 316 100 20 - text "Password" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { open "password_popmenu" } - onFocus { show password_hint ; timeFade password_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade password_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name password_hint - text "Click to enter a password to join a private server" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Specify // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 300 316 100 20 - text "Specify" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { open "specify_popmenu" } - onFocus { show specify_hint ; timeFade specify_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade specify_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name specify_hint - text "Click to specify a custom server address" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Find Player // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 420 316 100 20 - text "Find Player" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { open "findplayer_popmenu" } - onFocus { show findplayer_hint ; timeFade findplayer_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade findplayer_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name findplayer_hint - text "Click to search the server list for players" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // 2nd row // - // Add Favorite // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 28 344 100 20 - text "Add Favorite" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript addFavorite } - onFocus { show addfav_hint ; timeFade addfav_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade addfav_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name addfav_hint - text "Click to add the selected server to the favorites list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Del Favorite // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 148 344 100 20 - text "Del. Favorite" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript DeleteFavorite ; uiScript UpdateFilter } - onFocus { show delfav_hint ; timeFade delfav_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade delfav_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name delfav_hint - text "Click to remove the selected server from the favorites list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // New Favorite // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 300 344 100 20 - text "New Favorite" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { open "createfavorite_popmenu" } - onFocus { show newfav_hint ; timeFade newfav_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade newfav_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name newfav_hint - text "Click to enter the name and address of a new favorite server" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Source // - - itemdef { - style WINDOW_STYLE_EMPTY - ownerdraw UI_NETSOURCE - rect 420 344 80 20 - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } - - // 3rd row // - // Get New List // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 28 376 100 20 - text "Get New List" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript RefreshServers } - onFocus { show getlist_hint ; timeFade getlist_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade getlist_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name getlist_hint - text "Click to get an updated server list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // Refresh List // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - rect 148 376 100 20 - text "Refresh List" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } - onFocus { show refresh_hint ; timeFade refresh_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade refresh_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name refresh_hint - text "Click to refresh the server list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // View empty // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_YESNO - rect 300 376 80 20 - text "View Empty:" - cvar "ui_browserShowEmpty" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } - onFocus { show empty_hint ; timeFade empty_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade empty_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name empty_hint - text "Show empty servers in the list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - // View full // - - itemdef { - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_YESNO - rect 420 376 80 20 - text "View Full:" - cvar "ui_browserShowFull" - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } - onFocus { show full_hint ; timeFade full_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade full_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name full_hint - text "Show full servers in the list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -/* - // Game // - - itemdef { - style WINDOW_STYLE_EMPTY - ownerdraw UI_NETFILTER - rect 528 376 80 20 - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - action { play "sound/misc/menu1.wav" } - } -*/ - -//GO button - - itemdef { - name "btn_join" - shortcutKey "G" - style WINDOW_STYLE_SHADER - rect 560 432 64 32 - type 1 - background "menu/art/rq3-menu-go.tga" - action { uiScript JoinServer } - onFocus { setbackground "menu/art/rq3-menu-go-focus-anim" ; show join_hint ; - timeFade join_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-go.tga" ; - timeFade join_hint forecolor .9 .9 .9 0 0 250 } - visible 1 - } - - itemdef { - name join_hint - text "Connect to the selected server" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 + autowrapped decoration } @@ -941,94 +142,202 @@ itemdef { ownerdraw UI_SERVERREFRESHDATE style WINDOW_STYLE_EMPTY - rect 300 20 200 20 + alignrect "title" ITEM_ALIGN_LEFT 0 28 480 16 textscale .2 textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 16 - forecolor 1 1 1 1 + textalignx 6 + textaligny 14 + forecolor .25 .25 .25 1 decoration visible 1 } -//Create + //Line + + itemDef { + name "line" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 488 2 + visible 1 + decoration + } + + + + + // GO // itemdef { - style WINDOW_STYLE_SHADER - forecolor .5 .5 .5 1 - rect 532 12 96 36 - decoration - background "ui/assets/button.tga" + name "btn_run" + subgroup "fade_fore_alpha" + text "> ^_G^_O <" + shortcutKey "G" + forecolor .5 0 0 1 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_RIGHT + textscale .25 + textalignx 36 + textaligny 14 + alignRect line ITEM_ALIGN_RIGHT 0 -28 40 24 visible 1 + autowrapped + ASSIGN_HINT(Hint_GoPlay) + action { uiScript JoinServer } + } + + + BEGIN_HINT(Hint_GoPlay) + text "Click to play on the chosen server" + } + + BEGIN_HINT(Hint_ServerInfo) + text "Click to view detailed information about the selected server" + } + + BEGIN_HINT(Hint_Select) + text "Select a server from the list and click ^1GO^* to join the action" + } + + BEGIN_HINT(Hint_Password) + text "Click to enter a password to join a private server" + } + + // column headers // + + BEGIN_HINT(Hint_Col1) + text "Click to sort servers by name" + } + BEGIN_HINT(Hint_Col2) + text "Click to sort servers by map name" + } + BEGIN_HINT(Hint_Col3) + text "Click to sort servers by number of players" + } + BEGIN_HINT(Hint_Col4) + text "Click to sort servers by game type" + } + BEGIN_HINT(Hint_Col5) + text "Click to sort servers by ping time" } itemdef { - name "btn_create" - style WINDOW_STYLE_FILLED - type ITEM_TYPE_BUTTON - rect 540 20 80 20 - backcolor Ig_Sub_Color1 - forecolor 1 1 1 1 - textscale .25 - textalign ITEM_ALIGN_CENTER - textalignx 40 - textaligny 14 - textstyle ITEM_TEXTSTYLE_SHADOWED - text "^_C^_reate >" - shortcutKey "C" + name serverlist_window + group serverlist + alignrect title ITEM_ALIGN_LEFT 0 96 488 212 + //rect 20 96 600 212 + LISTBOX_STYLE(.2, 4) + feeder FEEDER_SERVERS visible 1 - action { close joinserver ; open createserver } - onFocus { show create_hint ; timeFade create_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade create_hint forecolor .9 .9 .9 0 0 250 } + columndef 5 + 4 240 + 4 72 + 4 40 + 4 56 + 4 48 + //mouseenter { setitemcolor serverlist bordercolor .7 0 0 1 } + //mouseexit { setitemcolor serverlist bordercolor .5 .5 .5 1 } + //onFocus { show serverlist_hint ; timeFade serverlist_hint forecolor .9 .9 .9 1 0 250 } + //leaveFocus { timeFade serverlist_hint forecolor .9 .9 .9 0 0 250 } + ASSIGN_HINT(Hint_Select) + doubleClick { close _self; uiScript JoinServer } } - itemdef { - name create_hint - text "Create your own Reaction server" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration + ADD_HEADER(1, 008, 72, "server name") + ADD_HEADER(2, 250, 64, "map name") + ADD_HEADER(3, 328, 40, "plyrs") + ADD_HEADER(4, 372, 40, "type") + ADD_HEADER(5, 432, 40, "ping") + + // ROW 1 // + + BEGIN_BUTTON(1, 1, "Server ^_i^_nfo") + action { open "serverinfo_popmenu" } + shortcutKey "I" + ASSIGN_HINT(Hint_ServerInfo) } -//Back + BEGIN_BUTTON(1, 2, "^_P^_assword") + action { open "password_popmenu" } + shortcutKey "P" + ASSIGN_HINT(Hint_Password) + } - itemdef { - name "btn_back" - shortcutKey "B" - style WINDOW_STYLE_SHADER - rect 12 432 32 32 - type 1 - background "menu/art/rq3-menu-back.tga" - action { close _self ; open main ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; - show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; - timeFade back_hint forecolor .9 .9 .9 0 0 250 } - visible 1 + BEGIN_BUTTON(1, 3, "^_S^_pecify") + action { open "specify_popmenu" } + shortcutKey "S" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_BUTTON(1, 4, "^_F^_ind player") + action { open "specify_popmenu" } + shortcutKey "F" + ASSIGN_HINT(SelectServer2) } - itemdef { - name back_hint - text "Go ^_b^_ack to main menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration + + // ROW 2 // + + BEGIN_BUTTON(2, 1, "^_A^_dd Favorite") + action { play "sound/misc/menu1.wav" ; uiScript AddFavorite ; uiScript UpdateFilter } + shortcutKey "A" + ASSIGN_HINT(SelectServer2) } + BEGIN_BUTTON(2, 2, "^_D^_el. Favorite") + action { play "sound/misc/menu1.wav" ; uiScript DeleteFavorite ; uiScript UpdateFilter } + shortcutKey "D" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_BUTTON(2, 3, "^_N^_ew Favorite") + action { open "createfavorite_popmenu" } + shortcutKey "N" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_CONTROL(2, 4, "") + ownerdraw UI_NETSOURCE + textalignx 6 + action { play "sound/misc/menu1.wav" } + ASSIGN_HINT(SelectServer2) + } + + + + // ROW 3 // + + BEGIN_BUTTON(3, 1, "^_G^_et New List") + action { play "sound/misc/menu1.wav" ; uiScript RefreshServers } + shortcutKey "G" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_BUTTON(3, 2, "^_R^_efresh List") + action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } + shortcutKey "R" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_CONTROL(3, 3, "View ^_E^_mpty:") + type ITEM_TYPE_YESNO + cvar "ui_browserShowEmpty" + textalignx 8 + action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } + shortcutKey "V" + ASSIGN_HINT(SelectServer2) + } + + BEGIN_CONTROL(3, 4, "^_V^_iew Full:") + type ITEM_TYPE_YESNO + cvar "ui_browserShowFull" + textalignx 8 + action { play "sound/misc/menu1.wav" ; uiScript RefreshFilter } + shortcutKey "V" + ASSIGN_HINT(SelectServer2) + } + + } -} \ No newline at end of file diff --git a/reaction/uifiles/main.menu b/reaction/uifiles/main.menu index 3baab4e6..e309c70a 100644 --- a/reaction/uifiles/main.menu +++ b/reaction/uifiles/main.menu @@ -1,34 +1,49 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 + +#define RQ3_Controls_Option_Color 0 0 .1 1 +#define RQ3_Controls_Tab_Color1 0 0 0 1 +#define RQ3_Controls_Tab_Color2 .4 .4 .4 1 + + { assetGlobalDef { font "fonts/font" 16 // font smallFont "fonts/smallfont" 12 // font bigFont "fonts/bigfont" 20 // font - cursor "gfx/rq3_ta_hud/3_cursor2.tga" // cursor + //cursor "gfx/rq3_ta_hud/3_cursor2.tga" // cursor + cursor UI_ASSETS"/cursor.tga" cursorSize 64 gradientBar UI_ASSETS"/gradientbar2.tga" // gradient bar itemFocusSound "sound/ui/whoosh2.wav" // sound for item getting focus (via keyboard or mouse ) + + //Makro - checkboxes + checkBox0 UI_ASSETS"/checkbox_0.tga" + checkBox1 UI_ASSETS"/checkbox_1.tga" fadeCycle 2 // how often fade happens in milliseconds fadeAmount 0.05 // amount to adjust alpha per cycle fadeClamp 1.0 // sets the fadeup alpha shadowColor 0.1 0.1 0.1 0.25 // shadow color + keyBindStatus1 "ENTER or CLICK to change, BACKSPACE to clear" + keyBindStatus2 "Waiting for new key... Press ESCAPE to cancel" } menuDef { name "main" // Makro: rename it to "main-rq3" //background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - background UI_ASSETS"/main" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" + background UI_ASSETS"/main_new" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" fullScreen MENU_TRUE //rect 0 0 640 480 // Size and position of the menu visible 0 // Visible on open focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items - soundLoop "music/rq3_title_loop" - soundIntro "music/rq3_title_intro" + //soundLoop "music/rq3_title_loop" + //soundIntro "music/rq3_title_intro" onOpen { @@ -39,7 +54,7 @@ onFirstShow { setoverlaycolor 0 0 0 1 ; fadeoverlay 0 0 0 0 0 1000 ; - setfocus btn_join ; + setfocus btn_join ; } onESC { open quit_popmenu } @@ -55,7 +70,7 @@ itemDef { style WINDOW_STYLE_SHADER - rect 280 288 120 120 + rect 276 288 120 120 anglevectors 9 -81 background UI_ASSETS"/logo" forecolor 1 1 1 0.2 @@ -64,13 +79,6 @@ } - -#define UI_MAIN_ITEM_SPACING_Y 36 -#define UI_MAIN_HINT_OFFSET_Y 20 -#define UI_MAIN_TEXTSIZE .28 - - - //Join server itemdef { @@ -88,7 +96,7 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY visible 1 - action { close _self; open joinserver} + action { openSpecial joinserver } } itemdef { @@ -121,7 +129,7 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY visible 1 - action { close _self; open createserver } + action { openSpecial createserver } } itemdef { @@ -154,11 +162,11 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY visible 1 - action { close _self; open setup_menu } + action { openspecial setup_menu } } itemdef { - text "Configure Reaction Quake 3" + text "Configure Reaction" forecolor .25 .25 .25 1 textalign 0 textalignx 12 @@ -185,7 +193,7 @@ alignrect "btn_setup" ITEM_ALIGN_LEFT 8 24 34 16 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - action { close _self ; open player_menu ; } + action { openspecial player_menu ; } visible 1 } @@ -201,7 +209,7 @@ alignrect "btn_setup" ITEM_ALIGN_LEFT 44 24 46 16 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - action { close _self ; open control_look_menu ; } + action { openspecial controls_menu ; } visible 1 } @@ -217,7 +225,7 @@ alignrect "btn_setup" ITEM_ALIGN_LEFT 92 24 42 16 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - action { close _self ; open system_menu ; } + action { openspecial system_menu ; } visible 1 } @@ -233,7 +241,7 @@ alignrect "btn_setup" ITEM_ALIGN_LEFT 136 24 32 16 style WINDOW_STYLE_EMPTY type ITEM_TYPE_BUTTON - action { close _self ; open options_menu ; } + action { openspecial options_menu ; } visible 1 } @@ -269,7 +277,7 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY visible 1 - action { close _self; open demo } + action { openSpecial demo } } itemdef { @@ -302,11 +310,11 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY visible 1 - action { close _self; open mod } + action { openSpecial mod } } itemdef { - text "Play a different Quake 3 mod" + text "Select a modification" forecolor .25 .25 .25 1 textalign 0 textalignx 12 @@ -339,7 +347,7 @@ itemdef { autowrapped - text "Exit Reaction Quake 3" + text "Exit Reaction" forecolor .25 .25 .25 1 textalign 0 textalignx 12 @@ -352,7 +360,127 @@ decoration } + +/* + itemDef { + name "paper" + subgroup "fade_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor .95 1 .95 1 + rect 32 48 600 520 + anglevectors 7 -83 + visible 1 + decoration + } +//Server list + + itemdef { + renderpoint + name serverlist_window + group serverlist + alignrect "paper" ITEM_ALIGN_LEFT 32 96 488 212 + //rect 20 96 600 212 + LISTBOX_STYLE(.175, 4) + feeder FEEDER_SERVERS + visible 1 + columns 5 2 72 72 280 40 12 404 5 10 464 5 5 524 6 6 + //mouseenter { setitemcolor serverlist bordercolor .7 0 0 1 } + //mouseexit { setitemcolor serverlist bordercolor .5 .5 .5 1 } + onFocus { show serverlist_hint ; timeFade serverlist_hint forecolor .9 .9 .9 1 0 250 } + leaveFocus { timeFade serverlist_hint forecolor .9 .9 .9 0 0 250 } + doubleClick { uiScript JoinServer } + } +*/ } + + + // UNDER CONSTRUCTION MENU // + + menuDef { + name "notdone_popmenu" + visible 0 + rect 348 182 144 128 + anglevectors -10 -100 + focusColor .25 .25 .5 1 + popup + //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } + //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } + onOpen { + setrandomitemcolor postit forecolor 2 .94 .94 .82 1 1 .95 .8 1 ; + setitemcolor window forecolor 2 2 2 0 ; + timefade window forecolor 2 2 2 1 0 FADEIN_TIME ; + play "sound/ui/whoosh3.wav" ; + //setQuitText confirm + } + onESC { close _self ; open main } + onOOBClick { close _self ; open main } + + + itemDef { + renderpoint + name "postit" + group window + style WINDOW_STYLE_SHADER + //style WINDOW_STYLE_FILLED + background "ui/assets/post_it" + forecolor .94 .94 .82 1 + //backcolor .94 .94 .82 1 + rect -16 0 180 152 + anglevectors -10 -100 + visible 1 + decoration + } + + + + // MESSAGE // + + itemDef { + renderpoint + name confirm + group window + autowrapped + text "Under construction" + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 + textscale .25 + //rect 16 24 112 32 + alignrect "postit" ITEM_ALIGN_CENTER 0 24 112 32 + adjustrect + textalign 1 + textalignx 56 + textaligny 16 + decoration + forecolor 0 0 .15 1 + visible 1 + } + + + // OK // + + itemDef { + name ok + group window + text "^_O^_K" + shortcutKey "O" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 + textscale .25 + //rect 32 88 32 16 + //anglevectors -15 -105 + alignrect confirm ITEM_ALIGN_CENTER 0 56 32 16 + textalign ITEM_ALIGN_CENTER + textalignx 16 + textaligny 12 + forecolor 0 0 .15 1 + visible 1 + action { close _self ; open _prev } + } + +} + diff --git a/reaction/uifiles/memory.menu b/reaction/uifiles/memory.menu index 98d2b056..fe0b80a3 100644 --- a/reaction/uifiles/memory.menu +++ b/reaction/uifiles/memory.menu @@ -6,104 +6,100 @@ name "memory_popmenu" visible 0 fullscreen 0 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle - rect 210 124 220 192 + rect 148 128 280 220 focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items style WINDOW_STYLE_EMPTY - shadowStyle 1 border 0 - onOpen { play "sound/misc/menu1.wav" } - onClose { uiScript clearError } - onESC { close memory_popmenu ; open main } + onOpen { play "sound/misc/menu1.wav" ; setfocus "now" } + onClose { open main } + onESC { close _self } popup - //Window - itemdef { - rect 0 0 220 192 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - bordercolor Ig_Window_BorderColor - decoration - } - - //Title - - itemdef { - rect 101 1 120 24 + itemDef { + name "paper,fade_alpha" + menuAnchor style WINDOW_STYLE_SHADER - background "ui/assets/rq3-ingame-title" + background UI_ASSETS"/paper_1" + forecolor .94 .94 .82 1 + rect 0 0 280 220 + anglevectors 3 -86 visible 1 + renderpoint decoration } - itemdef { - rect 101 1 120 24 + + itemdef { + renderpoint + name "title,fade_alpha" + text "WARNING" + forecolor .25 0 0 1 style WINDOW_STYLE_EMPTY - forecolor Ig_Window_TitleColor - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 - textalign ITEM_ALIGN_LEFT - textalignx 24 - textaligny 16 - text "Warning" + textalign ITEM_ALIGN_CENTER + textscale .3 + textalignx 120 + textaligny 24 + alignrect "paper" ITEM_ALIGN_CENTER -12 20 240 24 visible 1 - decoration - } - -//Error info - - itemdef { - name errorinfo - rect 12 40 196 120 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordersize 1 - bordercolor .5 .5 .5 1 - visible 1 - decoration - } - - itemdef { - name errorinfo - rect 20 44 180 112 - type ITEM_TYPE_TEXT - style WINDOW_STYLE_EMPTY - textstyle ITEM_TEXTSTYLE_SHADOWED autowrapped - text "Your memory settings are too\n" - "low. You need to restart\n" - "Reaction in order to correct\n" - "this problem." - textalign ITEM_ALIGN_CENTER - textalignx 90 - textaligny 16 - textscale .225 - forecolor 1 1 1 1 - visible 1 decoration } -//Ok - - itemdef { - name close - rect 80 168 60 16 + itemdef { + renderpoint + name "text,fade_alpha" + text "Your memory settings are too\n" + "low. You need to restart\n" + "Reaction in order to correct\n" + "this problem." + forecolor 0 0 0 1 style WINDOW_STYLE_EMPTY - type ITEM_TYPE_BUTTON - textstyle ITEM_TEXTSTYLE_NORMAL - textscale .225 textalign ITEM_ALIGN_CENTER - textalignx 30 + textscale .25 + textalignx 120 + textaligny 24 + alignrect "title" ITEM_ALIGN_CENTER 0 32 240 64 + visible 1 + autowrapped + decoration + } + + // Now // + + itemDef { + name "now,fade_alpha" + text "> ^_N^_ow <" + shortcutKey "N" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textscale .25 + alignrect title ITEM_ALIGN_LEFT 32 128 48 16 + textalign ITEM_ALIGN_CENTER + textalignx 24 textaligny 12 - text "^_O^_k" - shortcutKey "O" + forecolor 0 0 .1 1 visible 1 action { uiScript "quit" } } + + // Later // + + itemDef { + name "later,fade_alpha" + text "^_L^_ater" + shortcutKey "L" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textscale .25 + alignrect title ITEM_ALIGN_RIGHT 32 128 48 16 + textalign ITEM_ALIGN_CENTER + textalignx 24 + textaligny 12 + forecolor 0 0 .1 1 + visible 1 + action { close _self } + } + } } \ No newline at end of file diff --git a/reaction/uifiles/menudef.h b/reaction/uifiles/menudef.h index 54c9a647..385341d2 100644 --- a/reaction/uifiles/menudef.h +++ b/reaction/uifiles/menudef.h @@ -18,6 +18,12 @@ #define ITEM_ALIGN_CENTER 1 // center alignment #define ITEM_ALIGN_RIGHT 2 // right alignment +//Makro - added for YES/NO items + +#define YESNO_TEXT 0 +#define YESNO_ICON_LEFT 1 +#define YESNO_ICON_RIGHT 2 + #define ITEM_TEXTSTYLE_NORMAL 0 // normal text #define ITEM_TEXTSTYLE_BLINK 1 // fast blinking #define ITEM_TEXTSTYLE_PULSE 2 // slow pulsing @@ -72,6 +78,8 @@ #define FEEDER_MMHEADS 0x11 //Makro - weapon replacements list #define FEEDER_REPLACEMENTS 0x12 +//Makro - driver info +#define FEEDER_GLDRIVER_INFO 0x13 // display flags #define CG_SHOW_BLUE_TEAM_HAS_REDFLAG 0x00000001 @@ -240,6 +248,8 @@ #define UI_RQ3_REPLACEMENTMODEL 165 #define UI_RQ3_REPLACEMENTTYPE 166 #define UI_RQ3_REPLACEMENTSUBTYPE 167 +//Makro - startup menu text +#define UI_RQ3_STARTUP 168 #define UI_OWNERDRAW_BASE 200 #define UI_HANDICAP 200 @@ -345,10 +355,22 @@ #define RQ3_MAIN_HINT_COLOR .75 .75 1 .75 */ -#define RQ3_MAIN_BAR_COLOR 1 1 1 .5 -#define RQ3_MAIN_BAR_COLOR2 0 0 0 1 + +// GREY BAR, RED BORDER + + +/* +#define RQ3_MAIN_BAR_COLOR 1 1 1 .75 +#define RQ3_MAIN_BAR_COLOR2 1 0 0 1 //#define RQ3_MAIN_HINT_COLOR .75 .75 .75 1 #define RQ3_MAIN_HINT_COLOR .9 .9 .9 0 +*/ + +#define RQ3_MAIN_BAR_COLOR 0 0 0 .75 +#define RQ3_MAIN_BAR_COLOR2 1 1 1 .75 +//#define RQ3_MAIN_HINT_COLOR .75 .75 .75 1 +#define RQ3_MAIN_HINT_COLOR .9 .9 .9 0 + #define UI_FOLDER "ui" #define UI_ASSETS "ui/assets" @@ -361,7 +383,11 @@ #define RQ3_MAIN_TEXTSIZE .28 #define RQ3_MENU_OVERLAY_COLOR 0 0 0 .5 -#define RQ3_MAIN_FOCUSCOLOR .5 .5 .5 1 +#define RQ3_MAIN_FOCUSCOLOR .25 .25 .5 1 + +#define UI_MAIN_ITEM_SPACING_Y 36 +#define UI_MAIN_HINT_OFFSET_Y 20 +#define UI_MAIN_TEXTSIZE .28 //Ingame stuff @@ -393,4 +419,38 @@ #define Ig_Setup_TabColor .75 .75 .75 1 -#define Ig_ShadowSize 12 \ No newline at end of file +#define Ig_ShadowSize 12 + +//Menu colors +#define MENUCOLOR_DEMO .95 .95 1 +#define MENUCOLOR_MOD 1 1 1 +#define MENUCOLOR_SETUP 1 .97 .9 +#define MENUCOLOR_CONTROLS .98 .98 .98 +#define MENUCOLOR_PLAYER .95 1 1 +#define MENUCOLOR_SYSTEM .92 .92 .98 +#define MENUCOLOR_OPTIONS 1 1 1 + +#define ALIGN_AFTER(ITEM, DIMX, DIMY)\ + alignrect ITEM ITEM_ALIGN_RIGHT -$evalint(DIMX) 0 DIMX DIMY + +#define LISTBOX_STYLE(SCALE, ALIGNX)\ + type ITEM_TYPE_LISTBOX\ + style WINDOW_STYLE_FILLED\ + forcetextcolor\ + backcolor 0 0 0 .05\ + border 0\ + bordersize 2\ + bordercolor .5 .5 .5 1\ + forecolor .0 .0 .1 1\ + elementtype LISTBOX_TEXT\ + elementwidth 160\ + elementheight 15\ + textscale SCALE\ + textalign ITEM_ALIGN_LEFT\ + textalignx ALIGNX\ + textaligny 14\ + outlinecolor .0 .0 0 .1 + + +#define STANDARD_MENU() + diff --git a/reaction/uifiles/menus.txt b/reaction/uifiles/menus.txt index 77756d26..5800305e 100644 --- a/reaction/uifiles/menus.txt +++ b/reaction/uifiles/menus.txt @@ -15,12 +15,7 @@ loadMenu { "ui/player.menu" } loadMenu { "ui/setup.menu" } - loadMenu { "ui/controls_look.menu" } - loadMenu { "ui/controls_move.menu" } - loadMenu { "ui/controls_weapon.menu" } - loadMenu { "ui/controls_misc.menu" } - loadMenu { "ui/controls_reaction.menu" } - + loadMenu { "ui/controls.menu" } loadMenu { "ui/system.menu" } loadMenu { "ui/credit.menu" } loadMenu { "ui/connect.menu" } diff --git a/reaction/uifiles/mod.menu b/reaction/uifiles/mod.menu index de7bb7c1..8d909cba 100644 --- a/reaction/uifiles/mod.menu +++ b/reaction/uifiles/mod.menu @@ -1,265 +1,181 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 + +#define ANGLES 4 -86 + { menuDef { - name "mod" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the current background - fullScreen MENU_TRUE - visible MENU_TRUE // Visible on open - focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items - - - onOpen { - uiScript LoadMods ; - play "sound/misc/menu1.wav" ; - } - - onEsc { close mod ; open main } - - -//================= -// RQ3 stuff -//================= - - - itemdef { - name overlay - style 1 - forecolor 0 0 0 1 - backcolor RQ3_MENU_OVERLAY_COLOR - rect 0 58 640 360 - visible 1 - decoration - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 - style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration - visible 1 - } - - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemdef { - name "mods_icon" - style WINDOW_STYLE_SHADER - rect 8 8 48 48 - background "menu/art/rq3-menu-mods.tga" - decoration - visible 1 - } - - itemdef { - name "mods_title" - style WINDOW_STYLE_SHADER - rect 64 12 256 32 - background "menu/art/rq3-title-mods.tga" - decoration - visible 1 - } - -//================= -// Buttons, lists -//================= - - -//Window - - itemdef { - rect 170 100 300 240 - style WINDOW_STYLE_FILLED - backcolor Ig_Window_Color - visible 1 - border 1 - bordersize 1 - shadowStyle 1 - bordercolor Ig_Window_BorderColor - decoration - } - - itemdef { - text "Available mods:" - textscale .25 - type 0 + renderpoint + name "mod" + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 128 96 288 348 + anglevectors ANGLES style WINDOW_STYLE_EMPTY - rect 182 108 276 24 - forecolor 1 1 1 1 - textstyle 0 - textalign 0 - textalignx 8 - textaligny 16 - decoration + popup + + onOOBClick { close _self ; open main } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript LoadMods ; + setitemcolor hints forecolor .9 .9 .9 1 ; hide hints ; + hide focus } + onEsc { close _self ; open main } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + + + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_MOD 1 + rect -8 -16 320 420 + anglevectors ANGLES visible 1 + decoration } -//Mod list + //Title + + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Mod selection:" + forecolor .0 .0 .1 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignRect paper ITEM_ALIGN_CENTER -12 40 240 20 + visible 1 + autowrapped + decoration + } + + itemdef { + text "Select a mod from the list below and\n" + "press the Activate button" + autowrapped + subgroup "fade_fore_alpha" + forecolor .25 .25 .25 1 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 12 + textscale .2 + alignrect "title" ITEM_ALIGN_LEFT 0 28 240 16 + style WINDOW_STYLE_EMPTY + type ITEM_TYPE_BUTTON + visible 1 + decoration + } + + //Line + + itemDef { + name "line" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 60 240 2 + visible 1 + decoration + } + + //Icon + + itemdef { + name icon + background UI_ASSETS"/icons/rq3-menu-mods" + forecolor 1 1 1 ICON_ALPHA + //rect 336 12 32 32 + alignrect "line" ITEM_ALIGN_RIGHT 0 -48 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } itemdef { name "modlist" - type ITEM_TYPE_LISTBOX - rect 182 132 276 188 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 .65 - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - elementtype LISTBOX_TEXT - elementwidth 160 - elementheight 20 - textscale .25 - textalign ITEM_ALIGN_LEFT - textalignx 8 - textaligny 14 - outlinecolor .75 .75 1 .25 + subgroup "fade_fore_alpha" + LISTBOX_STYLE(.175, 4) + alignRect title ITEM_ALIGN_LEFT 0 92 240 148 feeder FEEDER_MODS - columns 1 4 40 40 + columns 2 4 148 0 156 52 0 visible 1 onFocus { show list_hint ; timeFade list_hint forecolor .9 .9 .9 1 0 250 } leaveFocus { timeFade list_hint forecolor .9 .9 .9 0 0 250 } - doubleclick { close mod; uiScript RunMod } + doubleclick { close _self ; uiScript RunMod } } - //Scrollbar separator - itemdef { - rect 440 132 18 188 + itemdef { + name "col1_title" + subgroup "fade_fore_alpha" + text "mod name" + forecolor .25 .25 .25 1 style WINDOW_STYLE_EMPTY - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - decoration + textalign ITEM_ALIGN_LEFT + textscale .2 + textalignx 4 + textaligny 14 + alignRect modlist ITEM_ALIGN_LEFT 4 -16 72 16 visible 1 - } - - itemdef { - name list_hint - text "Select a mod from the list" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 + autowrapped decoration } -//Load mod - - itemdef { - name "btn_load" - style WINDOW_STYLE_SHADER - rect 560 432 64 32 - type 1 - background "menu/art/rq3-menu-go.tga" - action { close mod; uiScript Runmod ; } - onFocus { setbackground "menu/art/rq3-menu-go-focus-anim" ; show load_hint ; - timeFade load_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-go.tga" ; - timeFade load_hint forecolor .9 .9 .9 0 0 250 } + itemdef { + name "col2_title" + subgroup "fade_fore_alpha" + text "folder" + forecolor .25 .25 .25 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textscale .2 + textalignx 4 + textaligny 14 + alignRect modlist ITEM_ALIGN_LEFT 160 -16 44 16 visible 1 - } - - - itemdef { - name load_hint - text "Load the selected mod" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 + autowrapped decoration } -//Back + //Run - itemdef { - name "btn_back" - shortcutKey "B" - style WINDOW_STYLE_SHADER - rect 12 432 32 32 - type 1 - background "menu/art/rq3-menu-back.tga" - action { close _self ; open main ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; - show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; - timeFade back_hint forecolor .9 .9 .9 0 0 250 } + itemdef { + name "btn_run" + subgroup "fade_fore_alpha" + text "^_A^_ctivate >" + shortcutKey "A" + forecolor 0 0 0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_RIGHT + textscale .25 + textalignx 52 + textaligny 14 + alignRect modlist ITEM_ALIGN_RIGHT 0 180 56 20 visible 1 + autowrapped + action { uiScript RunMod } } - itemdef { - name back_hint - text "Go ^_b^_ack to main menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - } } \ No newline at end of file diff --git a/reaction/uifiles/options.menu b/reaction/uifiles/options.menu index 0a9558c6..8da42372 100644 --- a/reaction/uifiles/options.menu +++ b/reaction/uifiles/options.menu @@ -1,10 +1,434 @@ +#include "ui/menudef.h" +#include "ui/tabs.h" + +//////////////////////////////////// +// +// CONSTANTS +// +// + + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define TAB_HEIGHT 20 +#define LINE_WIDTH 300 + + +//////////////////////////////////// +// +// MENU DEFINITION +// +// + +{ + menuDef { + name "options_menu" + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 120 112 340 264 + anglevectors 3 -87 + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open _prev } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript loadControls ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide hints ; + ACTIVATE_TAB(1) ; + } + //onClose { open _prev } + onEsc { close _self ; open main } + + onOpenSpecial { + //normal items + setItemColor "fade_alpha" forecolor 5 5 5 0 ; + timeFade "fade_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + + + itemDef { + renderpoint + name "paper,fade_alpha" + menuAnchor + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_OPTIONS 1 + rect -8 -20 380 320 + anglevectors 3 -87 + visible 1 + decoration + } + + itemdef { + renderpoint + name "title,fade_alpha" + text "Game options:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 32 32 240 36 + visible 1 + autowrapped + decoration + } + + //Line + + itemDef { + name "line,fade_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 LINE_WIDTH 2 + visible 1 + decoration + } + + /////////////////////////////////////////////////////////// + // + // Sub-options + // + // + + // Gameplay + ADD_TAB( + "^_G^_ameplay.", + "G", 1, "group2,group3", + alignrect "title" ITEM_ALIGN_LEFT 2 28 52 TAB_HEIGHT + ) + ADD_HINT("hint_tab1", "Change gameplay options", "group2,group3") + +//--------------------------------------------------------- + + // Crosshair + + ADD_TAB( + "^_C^_rosshair.", + "C", 2, "group1,group3", + alignrect "tab1" ITEM_ALIGN_RIGHT -52 0 52 TAB_HEIGHT + ) + ADD_HINT("hint_tab2", "Change crosshair shape, size and color", "group1,group3") + +//--------------------------------------------------------- + + // SSG Crosshair + + ADD_TAB( + "^_S^_SG Crosshair.", + "S", 3, "group1,group2", + alignrect "tab2" ITEM_ALIGN_RIGHT -76 0 76 TAB_HEIGHT + ) + ADD_HINT("hint_tab3", "Change the shape, size and color of the sniper rifle crosshair", "group1,group2") + +/* +========================================================== + +Group # 1 - Gameplay + +========================================================== +*/ + + //Icon + + itemdef { + name "icon,allgroups,group1" + background UI_ASSETS"/icons/rq3-setup-options" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + + // Simple items // + + BEGIN_OPTION("Simple items", "cg_simpleitems", ITEM_TYPE_YESNO, 1, 1) + kind YESNO_ICON_RIGHT + alignrect "line" ITEM_ALIGN_LEFT 112 32 32 VSIZE + ASSIGN_HINT("hint_simpleitems") + END_OPTION + ADD_HINT("hint_simpleitems", "Display weapons, items and ammo as 2D sprites", "group1") + + + // Low quality sky // + + BEGIN_OPTION("Low quality sky", "r_fastsky", ITEM_TYPE_YESNO, 2, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl1") + ASSIGN_HINT("hint_fastsky") + END_OPTION + ADD_HINT("hint_fastsky", "Use a solid color sky (better performance, lower quality)", "group1") + + + // Ejecting brass // + + BEGIN_OPTION("Ejecting Brass", "cg_brassTime", ITEM_TYPE_MULTI, 3, 1) + cvarFloatList { + "High" 2500 + "Med" 1250 + "Off" 0 + } + OPTION_BELOW("gr1_ctrl2") + ASSIGN_HINT("hint_brasstime") + END_OPTION + ADD_HINT("hint_brasstime", "Change the amount of ejecting brass", "group1") + + + // Wall marks // + + BEGIN_OPTION("Wall marks", "cg_marks", ITEM_TYPE_YESNO, 4, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl3") + ASSIGN_HINT("hint_wallmarks") + END_OPTION + ADD_HINT("hint_wallmarks", "Enable wall marks", "group1") + + + // Dynamic lights // + + BEGIN_OPTION("Dynamic lights", "r_dynamiclight", ITEM_TYPE_YESNO, 5, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl4") + ASSIGN_HINT("hint_dlights") + END_OPTION + ADD_HINT("hint_dlights", "Enable dynamic lighting", "group1") + + + // Identify target // + + BEGIN_OPTION("Identify Target", "cg_drawCrosshairNames", ITEM_TYPE_YESNO, 6, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl5") + ASSIGN_HINT("hint_idtarget") + END_OPTION + ADD_HINT("hint_idtarget", "Enable crosshair target identification", "group1") + + + // V-SYNC // + + BEGIN_OPTION("Sync Every Frame", "r_finish", ITEM_TYPE_YESNO, 7, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl6") + ASSIGN_HINT("hint_vsync") + END_OPTION + ADD_HINT("hint_vsync", "Enable V-SYNC (recommended off)", "group1") + + + // Force player models // + + BEGIN_OPTION("Force Player Models", "cg_forceModel", ITEM_TYPE_YESNO, 8, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl7") + ASSIGN_HINT("hint_forcemodel") + END_OPTION + ADD_HINT("hint_forcemodel", "Force player models to your own", "group1") + + + // + // + // RIGHT COLUMN // + // + // + + + // Draw Team Overlay // + + BEGIN_OPTION("Draw Team Overlay", "cg_drawTeamOverlay", ITEM_TYPE_YESNO, 9, 1) + kind YESNO_ICON_RIGHT + alignrect "line" ITEM_ALIGN_CENTER 128 32 32 VSIZE + ASSIGN_HINT("hint_teamoverlay") + END_OPTION + ADD_HINT("hint_teamoverlay", "Choose team overlay position", "group1") + + + // Allow download from server // + + BEGIN_OPTION("Allow Download", "cl_allowDownload", ITEM_TYPE_YESNO, 10, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl9") + ASSIGN_HINT("hint_allowdl") + END_OPTION + ADD_HINT("hint_allowdl", "Allow automatic downloads from server", "group1") + + + // Muzzle flash // + + BEGIN_OPTION("Muzzle Flash", "cg_RQ3_flash", ITEM_TYPE_YESNO, 11, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl10") + ASSIGN_HINT("hint_muzzle") + END_OPTION + ADD_HINT("hint_muzzle", "Enable weapon muzzle flashes", "group1") + + + // Pain blends // + + BEGIN_OPTION("Pain Blends", "cg_RQ3_painBlend", ITEM_TYPE_YESNO, 12, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl11") + ASSIGN_HINT("hint_painblend") + END_OPTION + ADD_HINT("hint_painblend", "Enable screen pain blends", "group1") + + + // Announcer // + + BEGIN_OPTION("Announcer", "cg_RQ3_announcer", ITEM_TYPE_YESNO, 13, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl12") + ASSIGN_HINT("hint_announcer") + END_OPTION + ADD_HINT("hint_announcer", "Enable Quake 3 announcer", "group1") + + + // Impact effects // + + BEGIN_OPTION("Impact Effects", "cg_RQ3_impactEffects", ITEM_TYPE_YESNO, 14, 1) + kind YESNO_ICON_RIGHT + OPTION_BELOW("gr1_ctrl13") + ASSIGN_HINT("hint_impactfx") + END_OPTION + ADD_HINT("hint_impactfx", "Enable visual projectile impact effects", "group1") + + + // Punkbuster // + + //BEGIN_OPTION("Punkbuster Enabled", "cl_punkbuster", ITEM_TYPE_YESNO, 15, 1) + // kind YESNO_ICON_RIGHT + // OPTION_BELOW("gr1_ctrl14") + // ASSIGN_HINT("hint_punkbuster") + //END_OPTION + // ADD_HINT("hint_punkbuster", "Enable client-side Punkbuster (game restart is needed)", "group1") + +/* +========================================================== + +Group # 2 - Crosshair + +========================================================== +*/ + + //Icon + + itemdef { + name "icon,allgroups,group2" + background UI_ASSETS"/icons/rq3-setup-crosshair" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + + + // Crosshair // + + itemdef { + name "allgroups,group2,gr2_ctrl1,fade_alpha" + ownerdraw UI_CROSSHAIR + text "Crosshair:" + alignrect "line" ITEM_ALIGN_LEFT 112 32 VSIZE VSIZE + textalign ITEM_ALIGN_RIGHT + textalignx 0 + textaligny 14 + textscale .225 + forecolor OPTION_COLOR + visible 1 + ASSIGN_HINT("hint_crosshair") + } + + ADD_HINT("hint_crosshair", "Change regular crosshair style", "group2") + + + // Crosshair size // + + BEGIN_OPTION("Crosshair Size", "cg_crosshairSize", ITEM_TYPE_MULTI, 2, 2) + OPTION_BELOW("gr2_ctrl1") + ASSIGN_HINT("hint_crosshairsize") + cvarFloatList { + "Small" 16 + "Med" 24 + "Big" 32 + } + END_OPTION + ADD_HINT("hint_crosshairsize", "Change the size of the regular crosshair", "group2") + + // Crosshair color // + + BEGIN_SLIDER("Red", "cg_RQ3_crosshairColorR", 1, 0, 1, 3, 2) + alignrect "gr2_ctrl2" ITEM_ALIGN_LEFT -64 24 112 VSIZE + ASSIGN_HINT("hint_color") + END_OPTION + + BEGIN_SLIDER("Green", "cg_RQ3_crosshairColorG", 1, 0, 1, 4, 2) + OPTION_BELOW("gr2_ctrl3") + ASSIGN_HINT("hint_color") + END_OPTION + + BEGIN_SLIDER("Blue", "cg_RQ3_crosshairColorB", 1, 0, 1, 5, 2) + OPTION_BELOW("gr2_ctrl4") + ASSIGN_HINT("hint_color") + END_OPTION + + BEGIN_SLIDER("Alpha", "cg_RQ3_crosshairColorA", 1, 0, 1, 6, 2) + OPTION_BELOW("gr2_ctrl5") + ASSIGN_HINT("hint_color") + END_OPTION + + + ADD_HINT("hint_color", "Drag the slider to alter the color of the crosshair", "group2") + +/* +========================================================== + +Group # 3 - Misc + +========================================================== +*/ + + //Icon + + itemdef { + name "icon,allgroups,group3" + background UI_ASSETS"/icons/rq3-setup-crosshair" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + +} +} + + + #include "ui/menudef.h" #define RQ3_Option_Color .75 .75 .75 1 { menuDef { - name "options_menu" + name "options_menu_old" background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" // to use the old background fullScreen MENU_TRUE @@ -81,7 +505,7 @@ name "options_icon" style WINDOW_STYLE_SHADER rect 8 8 48 48 - background "menu/art/rq3-setup-options.tga" + background UI_ASSETS"/icons/rq3-setup-options.tga" decoration visible 1 } @@ -90,7 +514,7 @@ name "options_title" style WINDOW_STYLE_SHADER rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" + background UI_ASSETS"/icons/rq3-title-setup.tga" decoration visible 1 } @@ -148,7 +572,7 @@ itemdef { style WINDOW_STYLE_SHADER rect 96 68 24 24 - background "menu/art/rq3-setup-options.tga" + background UI_ASSETS"/icons/rq3-setup-options.tga" decoration visible 1 } @@ -188,7 +612,7 @@ itemdef { style WINDOW_STYLE_SHADER rect 388 68 24 24 - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 decoration visible 1 @@ -949,11 +1373,11 @@ style WINDOW_STYLE_SHADER rect 12 432 32 32 type ITEM_TYPE_BUTTON - background "menu/art/rq3-menu-back.tga" + background UI_ASSETS"/icons/rq3-menu-back.tga" action { close _self ; open setup_menu ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-back-focus-anim" ; show hint_back ; timeFade hint_back forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-back.tga" ; timeFade hint_back forecolor .9 .9 .9 0 0 250 } visible 1 } diff --git a/reaction/uifiles/password.menu b/reaction/uifiles/password.menu index 95dd3a44..792d4073 100644 --- a/reaction/uifiles/password.menu +++ b/reaction/uifiles/password.menu @@ -1,5 +1,11 @@ #include "ui/menudef.h" +#define FADEIN_TIME 125 +#define BACK_COLOR1 .85 .9 .85 1 +#define BACK_COLOR2 .95 .95 .98 1 + +#define ANGLES 2 -88 + { // PASSWORD POPUP MENU // @@ -7,23 +13,39 @@ name "password_popmenu" visible 0 fullscreen 0 - rect 180 200 280 60 - focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items - style WINDOW_STYLE_EMPTY - border 1 + rect 260 192 272 80 + anglevectors ANGLES + focusColor .25 .25 .5 1 popup - onOpen { play "sound/misc/menu1.wav" ; setfocus passwordEntry } - onESC { close password_popmenu ; open joinserver } + style WINDOW_STYLE_EMPTY + //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } + //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } + onOpen { + //setrandomitemcolor postit forecolor 2 BACK_COLOR1 BACK_COLOR2 ; + setitemcolor window forecolor 5 5 5 0 ; + timefade window forecolor 5 5 5 1 0 FADEIN_TIME ; + play "sound/ui/whoosh3.wav" ; + setQuitText confirm ; + setfocus no + } + //onOpen { play "sound/misc/menu1.wav" ; setfocus passwordEntry } + //onESC { close password_popmenu ; open joinserver } + onESC { close _self ; open _prev } + onOOBClick { close _self ; open _prev } - itemDef { - name window - rect 0 0 280 48 - style WINDOW_STYLE_FILLED - border 1 - borderSize 1 - bordercolor Ig_Window_BorderColor - backcolor Ig_Window_Color - shadowStyle 1 + + itemDef { + renderpoint + name "postit" + menuAnchor + group window + style WINDOW_STYLE_SHADER + //style WINDOW_STYLE_FILLED + background UI_ASSETS"/paper_1" + forecolor 1 1 .92 1 + //backcolor .94 .94 .82 1 + rect -8 0 300 88 + anglevectors ANGLES visible 1 decoration } @@ -31,22 +53,37 @@ // PASSWORD // itemDef { + renderpoint name password text "Password:" style 0 decoration textscale .25 - rect 0 14 80 20 + alignrect postit ITEM_ALIGN_LEFT 16 24 52 20 textalign ITEM_ALIGN_LEFT textalignx 20 textaligny 16 - forecolor 1 1 1 1 + forecolor 0 0 .15 1 + visible 1 + } + + itemDef { + name password_dots + text "............................" + style 0 + decoration + textscale .25 + alignrect password ITEM_ALIGN_LEFT 80 2 120 20 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 16 + forecolor 0 0 .15 1 visible 1 } itemDef { name passwordEntry - style WINDOW_STYLE_FILLED + style WINDOW_STYLE_EMPTY text "" textalign ITEM_ALIGN_LEFT textalignx 4 @@ -56,30 +93,25 @@ textscale .25 type ITEM_TYPE_EDITFIELD cvar "password" - rect 100 14 120 20 - border 1 - bordersize 1 - bordercolor .25 .25 .25 1 - forecolor 1 1 1 1 - backcolor 1 1 1 .1 + alignrect password_dots ITEM_ALIGN_LEFT 0 0 120 20 + forecolor 0 0 .15 1 + backcolor 1 0 0 .5 visible 1 - onfocus { setcolor backcolor 1 1 1 .2 ; } - leavefocus { setcolor backcolor 1 1 1 .1 ; } } // OK // itemDef { - text "Ok" + text "^_O^_K" shortcutKey "O" type ITEM_TYPE_BUTTON textscale .25 style WINDOW_STYLE_EMPTY - rect 240 14 60 20 + alignrect passwordEntry ITEM_ALIGN_LEFT 140 0 60 20 textalign 1 textalignx 8 textaligny 16 - forecolor 1 1 1 1 + forecolor 0 0 .15 1 visible 1 action { play "sound/misc/menu1.wav" ; close password_popmenu ; open joinserver } } diff --git a/reaction/uifiles/player.menu b/reaction/uifiles/player.menu index e60d1b49..8456c97e 100644 --- a/reaction/uifiles/player.menu +++ b/reaction/uifiles/player.menu @@ -1,124 +1,132 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 + +#define ANGLES 6 -84 + +#define RQ3_Player_Option_Color 0 0 .1 1 +#define RQ3_Player_Tab_Color1 0 0 0 1 +#define RQ3_Player_Tab_Color2 .4 .4 .4 1 { - menuDef { + menuDef { + renderpoint name "player_menu" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the current background - fullScreen MENU_TRUE - visible 0 // Visible on open + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items - - - onOpen { uiScript update "ui_GetName" ; play "sound/misc/menu1.wav" } + rect 104 96 288 348 + anglevectors ANGLES + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open _prev } + onOpen { uiScript update "ui_GetName" ; play "sound/ui/whoosh3.wav" ; uiScript LoadMods ; + setitemcolor hints forecolor .9 .9 .9 1 ; hide hints ; + hide focus } onClose { uiScript update "ui_SetName" } - onEsc { close player_menu ; open setup_menu } + onEsc { close _self ; open main } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } -//================= -// RQ3 stuff -//================= - - itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_PLAYER 1 + rect -8 -16 320 420 + anglevectors ANGLES + anglevectors 6 -84 visible 1 + decoration } - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration + //Title + + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Player" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignRect paper ITEM_ALIGN_CENTER -12 40 240 20 visible 1 + autowrapped + decoration } - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration + //Description + + itemdef { + text "Please fill out the form below" + autowrapped + subgroup "fade_fore_alpha" + forecolor .25 .25 .25 1 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 12 + textscale .2 + alignrect "title" ITEM_ALIGN_LEFT 0 28 240 16 + style WINDOW_STYLE_EMPTY + type ITEM_TYPE_BUTTON visible 1 + decoration } - itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } + //Line - itemdef { - name "player_icon" + itemDef { + name "line" + subgroup "fade_fore_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 240 2 + visible 1 + decoration + } + + //Icon + + itemdef { + name icon + background UI_ASSETS"/icons/rq3-setup-player" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 style WINDOW_STYLE_SHADER - rect 8 8 48 48 - background "menu/art/rq3-setup-player.tga" - decoration - visible 1 - } - - itemdef { - name "player_title" - style WINDOW_STYLE_SHADER - rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" - decoration - visible 1 - } - - itemdef { - name overlay - style 1 - forecolor 0 0 0 1 - backcolor RQ3_MENU_OVERLAY_COLOR - rect 0 58 640 360 visible 1 decoration - } - -//================= -// Buttons, lists -//================= + } -//Player model display + //Player model display itemdef { name "model_preview" ownerdraw UI_PLAYERMODEL style 1 - rect 0 80 240 320 - visible 1 + alignrect "line" ITEM_ALIGN_LEFT 0 0 150 200 + visible 0 decoration } @@ -127,103 +135,123 @@ itemdef { name "name_caption" + subgroup "fade_fore_alpha" style 0 - text "Player name:" - rect 220 120 120 20 - textstyle 3 - textscale .28 + text "Name:" + alignrect "line" ITEM_ALIGN_LEFT 16 20 208 20 + textscale .225 textalign 0 textalignx 4 textaligny 16 - forecolor 1 1 .75 1 + forecolor RQ3_Player_Option_Color + visible 1 + decoration + } + + itemdef { + name "name_dotted_line" + subgroup "fade_fore_alpha" + style 0 + text ".............................................." + alignrect "name_caption" ITEM_ALIGN_RIGHT 0 0 168 20 + textscale .225 + textalign ITEM_ALIGN_RIGHT + textalignx 168 + textaligny 20 + forecolor RQ3_Player_Option_Color visible 1 decoration } itemdef { name "namefield" - rect 220 140 232 20 + subgroup "fade_fore_alpha" + alignrect "name_caption" ITEM_ALIGN_RIGHT 0 0 168 20 type ITEM_TYPE_EDITFIELD - style 1 + style 0 text "" cvar "ui_Name" backcolor 0 0 0 .1 - forecolor 1 1 1 1 - outlinecolor 1 1 1 .15 - border 1 - bordersize 1 - bordercolor .5 .5 .5 .75 + forecolor 0 0 0 1 + outlinecolor 0 0 1 .5 + border 0 textstyle 0 maxchars 20 - textscale .25 + textscale .225 textalign 0 textalignx 4 textaligny 16 visible 1 - onFocus { setitemcolor namefield backcolor 0 0 0 .25 ; show name_hint ; - timeFade name_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setitemcolor namefield backcolor 0 0 0 .1 ; - timeFade name_hint forecolor .9 .9 .9 0 0 250 } } + +//Radio voice + itemdef { - name name_hint - text "Enter player name" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 + name "voice_caption" + subgroup "fade_fore_alpha" style 0 - visible 0 - decoration - } - -//Player model selection - - itemdef { - name "headlist_caption" - style WINDOW_STYLE_EMPTY - type ITEM_TYPE_EDITFIELD - text "Player model:" - cvar "model" - rect 220 210 120 20 - textstyle 3 - textscale .28 + text "Radio Voice:" + alignrect "name_caption" ITEM_ALIGN_LEFT 0 24 208 20 + textscale .225 textalign 0 textalignx 4 textaligny 16 - forecolor 1 1 .75 1 + forecolor RQ3_Player_Option_Color visible 1 decoration } itemdef { - name "headlist_window" - rect 220 230 392 108 - style WINDOW_STYLE_FILLED - border 1 - bordersize 1 - bordercolor .5 .5 .5 .75 - backcolor 0 0 0 .1 + name "voice_dotted_line" + subgroup "fade_fore_alpha" + style 0 + text "......................................" + alignrect "voice_caption" ITEM_ALIGN_RIGHT 0 0 148 20 + textscale .225 + textalign ITEM_ALIGN_RIGHT + textalignx 148 + textaligny 20 + forecolor RQ3_Player_Option_Color visible 1 decoration } + itemdef { + name "voicefield" + subgroup "fade_fore_alpha" + alignrect "voice_caption" ITEM_ALIGN_RIGHT 0 0 148 20 + type ITEM_TYPE_MULTI + style 0 + text "" + cvar "cg_RQ3_radiovoice_male" + cvarFloatList { "New" 1 , "Pikey" 2 , "Pirate" 3 , "Keanu" 4 , "Original" 5} + backcolor 0 0 0 .1 + forecolor 0 0 0 1 + textstyle 0 + textscale .225 + textalign 0 + textalignx 8 + textaligny 16 + visible 1 + } + +//Head list + itemdef { name "headlist" - rect 230 240 372 88 - style 0 + subgroup "fade_fore_alpha" + alignrect "voice_caption" ITEM_ALIGN_LEFT 0 24 208 60 + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 type ITEM_TYPE_LISTBOX forecolor 1 1 1 1 - outlinecolor 1 1 .1 1 + outlinecolor 0 0 1 .15 border 0 bordersize 2 - bordercolor 1 1 .5 .5 - elementwidth 61 - elementheight 61 + bordercolor 1 0 0 1 + elementwidth 41 + elementheight 41 elementtype LISTBOX_IMAGE feeder FEEDER_Q3HEADS horizontalscroll @@ -236,50 +264,114 @@ timeFade headlist_hint forecolor .9 .9 .9 0 0 250 } } +//Model name + itemdef { - name headlist_hint - text "Click to change player model" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 + name "model_caption" + subgroup "fade_fore_alpha" style 0 - visible 0 - decoration - } - -//Back - - itemdef { - name "btn_back" - style WINDOW_STYLE_SHADER - rect 12 432 32 32 - type 1 + text "Model:" + alignrect "headlist" ITEM_ALIGN_LEFT 0 64 208 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + forecolor RQ3_Player_Option_Color visible 1 - background "menu/art/rq3-menu-back.tga" - action { close player_menu; open setup_menu ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; - show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; - timeFade back_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name back_hint - text "Go back to setup menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 decoration } -} \ No newline at end of file + itemdef { + name "model_dotted_line" + subgroup "fade_fore_alpha" + style 0 + text ".............................................." + alignrect "model_caption" ITEM_ALIGN_RIGHT 0 0 168 20 + textscale .225 + textalign ITEM_ALIGN_RIGHT + textalignx 168 + textaligny 20 + forecolor RQ3_Player_Option_Color + visible 1 + decoration + } + + itemdef { + name "modelfield" + subgroup "fade_fore_alpha" + alignrect "model_caption" ITEM_ALIGN_RIGHT 0 0 168 20 + type ITEM_TYPE_EDITFIELD + style 0 + text "" + cvar "model" + backcolor 0 0 0 .1 + forecolor 0 0 0 1 + outlinecolor 0 0 1 .5 + border 0 + textstyle 0 + maxchars 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + visible 1 + decoration + } + + +//Gender + + itemdef { + name "gender_caption" + subgroup "fade_fore_alpha" + style 0 + text "Gender:" + alignrect "model_caption" ITEM_ALIGN_LEFT 0 32 208 20 + textscale .225 + textalign 0 + textalignx 4 + textaligny 16 + forecolor RQ3_Player_Option_Color + visible 1 + decoration + } + + itemdef { + text "Male" + subgroup "fade_fore_alpha" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 16 + textscale .225 + alignrect "gender_caption" ITEM_ALIGN_LEFT 64 0 64 20 + type ITEM_TYPE_YESNO + kind YESNO_ICON_RIGHT + cvar "ui_RQ3_gender" + groupIndex 1 + activeCvarValue 0 + style WINDOW_STYLE_EMPTY + visible 1 + } + + itemdef { + text "Female" + subgroup "fade_fore_alpha" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 16 + textscale .225 + alignrect "gender_caption" ITEM_ALIGN_RIGHT 0 0 64 20 + type ITEM_TYPE_YESNO + kind YESNO_ICON_RIGHT + cvar "ui_RQ3_gender" + groupIndex 1 + activeCvarValue 1 + style WINDOW_STYLE_EMPTY + visible 1 + } + + +} +} diff --git a/reaction/uifiles/quit.menu b/reaction/uifiles/quit.menu index ae4f3ecc..6b922b97 100644 --- a/reaction/uifiles/quit.menu +++ b/reaction/uifiles/quit.menu @@ -1,37 +1,45 @@ #include "ui/menudef.h" +#define FADEIN_TIME 125 +#define BACK_COLOR1 .94 .94 .82 1 +#define BACK_COLOR2 1 .95 .8 1 + { - \\ QUIT POPUP MENU \\ + + // QUIT POPUP MENU // menuDef { name "quit_popmenu" visible 0 - rect 332 182 180 152 + rect 348 182 144 128 anglevectors -10 -100 focusColor .25 .25 .5 1 popup - outOfBoundsClick //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } onOpen { - setrandomitemcolor postit forecolor 2 .94 .94 .82 1 1 .95 .8 1 ; - setitemcolor window forecolor 2 2 2 0 ; - timefade window forecolor 2 2 2 1 0 100 ; + setrandomitemcolor postit forecolor 2 BACK_COLOR1 BACK_COLOR2 ; + setitemcolor window forecolor 5 5 5 0 ; + timefade window forecolor 5 5 5 1 0 FADEIN_TIME ; play "sound/ui/whoosh3.wav" ; - setQuitText confirm + setQuitText confirm ; + setfocus no } - onESC { close quit_popmenu ; open main } + onESC { close _self ; open main } + onOOBClick { close _self ; open main } itemDef { + renderpoint name "postit" + menuAnchor group window style WINDOW_STYLE_SHADER //style WINDOW_STYLE_FILLED - background "ui/assets/post_it" - forecolor .94 .94 .82 .9 + background UI_ASSETS"/post_it" + forecolor .94 .94 .82 1 //backcolor .94 .94 .82 1 - rect 0 0 180 152 + rect -16 0 180 152 anglevectors -10 -100 visible 1 decoration @@ -50,7 +58,7 @@ style WINDOW_STYLE_EMPTY backcolor 0 0 0 .1 textscale .25 - rect 32 24 112 32 + rect 16 24 112 32 adjustrect textalign 1 textalignx 56 @@ -80,7 +88,7 @@ textaligny 12 forecolor 0 0 .15 1 visible 1 - action { close main ; close quit_popmenu ; open credit } + action { close main ; close _self ; open credit } } // NO // @@ -102,8 +110,11 @@ textaligny 12 forecolor 0 0 .15 1 visible 1 - action { close quit_popmenu ; open main } + action { close _self ; open main } } } + + + } \ No newline at end of file diff --git a/reaction/uifiles/replacements.menu b/reaction/uifiles/replacements.menu index a08eeeae..51718f4b 100644 --- a/reaction/uifiles/replacements.menu +++ b/reaction/uifiles/replacements.menu @@ -82,7 +82,7 @@ name "options_icon" style WINDOW_STYLE_SHADER rect 8 8 48 48 - background "menu/art/rq3-setup-replacements" + background UI_ASSETS"/icons/rq3-setup-replacements" decoration visible 1 } @@ -91,7 +91,7 @@ name "options_title" style WINDOW_STYLE_SHADER rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" + background UI_ASSETS"/icons/rq3-title-setup.tga" decoration visible 1 } @@ -354,11 +354,11 @@ style WINDOW_STYLE_SHADER rect 12 432 32 32 type ITEM_TYPE_BUTTON - background "menu/art/rq3-menu-back.tga" + background UI_ASSETS"/icons/rq3-menu-back.tga" action { close _self ; open setup_menu ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-back-focus-anim" ; show hint_back ; timeFade hint_back forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-back.tga" ; timeFade hint_back forecolor .9 .9 .9 0 0 250 } visible 1 } diff --git a/reaction/uifiles/setup.menu b/reaction/uifiles/setup.menu index dd857675..dc9d6571 100644 --- a/reaction/uifiles/setup.menu +++ b/reaction/uifiles/setup.menu @@ -1,5 +1,493 @@ #include "ui/menudef.h" +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 + +#define ANGLES -10 -100 + +{ + + menuDef { + renderpoint + name "setup_menu" + visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE + focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 128 96 288 348 + anglevectors ANGLES + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self ; open main } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript LoadMods ; + setitemcolor hints forecolor .9 .9 .9 1 ; hide hints ; + hide focus } + onEsc { close _self ; open main } + + onOpenSpecial { + //normal items + setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ; + timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } + + + + itemDef { + name "paper" + menuAnchor + subgroup "fade_fore_alpha" + style WINDOW_STYLE_SHADER + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_SETUP 1 + rect -8 -16 320 420 + anglevectors ANGLES + visible 1 + decoration + } + + //Title + + itemdef { + renderpoint + name "title" + subgroup "fade_fore_alpha" + text "Options:" + forecolor .0 .0 .1 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignRect paper ITEM_ALIGN_CENTER -12 40 240 20 + visible 1 + autowrapped + decoration + } + + itemdef { + text "Configure Reaction to suit your\n" + "unique needs" + autowrapped + subgroup "fade_fore_alpha" + forecolor .25 .25 .25 1 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 12 + textscale .2 + alignrect "title" ITEM_ALIGN_LEFT 0 28 240 16 + style WINDOW_STYLE_EMPTY + type ITEM_TYPE_BUTTON + visible 1 + decoration + } + + //Line + + itemDef { + name "line" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 60 240 2 + visible 1 + decoration + } + + //Icon + + itemdef { + name icon + background UI_ASSETS"/icons/rq3-menu-setup" + forecolor 1 1 1 ICON_ALPHA + //rect 336 12 32 32 + alignrect "line" ITEM_ALIGN_RIGHT 0 -48 32 32 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + +// Player options + + itemdef { + name "btn_player" + text "> ^_P^_layer" + shortcutKey "P" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect title ITEM_ALIGN_LEFT 2 64 36 20 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { openspecial player_menu } + } + + itemdef { + text "Select your name and appearance" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_player" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +// Controls + + itemdef { + name "btn_controls" + text "> ^_C^_ontrols" + shortcutKey "C" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect "btn_player" ITEM_ALIGN_LEFT 0 36 96 24 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { openSpecial controls_menu } + } + + itemdef { + text "Customize controls and keyboard shortcuts" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_controls" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +// System + + itemdef { + name "btn_system" + text "> ^_S^_ystem" + shortcutKey "S" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect "btn_controls" ITEM_ALIGN_LEFT 0 36 96 24 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { openSpecial system_menu } + } + + itemdef { + text "Graphics, sound and network" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_system" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +// Game + + itemdef { + name "btn_game" + text "> ^_G^_ame options" + shortcutKey "G" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect "btn_system" ITEM_ALIGN_LEFT 0 36 96 24 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { openSpecial options_menu } + } + + itemdef { + text "Optimize your gaming experience" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_game" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +// Replacements + + itemdef { + name "btn_replace" + text "> ^_R^_eplacements" + shortcutKey "R" + forecolor 0 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect "btn_game" ITEM_ALIGN_LEFT 0 36 96 24 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { openSpecial replacements_menu } + } + + itemdef { + text "Customize your weapon and item appearance" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_replace" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +// Reset to defaults + + itemdef { + name "btn_reset" + text "> Reset ^_a^_ll settings" + shortcutKey "A" + //forecolor 0 0 0 1 + forecolor .5 0 0 1 + textalign 0 + textalignx 0 + textaligny 20 + textscale UI_MAIN_TEXTSIZE + alignrect "btn_replace" ITEM_ALIGN_LEFT 0 48 96 24 + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + visible 1 + action { open reset_popmenu ; } + } + + itemdef { + text "This will reset all settings back to defaults" + forecolor .25 .25 .25 1 + textalign 0 + textalignx 12 + textaligny 12 + textscale 0.2 + alignrect "btn_reset" ITEM_ALIGN_LEFT 0 20 96 24 + type ITEM_TYPE_TEXT + style 0 + visible 1 + decoration + } + +} + + + + menuDef { + name "reset_popmenu" + visible 0 + rect 170 180 300 100 + anglevectors 10 -80 + focusColor RQ3_MAIN_FOCUSCOLOR + //outOfBoundsClick + onOOBClick { close _self ; open _prev } + popup + //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } + //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } + onopen { setfocus no ; } + onESC { close reset_popmenu ; open setup_menu ; } + + + // itemDef { + //name window + //style WINDOW_STYLE_SHADER + //background "ui/assets/fake_gradient_75" + //rect 0 0 300 100 + //border 4 + //bordersize 2 + //bordercolor 1 0 0 1 + //visible 1 + //decoration + // } + + + + itemDef { + renderpoint + name "postit" + menuAnchor + group window + style WINDOW_STYLE_SHADER + background UI_ASSETS"/post_it" + //forecolor .96 .91 .68 1 + forecolor 1 .99 .75 1 + rect -16 0 180 152 + anglevectors 10 -80 + visible 1 + decoration + } + + // RESET // + + // itemDef { + //name confirm + //autowrapped + //text "Reset all settings ?" + //style 0 + //textscale .32 + //textstyle 3 + //rect 50 16 200 48 + //textalign 1 + //textalignx 100 + //textaligny 16 + //decoration + //forecolor 1 1 1 1 + //visible 1 + // } + + itemDef { + renderpoint + name confirm + group window + autowrapped + text "Reset all settings ?" + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 + textscale .25 + rect 16 24 112 32 + adjustrect + textalign 1 + textalignx 56 + textaligny 16 + decoration + //forecolor 0 0 .15 1 + forecolor .5 0 0 1 + visible 1 + } + + + // YES // + + // itemDef { + //name yes + //text "^_Y^_ES" + //shortcutKey "Y" + //type 1 + //style 0 + //textscale .32 + //textstyle 3 + //rect 100 64 50 32 + //textalign 1 + //textalignx 25 + //textaligny 16 + //forecolor 1 1 1 1 + //visible 1 + //action { close reset_popmenu ; close setup_menu ; open main ; uiScript resetDefaults ; } + //mouseEnter { setitemcolor yes backcolor .1 .37 .1 1 } + //mouseExit { setitemcolor yes backcolor .37 .1 .1 1 } + // } + + // YES // + + itemDef { + name yes + group window + text "^_Y^_ES" + shortcutKey "Y" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 + textscale .25 + alignrect confirm ITEM_ALIGN_LEFT 20 56 32 16 + textalign ITEM_ALIGN_CENTER + textalignx 16 + textaligny 12 + forecolor 0 0 .15 1 + visible 1 + action { close reset_popmenu ; close setup_menu ; open main ; uiScript resetDefaults ; } + } + + + + // NO // + + // itemDef { + //name no + //text "^_N^_O" + //shortcutKey "N" + //type 1 + //style 0 + //textscale .3 + //textstyle 3 + //rect 150 64 50 32 + //textalign 1 + //textalignx 25 + //textaligny 16 + //forecolor 1 1 1 1 + //visible 1 + //action { close reset_popmenu ; open setup_menu } + //mouseEnter { setitemcolor no backcolor .1 .37 .1 1 } + //mouseExit { setitemcolor no backcolor .37 .1 .1 1 } + // } + + // NO // + + itemDef { + name no + group window + text "^_N^_O" + shortcutKey "N" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + backcolor 0 0 0 .1 + textscale .25 + alignrect confirm ITEM_ALIGN_RIGHT 20 56 32 16 + textalign ITEM_ALIGN_CENTER + textalignx 16 + textaligny 12 + forecolor 0 0 .15 1 + visible 1 + action { close _self ; open setup_menu } + } + + } + +} + + +// +// +// old menu + +#if 0 + +#include "ui/menudef.h" { menuDef { @@ -84,7 +572,7 @@ name "setup_icon" style WINDOW_STYLE_SHADER rect 8 8 48 48 - background "menu/art/rq3-menu-setup.tga" + background UI_ASSETS"/icons/rq3-menu-setup.tga" decoration visible 1 } @@ -93,7 +581,7 @@ name "setup_title" style WINDOW_STYLE_SHADER rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" + background UI_ASSETS"/icons/rq3-title-setup.tga" decoration visible 1 } @@ -118,7 +606,7 @@ name btn_player group "topmenu" type 1 - background "menu/art/rq3-setup-player" + background UI_ASSETS"/icons/rq3-setup-player" rect 336 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -130,7 +618,7 @@ itemdef { name player_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 336 12 32 32 style WINDOW_STYLE_SHADER @@ -159,7 +647,7 @@ name btn_control group "topmenu" type 1 - background "menu/art/rq3-setup-controls" + background UI_ASSETS"/icons/rq3-setup-controls" rect 384 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -171,7 +659,7 @@ itemdef { name control_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 384 12 32 32 style WINDOW_STYLE_SHADER @@ -200,7 +688,7 @@ name btn_system group "topmenu" type 1 - background "menu/art/rq3-setup-system" + background UI_ASSETS"/icons/rq3-setup-system" rect 432 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -212,7 +700,7 @@ itemdef { name system_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 432 12 32 32 style WINDOW_STYLE_SHADER @@ -241,7 +729,7 @@ name btn_options group "topmenu" type 1 - background "menu/art/rq3-setup-options" + background UI_ASSETS"/icons/rq3-setup-options" rect 480 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -253,7 +741,7 @@ itemdef { name options_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 480 12 32 32 style WINDOW_STYLE_SHADER @@ -282,7 +770,7 @@ name btn_replacements group "topmenu" type 1 - background "menu/art/rq3-setup-replacements" + background UI_ASSETS"/icons/rq3-setup-replacements" rect 528 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -294,7 +782,7 @@ itemdef { name replacements_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 528 12 32 32 style WINDOW_STYLE_SHADER @@ -323,7 +811,7 @@ name btn_default group "topmenu" type 1 - background "menu/art/rq3-setup-defaults" + background UI_ASSETS"/icons/rq3-setup-defaults" rect 576 12 32 32 style WINDOW_STYLE_SHADER visible 1 @@ -335,7 +823,7 @@ itemdef { name default_focus - background "menu/art/rq3-menu-focus" + background UI_ASSETS"/icons/rq3-menu-focus" forecolor 1 1 1 0 rect 576 12 32 32 style WINDOW_STYLE_SHADER @@ -366,11 +854,11 @@ style WINDOW_STYLE_SHADER rect 12 432 32 32 type 1 - background "menu/art/rq3-menu-back.tga" + background UI_ASSETS"/icons/rq3-menu-back.tga" action { close setup_menu; open main ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; + onFocus { setbackground UI_ASSETS"/icons/rq3-menu-back-focus-anim" ; show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; + leaveFocus { setbackground UI_ASSETS"/icons/rq3-menu-back.tga" ; timeFade back_hint forecolor .9 .9 .9 0 0 250 } visible 1 } @@ -404,7 +892,8 @@ visible 0 rect 170 180 300 100 focusColor RQ3_MAIN_FOCUSCOLOR - outOfBoundsClick + //outOfBoundsClick + onOOBClick { close _self ; open _prev } popup //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } @@ -492,4 +981,6 @@ } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/reaction/uifiles/shared.h b/reaction/uifiles/shared.h new file mode 100644 index 00000000..2ebcfe3f --- /dev/null +++ b/reaction/uifiles/shared.h @@ -0,0 +1,194 @@ +//-------------------------------------------- + + // Common stuff // + + + + +//Copyright + + itemDef { + name "copyright,_common_" + autowrapped + text "Reaction v1.0\n" + "Copyright (c) 2000 - 2009 Boomstick Studios\n" + "Quake III Arena (c) 1999 - 2000 id Software Inc." + //style 0 + textstyle 3 + textscale .15 + //rect 0 444 272 28 + rect 384 444 272 28 + textalign 0 + textaligny 8 + textalignx 8 + //forecolor 1 1 1 .5 + forecolor 1 1 1 .75 + visible 1 + decoration + } + + //Logo + + itemDef { + name "rq3_logo,_common_" + type 1 + background UI_ASSETS"/rq3-title-logo.tga" + //rect 458 404 176 72 + rect 458 404 176 77 + //vectors 0.988 -0.156 0.156 0.988 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + + // CLIPBOARD // + + itemdef { + name "_common_" + type ITEM_TYPE_MODEL + asset_model UI_ASSETS"/models/clipboard/clipboard.md3" + rect 0 0 640 480 + model_fovx 40 + model_fovy 30 + model_origin 34 2.6 -0.25 + model_angles 90 -80.5 270 + visible 1 + decoration + } + + // CELL PHONE // + + //itemdef { + //name "_common_" + //type ITEM_TYPE_MODEL + //asset_model UI_ASSETS"/models/phone/phone.md3" + //rect 0 0 640 480 + //model_fovx 40 + //model_fovy 30 + //model_origin 20 6 5.5 + ////model_origin 20 0 0 + //model_angles 90 214 270 + ////model_rotation 0 + //visible 1 + //decoration + //} + + // CELL PHONE // + + itemdef { + name "_common_" + type ITEM_TYPE_MODEL + asset_model UI_ASSETS"/models/phone2/phone.md3" + rect 0 0 640 480 + model_fovx 40 + model_fovy 30 + //model_origin 20 6 5.5 + model_origin 20 5 5.5 + //model_angles 90 34 270 + model_angles 90 34 280 + visible 1 + decoration + } + + // CLOCK // + + itemdef { + name "clock,_common_" + ownerdraw UI_CLOCK + forecolor 1 1 1 1 + textalign 0 + //textalignx 16 + //textaligny 5 + //textalignx 16 + textaligny 20 + textscale .15 + rect 40 66 72 20 + style WINDOW_STYLE_EMPTY + visible 1 + //anglevectors 124 36 + anglevectors 122 33 + decoration + } + + + // KEYS // + + itemDef { + name "_common_" + type 1 + background "ui/assets/keys.tga" + rect 440 300 136 92 + //vectors 0.988 -0.156 0.156 0.988 + style WINDOW_STYLE_SHADER + visible 1 + decoration + } + + + // PEN // + + itemdef { + name "_common_" + type ITEM_TYPE_MODEL + asset_model UI_ASSETS"/models/pen/pen.md3" + rect 0 0 640 480 + model_fovx 40 + model_fovy 30 + model_origin 27 -6 1 + //model_origin 20 0 0 + model_angles 90 133 270 + //model_rotation 0 + visible 1 + decoration + } + + +/* + itemdef { + style WINDOW_STYLE_SHADER + forecolor .75 .75 .75 1 + background UI_ASSETS"/gun_shadow.tga" + rect 216 572 360 260 + anglevectors 156 66 + visible 1 + decoration + } +*/ + + // GUN // + + itemdef { + name "_common_" + type ITEM_TYPE_MODEL + asset_model UI_ASSETS"/models/gun/gun.md3" + rect 0 0 640 480 + model_fovx 40 + model_fovy 30 + model_origin 16 8 -8.5 + //model_origin 40 8 -8.5 + model_angles 90 156 0 + //model_angles 180 90 0 + //model_rotation 90 0 0 + visible 1 + decoration + } + + + + // BOTTLE // + + itemdef { + name "_common_" + type ITEM_TYPE_MODEL + asset_model UI_ASSETS"/models/bottle/bottle.md3" + rect 0 0 640 480 + model_fovx 40 + model_fovy 30 + model_origin 50 -16 12 + model_angles 278 198 97 + //model_angles 270 198 90 + visible 1 + decoration + } + +//-------------------------------------------- diff --git a/reaction/uifiles/specify.menu b/reaction/uifiles/specify.menu index 05f549c3..dc2b2d2d 100644 --- a/reaction/uifiles/specify.menu +++ b/reaction/uifiles/specify.menu @@ -4,11 +4,12 @@ // SPECIFY ADDRESS POPUP MENU // menuDef { - name "specify_popmenu" + name "specify_popmenu2" visible 0 fullscreen 0 rect 170 200 300 80 - outOfBoundsClick // this closes the window if it gets a click out of the rectangle + //outOfBoundsClick // this closes the window if it gets a click out of the rectangle + onOOBClick { close _self ; open _prev } focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items style WINDOW_STYLE_EMPTY border 1 @@ -109,14 +110,137 @@ itemDef { shortcutKey "G" style WINDOW_STYLE_SHADER - background "menu/art/rq3-menu-go.tga" + background UI_ASSETS"/icons/rq3-menu-go.tga" type ITEM_TYPE_BUTTON rect 260 30 32 16 visible 1 - onfocus { setbackground "menu/art/rq3-menu-go-focus-anim" } - leavefocus { setbackground "menu/art/rq3-menu-go.tga" } + onfocus { setbackground UI_ASSETS"/icons/rq3-menu-go-focus-anim" } + leavefocus { setbackground UI_ASSETS"/icons/rq3-menu-go.tga" } action { play "sound/misc/menu1.wav" ; uiScript joinSpecifiedServer } } } } + + +#include "ui/menudef.h" + +#define FADEIN_TIME 125 +#define BACK_COLOR1 .85 .9 .85 1 +#define BACK_COLOR2 .95 .95 .98 1 + +#define ANGLES -2 -92 + +{ + // SPECIFY SERVER POPUP MENU // + + menuDef { + name "specify_popmenu" + visible 0 + fullscreen 0 + rect 260 192 300 80 + anglevectors ANGLES + focusColor .25 .25 .5 1 + popup + style WINDOW_STYLE_EMPTY + //onOpen { transition window 0 50 300 0 0 0 300 100 10 4 } + //onClose { transition window 0 0 300 100 0 50 300 0 10 4 } + onOpen { + //setrandomitemcolor postit forecolor 2 BACK_COLOR1 BACK_COLOR2 ; + setitemcolor window forecolor 5 5 5 0 ; + timefade window forecolor 5 5 5 1 0 FADEIN_TIME ; + play "sound/ui/whoosh3.wav" ; + setQuitText confirm ; + setfocus no + } + //onOpen { play "sound/misc/menu1.wav" ; setfocus passwordEntry } + //onESC { close password_popmenu ; open joinserver } + onESC { close _self ; open _prev } + onOOBClick { close _self ; open _prev } + + + itemDef { + renderpoint + name "postit" + menuAnchor + group window + style WINDOW_STYLE_SHADER + //style WINDOW_STYLE_FILLED + background UI_ASSETS"/paper_1" + forecolor 1 1 .92 1 + //backcolor .94 .94 .82 1 + rect -8 0 300 88 + anglevectors ANGLES + visible 1 + decoration + } + + // PASSWORD // + + itemDef { + renderpoint + name password + text "Address:" + style 0 + decoration + textscale .25 + alignrect postit ITEM_ALIGN_LEFT 16 24 52 20 + textalign ITEM_ALIGN_LEFT + textalignx 20 + textaligny 16 + forecolor 0 0 .15 1 + visible 1 + } + + itemDef { + name password_dots + text "............................" + style 0 + decoration + textscale .25 + alignrect password ITEM_ALIGN_LEFT 80 2 120 20 + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 16 + forecolor 0 0 .15 1 + visible 1 + } + + itemDef { + name passwordEntry + style WINDOW_STYLE_EMPTY + text "" + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 14 + maxchars 20 + maxPaintChars 10 + textscale .25 + type ITEM_TYPE_EDITFIELD + cvar "password" + alignrect password_dots ITEM_ALIGN_LEFT 0 0 120 20 + forecolor 0 0 .15 1 + backcolor 1 0 0 .5 + visible 1 + } + + // OK // + + itemDef { + text "^_O^_K" + shortcutKey "O" + type ITEM_TYPE_BUTTON + textscale .25 + style WINDOW_STYLE_EMPTY + alignrect passwordEntry ITEM_ALIGN_LEFT 140 0 60 20 + textalign 1 + textalignx 8 + textaligny 16 + forecolor 0 0 .15 1 + visible 1 + action { play "sound/misc/menu1.wav" ; close password_popmenu ; open joinserver } + } + + + } +} diff --git a/reaction/uifiles/system.menu b/reaction/uifiles/system.menu index a2ec90ea..1af3f9ee 100644 --- a/reaction/uifiles/system.menu +++ b/reaction/uifiles/system.menu @@ -1,1183 +1,531 @@ #include "ui/menudef.h" -#define RQ3_System_Option_Color .75 .75 .75 1 +#include "ui/tabs.h" + +//////////////////////////////////// +// +// CONSTANTS +// +// + + +#define OPTION_COLOR 0 0 .1 1 +#define Tab_Color1 0 0 0 1 +#define Tab_Color2 0 0 .5 1 +#define VSPACE 16 +#define VSIZE 16 +#define ICON_ALPHA 0.5 +#define LINE_ALPHA 0.2 +#define FADEIN_TIME 125 +#define HINT_COLOR .25 .25 .25 +#define HINT_FADE_TIME 125 +#define LINE_WIDTH 240 + + +//////////////////////////////////// +// +// MENU DEFINITION +// +// { - - menuDef { + menuDef { name "system_menu" - background "rq3-ta-menuback" // Makro: replace "rq3-ta-menuback" with "rq3-menuback" - // to use the old background - fullScreen MENU_TRUE visible MENU_FALSE // Visible on open + //fullScreen MENU_FALSE focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items + rect 112 88 300 348 + anglevectors 4 -86 + style WINDOW_STYLE_EMPTY + popup + + onOOBClick { close _self } + onOpen { play "sound/ui/whoosh3.wav" ; uiScript loadControls ; + setitemcolor hints forecolor HINT_COLOR 1 ; hide hints ; + ACTIVATE_TAB(1) ; + } + onClose { open _prev } + onEsc { close _self } + + onOpenSpecial { + //normal items + setItemColor "fade_alpha" forecolor 5 5 5 0 ; + timeFade "fade_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ; + + //icon - special alpha + setItemColor "icon" forecolor 5 5 5 0 ; + timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ; + + //line - special alpha; using backcolor + setItemColor "line" backcolor 5 5 5 0 ; + timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ; + } - onOpen { play "sound/misc/menu1.wav" ; show graphics ; hide driver } - onEsc { close system_menu ; open setup_menu } - -//=================== -// RQ3 stuff -//=================== - - - itemDef { - name top_bar //rq3: Top bar - rect 0 0 640 56 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } - - itemDef { - name top_bar //rq3: Top bar - rect 0 58 640 12 + itemDef { + renderpoint + name "paper,fade_alpha" style WINDOW_STYLE_SHADER - background "ui/assets/rq3-main-shadow-1" - decoration + background UI_ASSETS"/paper_1" + forecolor MENUCOLOR_SYSTEM 1 + rect 0 -20 320 420 + anglevectors 4 -86 visible 1 + menuAnchor + decoration } - itemDef { - name top_bar2 //rq3: Top bar - border - rect 0 56 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration + itemdef { + renderpoint + name "title,fade_alpha" + text "System:" + forecolor .6 .0 .0 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textalignx 4 + textaligny 24 + textscale RQ3_MAIN_TEXTSIZE + alignrect paper ITEM_ALIGN_LEFT 32 40 240 36 visible 1 + autowrapped + decoration } - itemDef { - name bottom_bar //rq3: bottom bar - rect 0 420 640 60 - style 1 - backcolor RQ3_MAIN_BAR_COLOR - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration - visible 1 - } + //Line itemDef { - name bottom_bar2 //rq3: bottom bar - border - rect 0 418 640 2 - style 1 - backcolor RQ3_MAIN_BAR_COLOR2 - //border 2 - //bordersize 1 - //bordercolor 1 0 0 1 - decoration + name "line,fade_alpha" + style WINDOW_STYLE_FILLED + backcolor .25 .25 .25 LINE_ALPHA + alignrect "title" ITEM_ALIGN_LEFT 0 48 LINE_WIDTH 2 visible 1 - } + decoration + } + + /////////////////////////////////////////////////////////// + // + // Sub-options + // + // + + // Graphics + + ADD_TAB( + "^_G^_raphics.", + "G", 1, "group2,group3", + alignrect "title" ITEM_ALIGN_LEFT 2 28 48 16 + ) + ADD_HINT("hint_tab1", "Change rendering options", "group2,group3") + +//--------------------------------------------------------- + + // Driver info + + ADD_TAB( + "^_D^_river info.", + "D", 2, "group1,group3", + alignrect "tab1" ITEM_ALIGN_RIGHT -56 0 56 16 + ) + ADD_HINT("hint_tab2", "View OpenGL driver info", "group1,group3") + +//--------------------------------------------------------- + + // Misc - Display/Sound/Net + + ADD_TAB( + "^_M^_isc.", + "M", 3, "group1,group2", + alignrect "tab2" ITEM_ALIGN_RIGHT -40 0 40 16 + ) + ADD_HINT("hint_tab3", "Change display/sound/network options", "group1,group2") + +/* +========================================================== + +Group # 1 - Graphics + +========================================================== +*/ + + //Icon + + ADD_TITLE_ICON(UI_ASSETS"/icons/rq3-system-graphics", "group1") + + // Pre-defined settings // + + BEGIN_OPTION("Quality", "ui_glCustom", ITEM_TYPE_MULTI, 1, 1) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE + cvarFloatList { + "Fastest" 3 + "Fast" 2 + "Normal" 1 + "High Quality" 0 + "Custom" 4 + } + action { uiScript update "ui_glCustom" ; } + ASSIGN_HINT("hint_predef") + END_OPTION + ADD_HINT("hint_predef", "Choose pre-defined graphics settings", "group1") + + + // GL Driver // + + BEGIN_OPTION("GL Driver", "r_glDriver", ITEM_TYPE_EDITFIELD, 2, 1) + OPTION_BELOW("gr1_ctrl1") + ASSIGN_HINT("hint_gldriver") + END_OPTION + ADD_HINT("hint_gldriver", "Choose OpenGL driver (default: opengl32)", "group1") + + + // GL Extensions // + + BEGIN_OPTION("GL Extensions", "r_allowExtensions", ITEM_TYPE_YESNO, 3, 1) + OPTION_BELOW("gr1_ctrl2") + ASSIGN_HINT("hint_glext") + END_OPTION + ADD_HINT("hint_glext", "Enable OpenGL extensions", "group1") + + // Resolution // + + BEGIN_OPTION("Video Mode", "r_mode", ITEM_TYPE_MULTI, 4, 1) + cvarFloatList { + "320 x 240" 0 + "400 x 300" 1 + "512 x 384" 2 + "640 x 480" 3 + "800 x 600" 4 + "960 x 720" 5 + "1024 x 768" 6 + "1152 x 864" 7 + "1280 x 1024" 8 + "1600 x 1200" 9 + "2048 x 1536" 10 + "856 x 480 (Wide)" 11 + } + OPTION_BELOW("gr1_ctrl3") + ASSIGN_HINT("hint_res") + END_OPTION + ADD_HINT("hint_res", "Choose rendering resolution", "group1") + + + // Color depth // + + BEGIN_OPTION("Color Depth", "r_colorbits", ITEM_TYPE_MULTI, 5, 1) + cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 } + OPTION_BELOW("gr1_ctrl4") + action { uiScript glCustom ; uiScript update "r_colorbits" ; } + ASSIGN_HINT("hint_depth") + END_OPTION + ADD_HINT("hint_depth", "Choose rendering color depth", "group1") + + + // Fullscreen // + + BEGIN_OPTION("Fullscreen", "r_fullscreen", ITEM_TYPE_YESNO, 6, 1) + OPTION_BELOW("gr1_ctrl5") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_fullscreen") + END_OPTION + ADD_HINT("hint_fullscreen", "Render in full screen or a window", "group1") + + + // Lightmap/vertex // + + BEGIN_OPTION("Lighting", "r_vertexlight", ITEM_TYPE_MULTI, 7, 1) + cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } + OPTION_BELOW("gr1_ctrl6") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_lightmap") + END_OPTION + ADD_HINT("hint_lightmap", "Choose map light rendering mode", "group1") + + + // Geometric detail // + + BEGIN_OPTION("Geometric Detail", "r_lodbias", ITEM_TYPE_MULTI, 8, 1) + cvarFloatList { + "High" 0 + "Medium" 1 + "Low" 2 + } + OPTION_BELOW("gr1_ctrl7") + action { uiScript glCustom ; uiScript update "r_lodbias" } + ASSIGN_HINT("hint_geodetail") + END_OPTION + ADD_HINT("hint_geodetail", "Choose geometric detail level", "group1") + + + // Texture detail // + + BEGIN_OPTION("Texture Detail", "r_picmip", ITEM_TYPE_MULTI, 9, 1) + cvarFloatList { + "Very Low" 3 + "Low" 2 + "Normal" 1 + "High" 0 + } + OPTION_BELOW("gr1_ctrl8") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_texdetail") + END_OPTION + ADD_HINT("hint_texdetail", "Choose texture detail level", "group1") + + + // Texture quality // + + BEGIN_OPTION("Texture Quality", "r_texturebits", ITEM_TYPE_MULTI, 10, 1) + cvarFloatList { + "Default" 0 + "16 bit" 16 + "32 bit" 32 + } + OPTION_BELOW("gr1_ctrl9") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_texquality") + END_OPTION + ADD_HINT("hint_texquality", "Choose texture quality", "group1") + + + // Texture filtering mode // + + BEGIN_OPTION("Texture Filter", "r_textureMode", ITEM_TYPE_MULTI, 11, 1) + cvarStrList { + "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", + "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" + } + OPTION_BELOW("gr1_ctrl10") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_texfilter") + END_OPTION + ADD_HINT("hint_texfilter", "Choose texture filtering mode", "group1") + + + // Compressed textures // + + BEGIN_OPTION("Compress Textures", "r_ext_compressed_textures", ITEM_TYPE_YESNO, 12, 1) + OPTION_BELOW("gr1_ctrl11") + action { uiScript glCustom ; } + ASSIGN_HINT("hint_compress") + END_OPTION + ADD_HINT("hint_compress", "Enable texture compression", "group1") + + + // APPLY // itemdef { - name "system_icon" - style WINDOW_STYLE_SHADER - rect 8 8 48 48 - background "menu/art/rq3-setup-system.tga" - decoration - visible 1 - } - - itemdef { - name "system_title" - style WINDOW_STYLE_SHADER - rect 64 12 256 32 - background "menu/art/rq3-title-setup.tga" - decoration - visible 1 - } - - itemdef { - name overlay - style 1 + name "btn_apply,fade_alpha,allgroups,group1" + style WINDOW_STYLE_EMPTY + alignrect "gr1_ctrl12" ITEM_ALIGN_RIGHT 0 24 80 VSIZE + type ITEM_TYPE_BUTTON + text "^_A^_pply >" + shortcutKey "A" + textscale .225 + textstyle ITEM_TEXTSTYLE_NORMAL + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 14 forecolor 0 0 0 1 - backcolor RQ3_MENU_OVERLAY_COLOR - rect 0 58 640 360 - visible 1 - decoration - } - -//=================== -// Buttons, lists -//=================== - - -//Graphics -//Background window - - itemdef { - name grph_caption - group graphics - rect 32 72 252 20 - style WINDOW_STYLE_GRADIENT - border WINDOW_BORDER_KCGRADIENT - bordersize 1 - backcolor 0 0 .2 .75 - bordercolor .75 .75 .75 1 - text "Graphics" - textstyle ITEM_TEXTSTYLE_SHADOWED - textscale .25 - textalign 0 - textalignx 72 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - decoration - } - - itemdef { - name drv_caption - group driver - rect 32 72 252 20 - style WINDOW_STYLE_GRADIENT - border WINDOW_BORDER_KCGRADIENT - bordersize 1 - backcolor 0 0 .2 .75 - bordercolor .75 .75 .75 1 - text "Driver Info" - textstyle ITEM_TEXTSTYLE_SHADOWED - textscale .25 - textalign 0 - textalignx 72 - textaligny 14 - forecolor 1 1 1 1 - visible 0 - decoration - } - - - itemdef { - name grph_icon - group graphics - style WINDOW_STYLE_SHADER - rect 64 68 24 24 - background "menu/art/rq3-system-graphics.tga" - decoration + action { exec "vid_restart" ; } + ASSIGN_HINT("hint_apply") + anglevectors 4 -83 visible 1 } - itemdef { - name drv_icon - group driver - style WINDOW_STYLE_SHADER - rect 64 68 24 24 - background "menu/art/rq3-system-driverinfo.tga" - decoration - visible 0 - } + ADD_HINT("hint_apply", "Apply graphics changes and return to main menu", "group1") + +/* +========================================================== + +Group # 2 - Driver info + +========================================================== +*/ + + //Icon + + ADD_TITLE_ICON(UI_ASSETS"/icons/rq3-system-driverinfo", "group2") + + // DRIVER INFO // itemdef { - name grph_window - rect 32 88 252 264 - style WINDOW_STYLE_SHADER - background "ui/assets/fake_gradient_75" - border WINDOW_BORDER_KCGRADIENT - bordersize 2 - backcolor 0 0 0 .75 - bordercolor .75 .75 .75 1 - visible 1 - decoration - } - - -//Pre-defined settings - - itemdef { - name opt_predef - group graphics - type ITEM_TYPE_MULTI - text "Quality:" - cvar "ui_glCustom" - rect 152 100 112 20 - cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript update "ui_glCustom" ; } - onFocus { show predef_hint ; timeFade predef_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade predef_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name predef_hint - text "Choose pre-defined graphics settings" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Driver - - itemdef { - name opt_gldriver - group graphics - type ITEM_TYPE_EDITFIELD - text "GL Driver:" - cvar "r_glDriver" - rect 152 120 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show gldriver_hint ; timeFade gldriver_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade gldriver_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name gldriver_hint - text "Choose OpenGL driver" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//GL Extensions - - itemdef { - name opt_glext - group graphics - type ITEM_TYPE_YESNO - text "GL Extensions:" - cvar "r_allowExtensions" - rect 152 140 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show glext_hint ; timeFade glext_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade glext_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name glext_hint - text "Enable OpenGL extensions" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Resolution - - itemdef { - name opt_res - group graphics - type ITEM_TYPE_MULTI - text "Video Mode:" - cvar "r_mode" - 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 152 160 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show res_hint ; timeFade res_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade res_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name res_hint - text "Choose rendering resolution" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Color depth - - itemdef { - name opt_cldepth - group graphics - type ITEM_TYPE_MULTI - text "Color depth:" - cvar "r_colorbits" - cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 } - rect 152 180 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; uiScript update "r_colorbits" ; } - onFocus { show cldepth_hint ; timeFade cldepth_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade cldepth_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name cldepth_hint - text "Choose rendering color depth" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Fullscreen - - itemdef { - name opt_fscreen - group graphics - type ITEM_TYPE_YESNO - text "Fullscreen:" - cvar "r_fullscreen" - rect 152 200 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show fscreen_hint ; timeFade fscreen_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade fscreen_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name fscreen_hint - text "Render in full screen" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Lightmap/vertex - - itemdef { - name opt_light - group graphics - type ITEM_TYPE_MULTI - text "Lighting:" - cvar "r_vertexlight" - cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } - rect 152 220 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show light_hint ; timeFade light_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade light_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name light_hint - text "Choose map light rendering mode" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Geometric detail - - itemdef { - name opt_geodetail - group graphics - type ITEM_TYPE_MULTI - text "Geometric Detail:" - cvar "r_lodbias" - cvarFloatList { "High" 0 "Medium" 1 "Low" 2 } - rect 152 240 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; uiScript update "r_lodbias" ; } - onFocus { show geodetail_hint ; timeFade geodetail_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade geodetail_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name geodetail_hint - text "Choose geometric detail level" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Texture detail - - itemdef { - name opt_texdetail - group graphics - type ITEM_TYPE_MULTI - text "Texture Detail:" - cvar "r_picmip" - cvarFloatList { "Very Low" 3 "Low" 2 "Normal" 1 "High" 0 } - rect 152 260 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show texdetail_hint ; timeFade texdetail_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade texdetail_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name texdetail_hint - text "Choose texture detail level" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Texture quality - - itemdef { - name opt_texquality - group graphics - type ITEM_TYPE_MULTI - text "Texture Quality:" - cvar "r_texturebits" - cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 } - rect 152 280 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show texquality_hint ; timeFade texquality_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade texquality_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name texquality_hint - text "Choose texture quality" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Texture filtering mode - - itemdef { - name opt_texfilter - group graphics - type ITEM_TYPE_MULTI - text "Texture Filter:" - cvar "r_texturemode" - cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } - rect 152 300 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show texfilter_hint ; timeFade texfilter_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade texfilter_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name texfilter_hint - text "Choose texture filtering mode" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Compressed textures - - itemdef { - name opt_comptex - group graphics - type ITEM_TYPE_YESNO - text "Compress Textures:" - cvar "r_ext_compressed_textures" - rect 152 320 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript glCustom ; } - onFocus { show comptex_hint ; timeFade comptex_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade comptex_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name comptex_hint - text "Enable texture compression" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Driver info window - - itemdef { - name driver_info - group driver + name "allgroups,group2,fade_alpha,driver_info" ownerdraw UI_GLINFO - rect 40 100 244 248 + alignrect "line" ITEM_ALIGN_LEFT 0 24 220 64 style WINDOW_STYLE_EMPTY textalign ITEM_ALIGN_LEFT textalignx 8 textaligny 12 - textscale .2 - forecolor RQ3_System_Option_Color + textscale .15 + forecolor OPTION_COLOR visible 0 decoration } -//Toggle: driver info - itemdef { - name "btn_drinfo" - group graphics - style WINDOW_STYLE_SHADER - type ITEM_TYPE_BUTTON - rect 56 360 24 24 - background "menu/art/rq3-system-driverinfo" + name "allgroups,group2,gr2_ctrl1,fade_alpha,extension_list" + type ITEM_TYPE_LISTBOX + alignRect driver_info ITEM_ALIGN_LEFT 0 64 232 140 + forcetextcolor + LISTBOX_STYLE(.175, 4) + feeder FEEDER_GLDRIVER_INFO + columns 1 4 200 0 visible 1 - action { hide graphics ; show driver ; setfocus btn_graphics ; } - onFocus { setbackground "menu/art/rq3-system-driverinfo-anim" ; - show toggle_drinfo_hint ; timeFade toggle_drinfo_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-system-driverinfo" ; - timeFade toggle_drinfo_hint forecolor .9 .9 .9 0 0 250 } + onFocus { show list_hint ; timeFade list_hint forecolor .9 .9 .9 1 0 250 } + leaveFocus { timeFade list_hint forecolor .9 .9 .9 0 0 250 } } - itemdef { - name "btn_graphics" - group driver - style WINDOW_STYLE_SHADER - type ITEM_TYPE_BUTTON - rect 56 360 24 24 - background "menu/art/rq3-system-graphics" - visible 0 - action { hide driver ; show graphics ; setfocus btn_drinfo ; } - onFocus { setbackground "menu/art/rq3-system-driverinfo-anim" ; - show toggle_graphics_hint ; timeFade toggle_graphics_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-system-driverinfo" ; - timeFade toggle_graphics_hint forecolor .9 .9 .9 0 0 250 } - } - -//Toggle: graphics - - itemdef { - name toggle_drinfo_hint - text "View OpenGL driver information" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - itemdef { - name toggle_graphics_hint - text "Show graphics settings" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - - -//Apply - - itemdef { - name "btn_apply" - group graphics - style WINDOW_STYLE_FILLED - rect 184 360 80 20 - type ITEM_TYPE_BUTTON - text "apply" - textscale .25 - textstyle ITEM_TEXTSTYLE_NORMAL - textalign ITEM_ALIGN_RIGHT - textalignx 72 + itemdef { + name "allgroups,group2,fade_alpha,col1_title" + text "Supported OpenGL Extensions:" + forecolor .25 .25 .25 1 + style WINDOW_STYLE_EMPTY + textalign ITEM_ALIGN_LEFT + textscale .175 + textalignx 4 textaligny 14 - backcolor 0 0 0 .2 - forecolor 1 1 1 .9 - border 1 - bordersize 1 - bordercolor .75 .75 .75 .75 - action { exec "vid_restart" ; } - onFocus { setitemcolor btn_apply backcolor 0 0 0 .5 ; show apply_hint ; - timeFade apply_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setitemcolor btn_apply backcolor 0 0 0 .2 ; - timeFade apply_hint forecolor .9 .9 .9 0 0 250 } - - visible 1 - } - - itemdef { - name apply_hint - text "Apply graphics changes and return to main menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Display -//Background window - - itemdef { - name display_caption - rect 368 72 220 20 - style WINDOW_STYLE_GRADIENT - border WINDOW_BORDER_KCGRADIENT - bordersize 1 - backcolor 0 0 .2 .75 - bordercolor .75 .75 .75 1 - text "Display" - textstyle ITEM_TEXTSTYLE_SHADOWED - textscale .25 - textalign 0 - textalignx 72 - textaligny 14 - forecolor 1 1 1 1 + alignRect extension_list ITEM_ALIGN_LEFT 4 -16 80 16 visible 1 decoration } +/* +========================================================== + +Group # 3 - Misc + +========================================================== +*/ + + //Icon + + ADD_TITLE_ICON(UI_ASSETS"/icons/rq3-menu-setup", "group3") + + //Icon itemdef { - name display_icon + name "icon,allgroups,group3" + background UI_ASSETS"/icons/rq3-system-display" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_LEFT 0 36 24 24 style WINDOW_STYLE_SHADER - rect 400 68 24 24 - background "menu/art/rq3-system-display.tga" - decoration visible 1 - } + decoration + } + + // Brightness // + + BEGIN_SLIDER("Brightness", "r_gamma", 1, .5, 1.7, 1, 3) + alignrect "line" ITEM_ALIGN_CENTER 56 40 112 VSIZE + ASSIGN_HINT("hint_gamma") + END_OPTION + + ADD_HINT("hint_gamma", "Change image brightness", "group3") + + + // Screen size // + + BEGIN_SLIDER("Screen Size", "cg_viewsize", 100, 30, 100, 2, 3) + OPTION_BELOW("gr3_ctrl1") + ASSIGN_HINT("hint_screensize") + END_OPTION + ADD_HINT("hint_screensize", "Change rendering window size", "group3") + + + // Overbrightbits // + + BEGIN_OPTION("Overbright Bits", "r_overbrightbits", ITEM_TYPE_YESNO, 3, 3) + OPTION_BELOW("gr3_ctrl2") + ASSIGN_HINT("hint_overbits") + END_OPTION + ADD_HINT("hint_overbits", "Enable overbright bits (brighter image at the expense of quality)", "group3") + + + + // Sound // + + //Icon itemdef { - name display_window - rect 368 88 220 80 + name "icon,allgroups,group3" + background UI_ASSETS"/icons/rq3-system-sound" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_LEFT 0 112 24 24 style WINDOW_STYLE_SHADER - background "ui/assets/fake_gradient_75" - border WINDOW_BORDER_KCGRADIENT - bordersize 2 - backcolor 0 0 0 .75 - bordercolor .75 .75 .75 1 visible 1 decoration - } + } -//Brightness + // Sound volume // + + BEGIN_SLIDER("Sound Volume", "s_volume", 0.7, 0, 1, 4, 3) + alignrect "line" ITEM_ALIGN_CENTER 56 112 112 VSIZE + ASSIGN_HINT("hint_sndvol") + END_OPTION + ADD_HINT("hint_sndvol", "Change sound effects volume", "group3") + + + // Music volume // + + BEGIN_SLIDER("Music Volume", "s_musicvolume", 0.25, 0, 1, 5, 3) + OPTION_BELOW("gr3_ctrl4") + ASSIGN_HINT("hint_musicvol") + END_OPTION + ADD_HINT("hint_musicvol", "Change background music volume", "group3") + + + // Sound quality // + + BEGIN_OPTION("Sound Quality", "s_khz", ITEM_TYPE_MULTI, 6, 3) + cvarFloatList { + "22 khz (high)" 22 + "11 khz (low)" 11 + } + OPTION_BELOW("gr3_ctrl5") + ASSIGN_HINT("hint_sndquality") + END_OPTION + ADD_HINT("hint_sndquality", "Choose sound quality", "group3") + + + // Doppler effect // + + BEGIN_OPTION("Doppler Effect", "s_doppler", ITEM_TYPE_YESNO, 7, 3) + OPTION_BELOW("gr3_ctrl6") + ASSIGN_HINT("hint_doppler") + END_OPTION + ADD_HINT("hint_doppler", "Enable Doppler effect", "group3") + + + // Net // + + //Icon itemdef { - name opt_gamma - type ITEM_TYPE_SLIDER - anglevectors 30 -60 - text "Brightness:" - cvarfloat r_gamma 1 .5 1.7 - rect 472 100 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show gamma_hint ; timeFade gamma_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade gamma_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name gamma_hint - text "Change image brightness" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Screen size - - itemdef { - name opt_screensize - type ITEM_TYPE_SLIDER - text "Screen Size:" - cvarfloat cg_viewsize 100 30 100 - rect 472 120 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show screensize_hint ; timeFade screensize_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade screensize_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name screensize_hint - text "Change rendering window size" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Overbrightbits - - itemdef { - name opt_overbits - type ITEM_TYPE_YESNO - text "Overbright Bits:" - cvar "r_overbrightbits" - rect 512 140 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show overbits_hint ; timeFade overbits_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade overbits_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name overbits_hint - text "Enable overbright bits (brighter image, lower quality)" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Sound -//Background window - - itemdef { - name sound_caption - rect 368 192 220 20 - style WINDOW_STYLE_GRADIENT - border WINDOW_BORDER_KCGRADIENT - bordersize 1 - backcolor 0 0 .2 .75 - bordercolor .75 .75 .75 1 - text "Sound" - textstyle ITEM_TEXTSTYLE_SHADOWED - textscale .25 - textalign 0 - textalignx 72 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - decoration - } - - - itemdef { - name sound_icon + name "icon,allgroups,group3" + background UI_ASSETS"/icons/rq3-system-network" + forecolor 1 1 1 ICON_ALPHA + alignrect "line" ITEM_ALIGN_LEFT 0 200 24 24 style WINDOW_STYLE_SHADER - rect 400 188 24 24 - background "menu/art/rq3-system-sound.tga" - decoration - visible 1 - } - - itemdef { - name sound_window - rect 368 208 220 100 - style WINDOW_STYLE_SHADER - background "ui/assets/fake_gradient_75" - border WINDOW_BORDER_KCGRADIENT - bordersize 2 - backcolor 0 0 0 .75 - bordercolor .75 .75 .75 1 visible 1 decoration - } + } -//Sound volume - - itemdef { - name opt_svol - type ITEM_TYPE_SLIDER - text "Sound Volume:" - cvarfloat "s_volume" 0.7 0 1 - rect 472 220 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show svol_hint ; timeFade svol_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade svol_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name svol_hint - text "Change sound effects volume" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Music volume - - itemdef { - name opt_mvol - type ITEM_TYPE_SLIDER - text "Music volume:" - cvarfloat "s_musicvolume" 0.25 0 1 - rect 472 240 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show mvol_hint ; timeFade mvol_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade mvol_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name mvol_hint - text "Change music volume" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Sound quality - - itemdef { - name opt_squality - type ITEM_TYPE_MULTI - text "Sound Quality:" - cvar "s_khz" - cvarFloatList { "22 khz (high)" 22 "11 khz (low)" 11 } - rect 496 260 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show squality_hint ; timeFade squality_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade squality_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name squality_hint - text "Change sound quality" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Doppler effect - - itemdef { - name opt_doppler - type ITEM_TYPE_YESNO - text "Doppler Sound:" - cvar "s_doppler" - rect 496 280 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - onFocus { show doppler_hint ; timeFade doppler_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade doppler_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name doppler_hint - text "Enable doppler effect" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Network -//Background window - - itemdef { - name net_caption - rect 368 332 220 20 - style WINDOW_STYLE_GRADIENT - border WINDOW_BORDER_KCGRADIENT - bordersize 1 - backcolor 0 0 .2 .75 - bordercolor .75 .75 .75 1 - text "Network" - textstyle ITEM_TEXTSTYLE_SHADOWED - textscale .25 - textalign 0 - textalignx 72 - textaligny 14 - forecolor 1 1 1 1 - visible 1 - decoration - } - - - itemdef { - name net_icon - style WINDOW_STYLE_SHADER - rect 400 328 24 24 - background "menu/art/rq3-system-network.tga" - decoration - visible 1 - } - - itemdef { - name net_window - rect 368 348 220 40 - style WINDOW_STYLE_SHADER - background "ui/assets/fake_gradient_75" - border WINDOW_BORDER_KCGRADIENT - bordersize 2 - backcolor 0 0 0 .75 - bordercolor .75 .75 .75 1 - visible 1 - decoration - } - - -//Net rate - - itemdef { - name opt_netrate - 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 512 360 112 20 - textalign ITEM_ALIGN_RIGHT - textalignx 0 - textaligny 20 - textscale .25 - forecolor RQ3_System_Option_Color - visible 1 - action { uiScript update ui_setRate ; } - onFocus { show netrate_hint ; timeFade netrate_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { timeFade netrate_hint forecolor .9 .9 .9 0 0 250 } - } - - itemdef { - name netrate_hint - text "Choose network speed" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } - -//Back - - itemdef { - name "btn_back" - style WINDOW_STYLE_SHADER - rect 12 432 32 32 - type 1 - background "menu/art/rq3-menu-back.tga" - action { close system_menu; open setup_menu ; } - onFocus { setbackground "menu/art/rq3-menu-back-focus-anim" ; - show back_hint ; timeFade back_hint forecolor .9 .9 .9 1 0 250 } - leaveFocus { setbackground "menu/art/rq3-menu-back.tga" ; - timeFade back_hint forecolor .9 .9 .9 0 0 250 } - visible 1 - } - - itemdef { - name back_hint - text "Go back to setup menu" - forecolor RQ3_MAIN_HINT_COLOR - textalign 1 - textalignx 240 - textaligny 20 - textscale RQ3_MAIN_TEXTSIZE - rect 80 420 480 40 - type 0 - style 0 - visible 0 - decoration - } + // Net rate // + BEGIN_OPTION("Net Rate", "rate", ITEM_TYPE_MULTI, 8, 3) + alignrect "line" ITEM_ALIGN_CENTER 56 204 112 VSIZE + cvarFloatList { + "<=28.8k" 2500 + "33.6k" 3000 + "56k" 4000 + "ISDN" 5000 + "LAN/CABLE/xDSL" 25000 + } + ASSIGN_HINT("hint_netrate") + END_OPTION + ADD_HINT("hint_netrate", "Choose network speed", "group3") } +} \ No newline at end of file diff --git a/reaction/uifiles/tabs.h b/reaction/uifiles/tabs.h new file mode 100644 index 00000000..f85d5c7b --- /dev/null +++ b/reaction/uifiles/tabs.h @@ -0,0 +1,112 @@ +//////////////////////////////////// +// +// TAB-RELATED MACROS +// +// + + +#define ACTIVE_TAB_PROPS\ + forecolor Tab_Color1 \ + textalign 0 \ + textalignx 4 \ + textaligny 12 \ + textscale 0.2 \ + style WINDOW_STYLE_EMPTY \ + type ITEM_TYPE_BUTTON \ + visible 1 + + +#define INACTIVE_TAB_PROPS\ + forecolor Tab_Color2 \ + textalign 0 \ + textalignx 4 \ + textaligny 12 \ + textscale 0.2 \ + style WINDOW_STYLE_EMPTY \ + type ITEM_TYPE_BUTTON \ + visible 1 \ + decoration + +#define ACTIVATE_TAB(num) hide "allgroups" ; show "group"#num ; hide "hints" ; setfocus "gr"#num"_ctrl1" + +#define ADD_HINT(HINT_NAME, HINT_TEXT, HINT_GROUPS)\ + itemdef { \ + text HINT_TEXT \ + name HINT_NAME",allgroups,"HINT_GROUPS",hints,fade_alpha" \ + autowrapped \ + forecolor HINT_COLOR 1 \ + textalign ITEM_ALIGN_LEFT \ + textalignx 6 \ + textaligny 10 \ + textscale .2 \ + alignrect "line" ITEM_ALIGN_LEFT 0 8 $evalint(LINE_WIDTH - 12) 40 \ + style WINDOW_STYLE_EMPTY \ + visible 0 \ + decoration \ + } + +#define ASSIGN_HINT(HINT_NAME)\ + onFocus { show HINT_NAME ; timeFade HINT_NAME forecolor 5 5 5 1 0 HINT_FADE_TIME } \ + leaveFocus { timeFade HINT_NAME forecolor 5 5 5 0 0 HINT_FADE_TIME } + +#define OPTION_BELOW(ITEM_NAME)\ + alignrect ITEM_NAME ITEM_ALIGN_LEFT 0 VSPACE 112 VSIZE + +#define BEGIN_SIMPLE_OPTION(ITEM_NR, ITEM_GROUP)\ + itemdef { \ + name "allgroups,group"#ITEM_GROUP",gr"#ITEM_GROUP"_ctrl"#ITEM_NR",fade_alpha" + + +#define BEGIN_OPTION(ITEM_TEXT, ITEM_CVAR, ITEM_TYPE, ITEM_NR, ITEM_GROUP)\ + BEGIN_SIMPLE_OPTION(ITEM_NR, ITEM_GROUP)\ + type ITEM_TYPE \ + text ITEM_TEXT":" \ + cvar ITEM_CVAR + +#define BEGIN_SLIDER(ITEM_TEXT, ITEM_CVAR, ITEM_CVAR_DEFAULT, ITEM_CVAR_MIN, ITEM_CVAR_MAX, ITEM_NR, ITEM_GROUP)\ + BEGIN_SIMPLE_OPTION(ITEM_NR, ITEM_GROUP)\ + type ITEM_TYPE_SLIDER \ + text ITEM_TEXT":" \ + cvarfloat ITEM_CVAR ITEM_CVAR_DEFAULT ITEM_CVAR_MIN ITEM_CVAR_MAX + +#define END_OPTION\ + textalign ITEM_ALIGN_RIGHT \ + textalignx 0 \ + textaligny 14 \ + textscale .225 \ + forecolor OPTION_COLOR \ + visible 1 \ + } + + +#define ADD_TAB(TAB_TEXT, TAB_SHORTCUT, TAB_INDEX, TAB_OTHER_GROUPS, TAB_ALIGN)\ + itemdef { \ + cleantext TAB_TEXT \ + name "alltabs,tab"#TAB_INDEX"_0,fade_alpha,allgroups,group"#TAB_INDEX \ + INACTIVE_TAB_PROPS \ + TAB_ALIGN \ + } \ + itemdef { \ + text TAB_TEXT \ + name "alltabs,tab"#TAB_INDEX",fade_alpha,allgroups,"TAB_OTHER_GROUPS \ + shortcutKey TAB_SHORTCUT \ + shortcutKey #TAB_INDEX \ + ACTIVE_TAB_PROPS \ + action { ACTIVATE_TAB(TAB_INDEX) } \ + ASSIGN_HINT("hint_tab"#TAB_INDEX) \ + TAB_ALIGN \ + } + + +#define ADD_TITLE_ICON(ASSET, GROUP)\ + itemdef { \ + name "icon,allgroups,"GROUP \ + background ASSET \ + forecolor 1 1 1 ICON_ALPHA \ + alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32 \ + style WINDOW_STYLE_SHADER \ + visible 1 \ + decoration \ + } + +