mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add cl_chat_reset, which can be set to 0 so that chat is not reset when pressing escape
This commit is contained in:
parent
9d5459d731
commit
547274b806
|
@ -337,6 +337,7 @@ MACRO_CONFIG_INT(ClPredictDDRace, cl_predict_ddrace, 1, 0, 1, CFGFLAG_CLIENT|CFG
|
|||
MACRO_CONFIG_INT(ClShowNinja, cl_show_ninja, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ninja skin")
|
||||
MACRO_CONFIG_INT(ClShowOtherHookColl, cl_show_other_hook_coll, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show other players' hook collision line")
|
||||
MACRO_CONFIG_INT(ClChatTeamColors, cl_chat_teamcolors, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show names in chat in team colors")
|
||||
MACRO_CONFIG_INT(ClChatReset, cl_chat_reset, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Reset chat when pressing escape")
|
||||
MACRO_CONFIG_INT(ClShowDirection, cl_show_direction, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show tee direction")
|
||||
MACRO_CONFIG_INT(ClHttpMapDownload, cl_http_map_download, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Try fast HTTP map download first")
|
||||
MACRO_CONFIG_INT(ClOldGunPosition, cl_old_gun_position, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Tees hold gun a bit higher like in TW 0.6.1 and older")
|
||||
|
|
|
@ -91,6 +91,7 @@ void CChat::ConChat(IConsole::IResult *pResult, void *pUserData)
|
|||
else
|
||||
((CChat*)pUserData)->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", "expected all or team as mode");
|
||||
|
||||
if(pResult->GetString(1)[0] || g_Config.m_ClChatReset)
|
||||
((CChat*)pUserData)->m_Input.Set(pResult->GetString(1));
|
||||
}
|
||||
|
||||
|
@ -116,6 +117,8 @@ bool CChat::OnInput(IInput::CEvent Event)
|
|||
{
|
||||
m_Mode = MODE_NONE;
|
||||
m_pClient->OnRelease();
|
||||
if(g_Config.m_ClChatReset)
|
||||
m_Input.Clear();
|
||||
}
|
||||
else if(Event.m_Flags&IInput::FLAG_PRESS && (Event.m_Key == KEY_RETURN || Event.m_Key == KEY_KP_ENTER))
|
||||
{
|
||||
|
@ -144,6 +147,7 @@ bool CChat::OnInput(IInput::CEvent Event)
|
|||
m_pHistoryEntry = 0x0;
|
||||
m_Mode = MODE_NONE;
|
||||
m_pClient->OnRelease();
|
||||
m_Input.Clear();
|
||||
}
|
||||
if(Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key == KEY_TAB)
|
||||
{
|
||||
|
@ -298,7 +302,6 @@ void CChat::EnableMode(int Team)
|
|||
else
|
||||
m_Mode = MODE_ALL;
|
||||
|
||||
m_Input.Clear();
|
||||
Input()->ClearEvents();
|
||||
m_CompletionChosen = -1;
|
||||
UI()->AndroidShowTextInput("", Team ? Localize("Team chat") : Localize("Chat"));
|
||||
|
|
Loading…
Reference in a new issue