Index: binaries/data/config/default.cfg
===================================================================
--- binaries/data/config/default.cfg (revision 19269)
+++ binaries/data/config/default.cfg (working copy)
@@ -165,10 +165,11 @@ session.highlightguarding = PgDn ;
session.highlightguarded = PgUp ; Toggle highlight of guarded units
; > HOTKEYS ONLY
chat = Return ; Toggle chat window
teamchat = "T" ; Toggle chat window in team chat mode
+privatechat = "L" ; Toggle chat window and select the previous private chat partner
; > QUICKSAVE
quicksave = "Shift+F5"
quickload = "Shift+F8"
Index: binaries/data/mods/public/gui/credits/texts/programming.json
===================================================================
--- binaries/data/mods/public/gui/credits/texts/programming.json (revision 19269)
+++ binaries/data/mods/public/gui/credits/texts/programming.json (working copy)
@@ -143,10 +143,11 @@
{"nick": "NoMonkey", "name": "John Mena"},
{"nick": "notpete", "name": "Rich Cross"},
{"nick": "Offensive ePeen", "name": "Jared Ryan Bills"},
{"nick": "Ols", "name": "Oliver Whiteman"},
{"nick": "olsner", "name": "Simon Brenner"},
+ {"nick": "OptimusShepard", "name": "Pirmin Stanglmeier"},
{"nick": "otero"},
{"name": "Nick Owens"},
{"nick": "Palaxin", "name": "David A. Freitag"},
{"name": "Paul Withers"},
{"nick": "paulobezerr", "name": "Paulo George Gomes Bezerra"},
Index: binaries/data/mods/public/gui/manual/intro.txt
===================================================================
--- binaries/data/mods/public/gui/manual/intro.txt (revision 19269)
+++ binaries/data/mods/public/gui/manual/intro.txt (working copy)
@@ -60,10 +60,11 @@ Shift + F8: Quickload
F10: Open/close menu
F12: Show/hide time elapsed counter
ESC: Close all dialogs (chat, menu) or clear selected units
Enter/return: Open/send chat
T: Send team chat
+L: Chat with the previously selected private chat partner
Pause: Pause/resume the game
Delete: Delete currently selected units/buildings
Shift + Delete: Delete currently selected units/buildings without confirmation
/ (ForwardSlash): Select idle fighter
Shift + /: add idle fighter to selection
Index: binaries/data/mods/public/gui/session/hotkeys/misc.xml
===================================================================
--- binaries/data/mods/public/gui/session/hotkeys/misc.xml (revision 19269)
+++ binaries/data/mods/public/gui/session/hotkeys/misc.xml (working copy)
@@ -3,15 +3,19 @@
+
+
Index: binaries/data/mods/public/gui/session/menu.js
===================================================================
--- binaries/data/mods/public/gui/session/menu.js (revision 19269)
+++ binaries/data/mods/public/gui/session/menu.js (working copy)
@@ -201,19 +201,18 @@ function openOptions()
Engine.PushGuiPage("page_options.xml", {
"callback": "resumeGame"
});
}
-function openChat(teamChat = false)
+function openChat(command = "")
{
if (g_Disconnected)
return;
closeOpenDialogs();
let chatAddressee = Engine.GetGUIObjectByName("chatAddressee");
- let command = teamChat ? (g_IsObserver ? "/observers" : "/allies") : "";
chatAddressee.selected = chatAddressee.list_data.indexOf(command);
Engine.GetGUIObjectByName("chatInput").focus();
Engine.GetGUIObjectByName("chatDialogPanel").hidden = false;
Index: binaries/data/mods/public/gui/session/messages.js
===================================================================
--- binaries/data/mods/public/gui/session/messages.js (revision 19269)
+++ binaries/data/mods/public/gui/session/messages.js (working copy)
@@ -28,10 +28,15 @@ var g_ChatHistory = [];
* Holds the timer-IDs used for hiding the chat after g_ChatTimeout seconds.
*/
var g_ChatTimers = [];
/**
+ * Command to send to the previously selected private chat partner.
+ */
+var g_LastChatAddressee = "";
+
+/**
* Handle all netmessage types that can occur.
*/
var g_NetMessageTypes = {
"netstatus": msg => {
handleNetStatusMessage(msg);
@@ -748,10 +753,14 @@ function submitChatInput()
let chatAddressee = Engine.GetGUIObjectByName("chatAddressee");
if (chatAddressee.selected > 0 && (text.indexOf("/") != 0 || text.indexOf("/me ") == 0))
text = chatAddressee.list_data[chatAddressee.selected] + " " + text;
+ let selectedChat = chatAddressee.list_data[chatAddressee.selected]
+ if (selectedChat.startsWith("/msg"))
+ g_LastChatAddressee = selectedChat;
+
submitChatDirectly(text);
}
/**
* Displays the prepared chatmessage.
Index: binaries/data/mods/public/gui/session/session.js
===================================================================
--- binaries/data/mods/public/gui/session/session.js (revision 19269)
+++ binaries/data/mods/public/gui/session/session.js (working copy)
@@ -385,11 +385,12 @@ function updateHotkeyTooltips()
colorizeHotkey("\n" + translate("Press %(hotkey)s to open the public chat."), "chat") +
colorizeHotkey(
"\n" + (g_IsObserver ?
translate("Press %(hotkey)s to open the observer chat.") :
translate("Press %(hotkey)s to open the ally chat.")),
- "teamchat");
+ "teamchat") +
+ colorizeHotkey("\n" + translate("Press %(hotkey)s to open the previously selected private chat."), "privatechat");
Engine.GetGUIObjectByName("idleWorkerButton").tooltip =
colorizeHotkey("%(hotkey)s" + " ", "selection.idleworker") +
translate("Find idle worker");