3#ifndef GAME_CLIENT_COMPONENTS_CONSOLE_H
4#define GAME_CLIENT_COMPONENTS_CONSOLE_H
183 virtual int Sizeof()
const override {
return sizeof(*this); }
185 void PrintLine(
int Type,
const char *pLine);
188 virtual void OnStateChange(
int NewState,
int OldState)
override;
190 virtual void OnInit()
override;
191 virtual void OnReset()
override;
193 virtual void OnMessage(
int MsgType,
void *pRawMsg)
override;
195 void Prompt(
char (&aPrompt)[32]);
Definition: component.h:20
Definition: console.cpp:35
int m_BacklogCurLine
Definition: console.h:48
bool m_HasSelection
Definition: console.h:60
int m_CompletionCommandEnd
Definition: console.h:74
int m_CurSelEnd
Definition: console.h:59
const char * m_pCommandHelp
Definition: console.h:82
void ExecuteLine(const char *pLine)
Definition: console.cpp:296
CGameConsole * m_pGameConsole
Definition: console.h:63
void GetCommand(const char *pInput, char(&aCmd)[IConsole::CMDLINE_LENGTH])
Definition: console.cpp:334
bool m_IsCommand
Definition: console.h:80
void UpdateBacklogTextAttributes()
Definition: console.cpp:243
void Dump() REQUIRES(!m_BacklogPendingLock)
Definition: console.cpp:841
void Init(CGameConsole *pGameConsole)
Definition: console.cpp:224
bool m_MouseIsPress
Definition: console.h:55
char m_aCompletionBufferArgument[IConsole::CMDLINE_LENGTH]
Definition: console.h:67
int m_CompletionChosen
Definition: console.h:66
bool m_Searching
Definition: console.h:85
static void PossibleArgumentsCompleteCallback(int Index, const char *pStr, void *pUser)
Definition: console.cpp:360
int m_CompletionChosenArgument
Definition: console.h:68
CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLE > m_Backlog
Definition: console.h:39
bool m_UsernameReq
Definition: console.h:78
const char * m_pCommandName
Definition: console.h:81
void UpdateEntryTextAttributes(CBacklogEntry *pEntry) const
Definition: console.cpp:716
const char * m_pCommandParams
Definition: console.h:83
void ClearHistory()
Definition: console.cpp:280
std::vector< SSearchMatch > m_vSearchMatches
Definition: console.h:98
char m_aCompletionBuffer[IConsole::CMDLINE_LENGTH]
Definition: console.h:65
int m_CompletionFlagmask
Definition: console.h:69
int m_CurSelStart
Definition: console.h:58
STextBoundingBox m_BoundingBox
Definition: console.h:52
int m_Type
Definition: console.h:47
int m_NewLineCounter
Definition: console.h:61
const char * m_pName
Definition: console.h:46
CLock m_BacklogPendingLock
Definition: console.h:40
float m_LastInputHeight
Definition: console.h:53
CInstance(int t)
Definition: console.cpp:181
CStaticRingBuffer< char, 64 *1024, CRingBufferBase::FLAG_RECYCLE > m_History
Definition: console.h:42
static void PossibleCommandsCompleteCallback(int Index, const char *pStr, void *pUser)
Definition: console.cpp:320
CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLE > m_BacklogPending GUARDED_BY(m_BacklogPendingLock)
bool OnInput(const IInput::CEvent &Event)
Definition: console.cpp:376
void Reset()
Definition: console.cpp:286
void ScrollToCenter(int StartLine, int EndLine)
Definition: console.cpp:696
int m_BacklogLastActiveLine
Definition: console.h:49
vec2 m_MousePress
Definition: console.h:56
char m_aUser[32]
Definition: console.h:76
int m_CurrentMatchIndex
Definition: console.h:96
const char * GetString() const
Definition: console.h:118
int m_CompletionCommandStart
Definition: console.h:73
float m_CompletionRenderOffsetChange
Definition: console.h:71
void UpdateSearch()
Definition: console.cpp:736
char * m_pHistoryEntry
Definition: console.h:43
float m_CompletionRenderOffset
Definition: console.h:70
int GetLinesToScroll(int Direction, int LinesToScroll)
Definition: console.cpp:671
void ClearSearch()
Definition: console.cpp:728
int m_CompletionArgumentPosition
Definition: console.h:72
bool m_UserGot
Definition: console.h:77
vec2 m_MouseRelease
Definition: console.h:57
void PrintLine(const char *pLine, int Len, ColorRGBA PrintColor) REQUIRES(!m_BacklogPendingLock)
Definition: console.cpp:658
void PumpBacklogPending() REQUIRES(!m_BacklogPendingLock)
Definition: console.cpp:252
int m_LinesRendered
Definition: console.h:50
char m_aCurrentSearchString[IConsole::CMDLINE_LENGTH]
Definition: console.h:97
void ClearBacklog() REQUIRES(!m_BacklogPendingLock)
Definition: console.cpp:229
CLineInputBuffered< IConsole::CMDLINE_LENGTH > m_Input
Definition: console.h:45
void Prompt(char(&aPrompt)[32])
Definition: console.cpp:962
virtual void OnRender() override
Definition: console.cpp:989
virtual void OnInit() override
Definition: console.cpp:1598
static void ConConsolePageDown(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1542
void Toggle(int Type)
Definition: console.cpp:1468
static const ColorRGBA ms_SearchHighlightColor
Definition: console.h:160
virtual bool OnInput(const IInput::CEvent &Event) override
Definition: console.cpp:1449
int m_ConsoleType
Definition: console.h:152
CUi::CTouchState m_TouchState
Definition: console.h:158
virtual int Sizeof() const override
Definition: console.h:183
float m_StateChangeDuration
Definition: console.h:155
CInstance m_RemoteConsole
Definition: console.h:147
CConsoleLogger * m_pConsoleLogger
Definition: console.h:144
~CGameConsole()
Definition: console.cpp:876
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser)
Definition: console.cpp:917
static void ConClearLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1515
int m_ConsoleState
Definition: console.h:153
static void ConchainConsoleOutputLevel(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: console.cpp:1551
void PrintLine(int Type, const char *pLine)
Definition: console.cpp:1570
bool IsClosed()
Definition: console.h:198
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1510
@ CONSOLETYPE_LOCAL
Definition: console.h:177
@ CONSOLETYPE_REMOTE
Definition: console.h:178
static const ColorRGBA ms_SearchSelectedColor
Definition: console.h:161
CInstance * ConsoleForType(int ConsoleType)
Definition: console.cpp:882
static void ConDumpLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1525
bool m_WantsSelectionCopy
Definition: console.h:157
float m_StateChangeEnd
Definition: console.h:154
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition: console.cpp:1445
static void ConConsolePageUp(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1535
CGameConsole()
Definition: console.cpp:865
static void ConDumpRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1530
class IConsole * m_pConsole
Definition: console.h:143
virtual void OnReset() override
Definition: console.cpp:894
virtual void OnStateChange(int NewState, int OldState) override
Definition: console.cpp:1610
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1505
CInstance * CurrentConsole()
Definition: console.cpp:889
CInstance m_LocalConsole
Definition: console.h:146
void RequireUsername(bool UsernameReq)
Definition: console.cpp:1561
virtual void OnConsoleInit() override
Definition: console.cpp:1578
static void ConClearRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1520
Definition: ringbuffer.h:78
void(* FCommandCallback)(IResult *pResult, void *pUserData)
Definition: console.h:92
@ CMDLINE_LENGTH
Definition: console.h:37
@ CONSOLE_OPEN
Definition: console.h:19
@ CONSOLE_OPENING
Definition: console.h:18
@ CONSOLE_CLOSING
Definition: console.h:20
@ CONSOLE_CLOSED
Definition: console.h:17
#define REQUIRES(...)
Definition: lock.h:32
float m_YOffset
Definition: console.h:33
int m_LineCount
Definition: console.h:34
size_t m_Length
Definition: console.h:36
ColorRGBA m_PrintColor
Definition: console.h:35
char m_aText[1]
Definition: console.h:37
int m_Pos
Definition: console.h:88
int m_EndLine
Definition: console.h:90
int m_EntryLine
Definition: console.h:91
SSearchMatch(int Pos, int StartLine, int EndLine, int EntryLine)
Definition: console.h:93
int m_StartLine
Definition: console.h:89
Definition: textrender.h:175
vector2_base< float > vec2
Definition: vmath.h:158