Autswitch to info tab when a server is selected in the server browser (and add a console option)

This commit is contained in:
Jordy 2018-11-18 23:55:05 +01:00
parent 2c852c7f0f
commit 2fd60a331c
2 changed files with 3 additions and 0 deletions

View file

@ -1189,6 +1189,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
{
m_SelectedServer.m_Filter = s;
m_SelectedServer.m_Index = i;
if(g_Config.m_UiAutoswitchInfotab)
m_SidebarTab = 0;
str_copy(g_Config.m_UiServerAddress, pItem->m_aAddress, sizeof(g_Config.m_UiServerAddress));
if(Input()->MouseDoubleClick())
Client()->Connect(g_Config.m_UiServerAddress);

View file

@ -80,6 +80,7 @@ MACRO_CONFIG_INT(UiSettingsPage, ui_settings_page, 0, 0, 5, CFGFLAG_CLIENT|CFGFL
//MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 64, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address")
MACRO_CONFIG_INT(UiMousesens, ui_mousesens, 100, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity for menus/editor")
MACRO_CONFIG_INT(UiAutoswitchInfotab, ui_autoswitch_infotab, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Switch to the info tab when clicking on a server")
MACRO_CONFIG_INT(GfxNoclip, gfx_noclip, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Disable clipping")