mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
TAB in console doesn't influence menu (fixes #239)
This commit is contained in:
parent
d57b0d62c6
commit
d570683b5a
|
@ -31,14 +31,6 @@
|
|||
|
||||
#include "console.h"
|
||||
|
||||
enum
|
||||
{
|
||||
CONSOLE_CLOSED,
|
||||
CONSOLE_OPENING,
|
||||
CONSOLE_OPEN,
|
||||
CONSOLE_CLOSING,
|
||||
};
|
||||
|
||||
CGameConsole::CInstance::CInstance(int Type)
|
||||
{
|
||||
m_pHistoryEntry = 0x0;
|
||||
|
|
|
@ -6,6 +6,14 @@
|
|||
#include <game/client/component.h>
|
||||
#include <game/client/lineinput.h>
|
||||
|
||||
enum
|
||||
{
|
||||
CONSOLE_CLOSED,
|
||||
CONSOLE_OPENING,
|
||||
CONSOLE_OPEN,
|
||||
CONSOLE_CLOSING,
|
||||
};
|
||||
|
||||
class CGameConsole : public CComponent
|
||||
{
|
||||
class CInstance
|
||||
|
@ -99,5 +107,7 @@ public:
|
|||
virtual void OnRender();
|
||||
virtual void OnMessage(int MsgType, void *pRawMsg);
|
||||
virtual bool OnInput(IInput::CEvent Events);
|
||||
|
||||
bool IsClosed() { return m_ConsoleState == CONSOLE_CLOSED; }
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <game/client/render.h>
|
||||
#include <game/client/ui.h>
|
||||
#include <game/client/components/countryflags.h>
|
||||
#include <game/client/components/console.h>
|
||||
|
||||
#include "menus.h"
|
||||
|
||||
|
@ -173,7 +174,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
|||
else
|
||||
ScrollNum = 0;
|
||||
|
||||
if(Input()->KeyDown(KEY_TAB))
|
||||
if(Input()->KeyDown(KEY_TAB) && m_pClient->m_pGameConsole->IsClosed())
|
||||
{
|
||||
if(Input()->KeyPressed(KEY_LSHIFT) || Input()->KeyPressed(KEY_RSHIFT))
|
||||
g_Config.m_UiToolboxPage = (g_Config.m_UiToolboxPage + 3 - 1) % 3;
|
||||
|
|
Loading…
Reference in a new issue