TAB in console doesn't influence menu (fixes #239)

This commit is contained in:
def 2015-07-24 01:28:15 +02:00
parent d57b0d62c6
commit d570683b5a
3 changed files with 12 additions and 9 deletions

View file

@ -31,14 +31,6 @@
#include "console.h"
enum
{
CONSOLE_CLOSED,
CONSOLE_OPENING,
CONSOLE_OPEN,
CONSOLE_CLOSING,
};
CGameConsole::CInstance::CInstance(int Type)
{
m_pHistoryEntry = 0x0;

View file

@ -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

View file

@ -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;