From 540b74dad29ac8eb10fcb9b1b8ad39bbff4cabcb Mon Sep 17 00:00:00 2001 From: Tomi Isoaho Date: Sat, 4 Jul 2009 16:28:42 +0000 Subject: [PATCH] Minor UI tweaks. --- reaction/code/ui/ui_main.c | 26 ++++++------ reaction/code/ui/ui_shared.c | 2 +- reaction/uifiles/controls.menu | 66 +++++++++++++++--------------- reaction/uifiles/replacements.menu | 15 ++++++- 4 files changed, 61 insertions(+), 48 deletions(-) diff --git a/reaction/code/ui/ui_main.c b/reaction/code/ui/ui_main.c index 8bad9969..6f0f6b1e 100644 --- a/reaction/code/ui/ui_main.c +++ b/reaction/code/ui/ui_main.c @@ -3266,10 +3266,22 @@ void UI_BuildIngameServerInfoList( void ) int matchmode = atoi(Info_ValueForKey(serverInfo, "g_RQ3_matchmode")); int limit = atoi(Info_ValueForKey(serverInfo, "timelimit")); - AddIngameLine("RQ3 Version", Info_ValueForKey(serverInfo, "g_RQ3_version")); AddIngameLine("Host name", Info_ValueForKey(serverInfo, "sv_hostname")); + AddIngameLine("Game version", Info_ValueForKey(serverInfo, "g_RQ3_version")); + AddIngameLine("Engine version", Info_ValueForKey(serverInfo, "version")); AddIngameLine("Map name", Info_ValueForKey(serverInfo, "mapname")); AddIngameLine("Gametype", (char*)teamArenaGameNames[gametype]); + AddIngameLine("Match mode", (matchmode != 0) ? "On" : "Off"); + if (matchmode) { + //int refID = atoi(Info_ValueForKey(info, "g_RQ3_refID")); + int allowRef = atoi(Info_ValueForKey(serverInfo, "g_RQ3_allowRef")); + AddIngameLine("Allow referee", (allowRef != 0) ? va("Yes (%i max)", atoi(Info_ValueForKey(serverInfo, "g_RQ3_maxRefs"))) : "No"); + //if (allowRef && refID != -1) { + // char info2[MAX_INFO_STRING]; + // trap_GetConfigString(CS_PLAYERS + refID, info2, sizeof(info2)); + // AddIngameLine("Referee", Info_ValueForKey(info2, "name")); + //} + } AddIngameLine("Time limit", (limit !=0 ) ? va("%i", limit) : "None"); switch (gametype) { case GT_TEAMPLAY: @@ -3302,22 +3314,10 @@ void UI_BuildIngameServerInfoList( void ) break; } } - AddIngameLine("Match mode", (matchmode != 0) ? "On" : "Off"); - if (matchmode) { - //int refID = atoi(Info_ValueForKey(info, "g_RQ3_refID")); - int allowRef = atoi(Info_ValueForKey(serverInfo, "g_RQ3_allowRef")); - AddIngameLine("Allow referee", (allowRef != 0) ? va("Yes (%i max)", atoi(Info_ValueForKey(serverInfo, "g_RQ3_maxRefs"))) : "No"); - //if (allowRef && refID != -1) { - // char info2[MAX_INFO_STRING]; - // trap_GetConfigString(CS_PLAYERS + refID, info2, sizeof(info2)); - // AddIngameLine("Referee", Info_ValueForKey(info2, "name")); - //} - } AddIngameLine("Max clients", Info_ValueForKey(serverInfo, "sv_maxClients")); AddIngameLine("Bot/min players", Info_ValueForKey(serverInfo, "bot_minplayers")); AddIngameLine("Password required", (atoi(Info_ValueForKey(serverInfo, "g_needPass")) != 0) ? "Yes" : "No"); AddIngameLine("Protocol", Info_ValueForKey(serverInfo, "protocol")); - AddIngameLine("Q3 Version", Info_ValueForKey(serverInfo, "version")); } } diff --git a/reaction/code/ui/ui_shared.c b/reaction/code/ui/ui_shared.c index e0812bfc..bd004141 100644 --- a/reaction/code/ui/ui_shared.c +++ b/reaction/code/ui/ui_shared.c @@ -5026,7 +5026,7 @@ static bind_t g_bindings[] = { {"drop item", 'z', -1, -1, -1}, {"irvision", 'v', -1, -1, -1}, //Makro - this one was missing - {"specialweapon", 'e', -1, -1, -1}, + {"use special", 'e', -1, -1, -1}, //Makro - for the weapon/item, join, presets and tkok menus {"ui_RQ3_loadout", 'l', -1, -1, -1}, {"ui_RQ3_joinTeam", 'j', -1, -1, -1}, diff --git a/reaction/uifiles/controls.menu b/reaction/uifiles/controls.menu index fa0e7d7c..15aac7ec 100644 --- a/reaction/uifiles/controls.menu +++ b/reaction/uifiles/controls.menu @@ -92,6 +92,7 @@ ) ADD_HINT("hint_tab2", "Change movement controls", "group1,group3,group4,group5") + //Shoot ADD_TAB( @@ -119,7 +120,7 @@ "R", 5, "group1,group2,group3,group4", alignrect "tab4" ITEM_ALIGN_LEFT 28 0 48 16 ) - ADD_HINT("hint_tab5", "Other often-used commands", "group1,group2,group3,group4") + ADD_HINT("hint_tab5", "Change Reaction-specific controls", "group1,group2,group3,group4") /* @@ -205,7 +206,7 @@ Group # 2 - Move __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 + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE ASSIGN_HINT("YesNoMessage") END_OPTION @@ -281,7 +282,7 @@ Group # 3 - Shoot __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 + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE ASSIGN_HINT("keyBindStatus") END_OPTION @@ -368,19 +369,19 @@ 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 + BEGIN_OPTION("Weapon/Item Choice", "ui_RQ3_loadout", ITEM_TYPE_BIND, 1, 4) + alignrect "line" ITEM_ALIGN_CENTER 56 32 112 VSIZE ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Show Statistics", "+wstats", ITEM_TYPE_BIND, 2, 4) + BEGIN_OPTION("Join Team", "ui_RQ3_joinTeam", ITEM_TYPE_BIND, 2, 4) OPTION_BELOW("gr4_ctrl1") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Gesture", "+button3", ITEM_TYPE_BIND, 3, 4) + BEGIN_OPTION("Presets Menu", "ui_RQ3_presets", ITEM_TYPE_BIND, 3, 4) OPTION_BELOW("gr4_ctrl2") ASSIGN_HINT("keyBindStatus") END_OPTION @@ -409,22 +410,36 @@ Group # 4 - Misc ASSIGN_HINT("keyBindStatus") END_OPTION + BEGIN_OPTION("VoIP Push-to-talk", "+voiprecord", ITEM_TYPE_BIND, 8, 4) OPTION_BELOW("gr4_ctrl7") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Screenshot", "screenshot", ITEM_TYPE_BIND, 9, 4) + + BEGIN_OPTION("Show Scores", "scores", ITEM_TYPE_BIND, 9, 4) OPTION_BELOW("gr4_ctrl8") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Screenshot - JPEG", "screenshotJPEG", ITEM_TYPE_BIND, 10, 4) + BEGIN_OPTION("Show Statistics", "+wstats", ITEM_TYPE_BIND, 10, 4) OPTION_BELOW("gr4_ctrl9") ASSIGN_HINT("keyBindStatus") END_OPTION + + BEGIN_OPTION("Screenshot", "screenshot", ITEM_TYPE_BIND, 11, 4) + OPTION_BELOW("gr4_ctrl10") + ASSIGN_HINT("keyBindStatus") + END_OPTION + + + BEGIN_OPTION("Screenshot - JPEG", "screenshotJPEG", ITEM_TYPE_BIND, 12, 4) + OPTION_BELOW("gr4_ctrl11") + ASSIGN_HINT("keyBindStatus") + END_OPTION + /* ========================================================== @@ -437,7 +452,7 @@ Group # 5 - Reaction __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 + alignrect "line" ITEM_ALIGN_CENTER 56 44 112 VSIZE ASSIGN_HINT("keyBindStatus") END_OPTION @@ -448,65 +463,52 @@ Group # 5 - Reaction END_OPTION - BEGIN_OPTION("Weapon Mode", "weapon", ITEM_TYPE_BIND, 3, 5) + BEGIN_OPTION("Open Door", "opendoor", ITEM_TYPE_BIND, 3, 5) OPTION_BELOW("gr5_ctrl2") ASSIGN_HINT("keyBindStatus") END_OPTION + - - BEGIN_OPTION("Open Door", "opendoor", ITEM_TYPE_BIND, 4, 5) + BEGIN_OPTION("IR Vision", "irvision", ITEM_TYPE_BIND, 4, 5) OPTION_BELOW("gr5_ctrl3") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Drop Weapon", "drop weapon", ITEM_TYPE_BIND, 5, 5) + BEGIN_OPTION("Weapon Mode", "weapon", ITEM_TYPE_BIND, 5, 5) OPTION_BELOW("gr5_ctrl4") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Drop Item", "drop item", ITEM_TYPE_BIND, 6, 5) + BEGIN_OPTION("Special Weapon Cycle", "use special", ITEM_TYPE_BIND, 6, 5) OPTION_BELOW("gr5_ctrl5") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Drop Briefcase", "drop case", ITEM_TYPE_BIND, 7, 5) + BEGIN_OPTION("Drop Weapon", "drop weapon", ITEM_TYPE_BIND, 7, 5) OPTION_BELOW("gr5_ctrl6") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("IR Vision", "irvision", ITEM_TYPE_BIND, 8, 5) + BEGIN_OPTION("Drop Item", "drop item", ITEM_TYPE_BIND, 8, 5) OPTION_BELOW("gr5_ctrl7") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Special Weapon Cycle", "specialweapon", ITEM_TYPE_BIND, 9, 5) + BEGIN_OPTION("Drop Briefcase", "drop case", ITEM_TYPE_BIND, 9, 5) OPTION_BELOW("gr5_ctrl8") ASSIGN_HINT("keyBindStatus") END_OPTION - BEGIN_OPTION("Weapon/Item Choice", "ui_RQ3_loadout", ITEM_TYPE_BIND, 10, 5) + BEGIN_OPTION("Gesture", "+button3", ITEM_TYPE_BIND, 10, 5) OPTION_BELOW("gr5_ctrl9") ASSIGN_HINT("keyBindStatus") END_OPTION - - BEGIN_OPTION("Join Team", "ui_RQ3_joinTeam", ITEM_TYPE_BIND, 11, 5) - OPTION_BELOW("gr5_ctrl10") - ASSIGN_HINT("keyBindStatus") - END_OPTION - - - BEGIN_OPTION("Presets Menu", "ui_RQ3_presets", ITEM_TYPE_BIND, 12, 5) - OPTION_BELOW("gr5_ctrl11") - ASSIGN_HINT("keyBindStatus") - END_OPTION - - } } diff --git a/reaction/uifiles/replacements.menu b/reaction/uifiles/replacements.menu index 37d8d7c2..bb56921f 100644 --- a/reaction/uifiles/replacements.menu +++ b/reaction/uifiles/replacements.menu @@ -223,7 +223,6 @@ timeFade "hint_prev" forecolor 5 5 5 1 0 HINT_FADE_TIME ; timefadeSelf forecolor 1 1 1 1 0 250 } - leaveFocus { timeFade "hint_prev" forecolor 5 5 5 0 0 HINT_FADE_TIME ; timefadeSelf forecolor 1 1 1 .3 0 250 @@ -252,7 +251,6 @@ timeFade "hint_next" forecolor 5 5 5 1 0 HINT_FADE_TIME ; timefadeSelf forecolor 1 1 1 1 0 250 } - leaveFocus { timeFade "hint_next" forecolor 5 5 5 0 0 HINT_FADE_TIME ; timefadeSelf forecolor 1 1 1 .3 0 250 @@ -328,9 +326,20 @@ textscale .225 forecolor OPTION_COLOR visible 1 + action { play "sound/ui/whoosh3.wav" } + + onFocus { + show "hint_type" ; + timeFade "hint_type" forecolor 5 5 5 1 0 HINT_FADE_TIME + } + leaveFocus { + timeFade "hint_type" forecolor 5 5 5 0 0 HINT_FADE_TIME + } } + ADD_HINT("hint_type", "Browse through categories", "allgroups") + itemdef { name "selection_tip" style 0 @@ -395,7 +404,9 @@ textaligny 12 forecolor OPTION_COLOR visible 1 + action { play "sound/ui/whoosh3.wav" ; uiScript "selectReplacement" } + onFocus { show "hint_select" ; timeFade "hint_select" forecolor 5 5 5 1 0 HINT_FADE_TIME