3#ifndef GAME_CLIENT_COMPONENTS_CONSOLE_H
4#define GAME_CLIENT_COMPONENTS_CONSOLE_H
185 virtual int Sizeof()
const override {
return sizeof(*this); }
187 void PrintLine(
int Type,
const char *pLine);
190 virtual void OnStateChange(
int NewState,
int OldState)
override;
192 virtual void OnInit()
override;
193 virtual void OnReset()
override;
195 virtual void OnMessage(
int MsgType,
void *pRawMsg)
override;
197 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:353
bool m_IsCommand
Definition: console.h:80
void UpdateBacklogTextAttributes()
Definition: console.cpp:243
void Dump() REQUIRES(!m_BacklogPendingLock)
Definition: console.cpp:860
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:379
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:718
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
void SetSearching(bool Searching)
Definition: console.cpp:730
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:339
CStaticRingBuffer< CBacklogEntry, 1024 *1024, CRingBufferBase::FLAG_RECYCLE > m_BacklogPending GUARDED_BY(m_BacklogPendingLock)
bool OnInput(const IInput::CEvent &Event)
Definition: console.cpp:395
void Reset()
Definition: console.cpp:286
void ScrollToCenter(int StartLine, int EndLine)
Definition: console.cpp:698
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:117
int m_CompletionCommandStart
Definition: console.h:73
float m_CompletionRenderOffsetChange
Definition: console.h:71
void UpdateSearch()
Definition: console.cpp:755
char * m_pHistoryEntry
Definition: console.h:43
float m_CompletionRenderOffset
Definition: console.h:70
int GetLinesToScroll(int Direction, int LinesToScroll)
Definition: console.cpp:673
void ClearSearch()
Definition: console.cpp:747
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:660
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:985
virtual void OnRender() override
Definition: console.cpp:1012
virtual void OnInit() override
Definition: console.cpp:1605
static void ConConsolePageDown(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1549
void Toggle(int Type)
Definition: console.cpp:1475
static const ColorRGBA ms_SearchHighlightColor
Definition: console.h:161
virtual bool OnInput(const IInput::CEvent &Event) override
Definition: console.cpp:1456
int m_ConsoleType
Definition: console.h:153
CUi::CTouchState m_TouchState
Definition: console.h:159
virtual int Sizeof() const override
Definition: console.h:185
float m_StateChangeDuration
Definition: console.h:156
CInstance m_RemoteConsole
Definition: console.h:148
CConsoleLogger * m_pConsoleLogger
Definition: console.h:145
@ CONSOLETYPE_LOCAL
Definition: console.h:178
@ CONSOLETYPE_REMOTE
Definition: console.h:179
@ NUM_CONSOLETYPES
Definition: console.h:180
~CGameConsole()
Definition: console.cpp:895
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser)
Definition: console.cpp:936
static void ConClearLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1522
int m_ConsoleState
Definition: console.h:154
static void ConchainConsoleOutputLevel(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: console.cpp:1558
void PrintLine(int Type, const char *pLine)
Definition: console.cpp:1577
bool IsClosed()
Definition: console.h:200
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1517
static const ColorRGBA ms_SearchSelectedColor
Definition: console.h:162
CInstance * ConsoleForType(int ConsoleType)
Definition: console.cpp:901
static void ConDumpLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1532
bool m_WantsSelectionCopy
Definition: console.h:158
float m_StateChangeEnd
Definition: console.h:155
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition: console.cpp:1452
static void ConConsolePageUp(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1542
CGameConsole()
Definition: console.cpp:884
static void ConDumpRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1537
class IConsole * m_pConsole
Definition: console.h:144
virtual void OnReset() override
Definition: console.cpp:913
virtual void OnStateChange(int NewState, int OldState) override
Definition: console.cpp:1617
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1512
CInstance * CurrentConsole()
Definition: console.cpp:908
CInstance m_LocalConsole
Definition: console.h:147
void RequireUsername(bool UsernameReq)
Definition: console.cpp:1568
virtual void OnConsoleInit() override
Definition: console.cpp:1585
static void ConClearRemoteConsole(IConsole::IResult *pResult, void *pUserData)
Definition: console.cpp:1527
Definition: ringbuffer.h:82
void(* FCommandCallback)(IResult *pResult, void *pUserData)
Definition: console.h:94
@ 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:177
vector2_base< float > vec2
Definition: vmath.h:158