forked from mirrors/0ad
319809ea9a
Use the entire available screen height for easier chat history reading. Use the golden ratio for the chat history frame size, so that the ratio looks appealing with all screen size ratios. Differential Revision: https://code.wildfiregames.com/D713 Refs #4069 Patch By: temple This was SVN commit r19893.
109 lines
3.2 KiB
XML
109 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<object
|
|
name="chatDialogPanel"
|
|
type="image"
|
|
hidden="true"
|
|
sprite="genericPanel"
|
|
z="90"
|
|
>
|
|
<!-- Mock objects storing the chat window size -->
|
|
<object name="chatDialogPanelLarge" size="50%-216 22%-75 50%+216 78%-85"/>
|
|
<object name="chatDialogPanelSmall" size="50%-216 50%-140 50%+216 50%-20"/>
|
|
|
|
<!-- Chat History Page -->
|
|
<object type="image" name="chatHistoryPage" size="0 0 100% 100%-120">
|
|
|
|
<!-- Chat History Filter -->
|
|
<object type="text" size="16 12 60 32" style="ModernLeftLabelText">
|
|
<translatableAttribute id="caption" context="chat input">Filter:</translatableAttribute>
|
|
</object>
|
|
|
|
<object
|
|
type="dropdown"
|
|
name="chatHistoryFilter"
|
|
size="75 10 100%-16 34"
|
|
style="ModernDropDown"
|
|
tooltip_style="sessionToolTipBold"
|
|
>
|
|
<translatableAttribute id="tooltip" context="chat input">Filter the chat history.</translatableAttribute>
|
|
<action on="SelectionChange">updateChatHistory();</action>
|
|
</object>
|
|
|
|
<object
|
|
type="text"
|
|
name="chatHistory"
|
|
size="10 46 100%-10 100%"
|
|
sprite="ModernDarkBoxGold"
|
|
style="ChatPanel"
|
|
/>
|
|
</object>
|
|
|
|
<!-- Chat input elements -->
|
|
<object name="chatPage" size="0 100%-120 100% 100%">
|
|
|
|
<!-- Message addressee -->
|
|
<object size="16 100%-106 50 100%-82" type="text" style="ModernLeftLabelText">
|
|
<translatableAttribute id="caption" context="chat input">To:</translatableAttribute>
|
|
</object>
|
|
<object
|
|
name="chatAddressee"
|
|
type="dropdown"
|
|
size="75 100%-108 100%-16 100%-84"
|
|
style="ModernDropDown"
|
|
tooltip_style="sessionToolTipBold"
|
|
>
|
|
<translatableAttribute id="tooltip" context="chat input">Select chat addressee.</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Message text -->
|
|
<object type="text" size="16 100%-74 50 100%-50" style="ModernLeftLabelText">
|
|
<translatableAttribute id="caption" context="chat input">Text:</translatableAttribute>
|
|
</object>
|
|
<object
|
|
type="input"
|
|
name="chatInput"
|
|
size="75 100%-76 100%-16 100%-52"
|
|
style="ModernInput"
|
|
max_length="80"
|
|
>
|
|
<action on="Press">submitChatInput();</action>
|
|
<action on="Tab">
|
|
let playernames = [];
|
|
for (let player in g_PlayerAssignments)
|
|
playernames.push(g_PlayerAssignments[player].name);
|
|
autoCompleteNick(this, playernames);
|
|
</action>
|
|
</object>
|
|
|
|
<!-- Cancel Button -->
|
|
<object size="16 100%-40 30%+16 100%-12" type="button" style="StoneButton">
|
|
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
|
<action on="Press">closeChat();</action>
|
|
</object>
|
|
|
|
<!-- Extended Chat Checkbox -->
|
|
<object
|
|
type="checkbox"
|
|
name="extendedChat"
|
|
checked="false"
|
|
style="ModernTickBox"
|
|
size="50%-40 100%-38 50%-20 100%-12"
|
|
>
|
|
<action on="Press">onToggleChatWindowExtended();</action>
|
|
</object>
|
|
|
|
<!-- Extended Chat Label -->
|
|
<object type="text" size="50%-20 100%-38 50%+50 100%-12" text_align="left" textcolor="white">
|
|
<translatableAttribute id="caption" context="chat">History</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Send Button -->
|
|
<object size="70%-16 100%-40 100%-16 100%-12" type="button" style="StoneButton">
|
|
<translatableAttribute id="caption">Send</translatableAttribute>
|
|
<action on="Press">submitChatInput();</action>
|
|
</object>
|
|
</object>
|
|
|
|
</object>
|