mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 14:33:03 +00:00
Fix bug with rating in lobby bot, remove superfluous GUI typedef, and change the lobby chat autocompletion to use tab.
This was SVN commit r14467.
This commit is contained in:
@@ -310,7 +310,6 @@ hotkey.session.highlightguarded = PgUp ; Toggle highlight of guarded units
|
||||
; > HOTKEYS ONLY
|
||||
hotkey.chat = Return ; Toggle chat window
|
||||
hotkey.teamchat = "T" ; Toggle chat window in team chat mode
|
||||
hotkey.complete.playername = "Alt+C" ; Complete a player's name
|
||||
|
||||
; > GUI TEXTBOX HOTKEYS
|
||||
hotkey.text.delete.left = "Ctrl+Backspace" ; Delete word to the left of cursor
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
|
||||
<script file="gui/lobby/lobby.js"/>
|
||||
|
||||
<object name="sn">
|
||||
<object hotkey="complete.playername">
|
||||
<action on="Press">completeNick();</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
<object type="image" style="ModernWindow" size="0 0 100% 100%" name="lobbyWindow">
|
||||
|
||||
<object style="TitleText" type="text" size="50%-128 0%+4 50%+128 36">
|
||||
@@ -159,6 +153,7 @@
|
||||
<object name="chatText" size="0 0 100% 94%" type="text" style="ChatPanel"/>
|
||||
<object name="chatInput" size="0 94% 100% 100%" type="input" style="ModernInput">
|
||||
<action on="Press">submitChatInput();</action>
|
||||
<action on="Tab">completeNick();</action>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
|
||||
<object size="24 100%-124 100%-24 100%-100" name="descLabel" type="text" style="LeftLabelText">Description:</object>
|
||||
|
||||
<object name="saveGameDesc" size="24 100%-96 100%-24 100%-72" type="input" style="StoneInput"/>
|
||||
<object name="saveGameDesc" size="24 100%-96 100%-24 100%-72" type="input" style="StoneInput">
|
||||
<action on="Press">saveGame();</action>
|
||||
</object>
|
||||
|
||||
<object name="saveButton" type="button" size="0%+25 100%-60 33%+10 100%-32" style="StoneButton">
|
||||
Save
|
||||
|
||||
@@ -99,7 +99,8 @@ InReaction CInput::ManuallyHandleEvent(const SDL_Event_* ev)
|
||||
{
|
||||
case SDLK_TAB: // '\t'
|
||||
/* Auto Complete */
|
||||
// TODO Gee: (2004-09-07) What to do with tab?
|
||||
// We just send the tab event to JS and let it figure out autocomplete.
|
||||
SendEvent(GUIM_TAB, "tab");
|
||||
break;
|
||||
|
||||
case SDLK_BACKSPACE: // '\b'
|
||||
|
||||
@@ -95,7 +95,8 @@ enum EGUIMessageType
|
||||
GUIM_GOT_FOCUS,
|
||||
GUIM_LOST_FOCUS,
|
||||
GUIM_PRESSED_MOUSE_RIGHT,
|
||||
GUIM_DOUBLE_PRESSED_MOUSE_RIGHT
|
||||
GUIM_DOUBLE_PRESSED_MOUSE_RIGHT,
|
||||
GUIM_TAB // Used by CInput
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,9 +69,6 @@ class CScriptValRooted;
|
||||
// Types
|
||||
//--------------------------------------------------------
|
||||
|
||||
// Map with pointers
|
||||
typedef std::map<CStr, SGUISetting> map_Settings;
|
||||
|
||||
struct JSObject;
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
||||
@@ -126,9 +126,9 @@ class LeaderboardList():
|
||||
result = 1 if player1 == game.winner else -1
|
||||
# Player's ratings are -1 unless they have played a rated game.
|
||||
if player1.rating == -1:
|
||||
player1.rating == leaderboard_default_rating
|
||||
player1.rating = leaderboard_default_rating
|
||||
if player2.rating == -1:
|
||||
player2.rating == leaderboard_default_rating
|
||||
player2.rating = leaderboard_default_rating
|
||||
|
||||
rating_adjustment1 = int(get_rating_adjustment(player1.rating, player2.rating,
|
||||
len(player1.games), len(player2.games), result))
|
||||
|
||||
Reference in New Issue
Block a user