DDraceNetwork Docs
motd.h
Go to the documentation of this file.
1
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2
/* If you are missing that file, acquire a complete release at teeworlds.com. */
3
#ifndef GAME_CLIENT_COMPONENTS_MOTD_H
4
#define GAME_CLIENT_COMPONENTS_MOTD_H
5
6
#include <
engine/shared/config.h
>
7
#include <
engine/textrender.h
>
8
9
#include <
game/client/component.h
>
10
11
class
CMotd
:
public
CComponent
12
{
13
char
m_aServerMotd
[std::size(
g_Config
.m_SvMotd)];
14
int64_t
m_ServerMotdTime
;
15
int64_t
m_ServerMotdUpdateTime
;
16
int
m_RectQuadContainer
= -1;
17
STextContainerIndex
m_TextContainerIndex
;
18
19
public
:
20
CMotd
();
21
virtual
int
Sizeof
()
const override
{
return
sizeof
(*this); }
22
23
const
char
*
ServerMotd
()
const
{
return
m_aServerMotd
; }
24
int64_t
ServerMotdUpdateTime
()
const
{
return
m_ServerMotdUpdateTime
; }
25
void
Clear
();
26
bool
IsActive
()
const
;
27
28
virtual
void
OnRender
()
override
;
29
virtual
void
OnStateChange
(
int
NewState,
int
OldState)
override
;
30
virtual
void
OnWindowResize
()
override
;
31
virtual
void
OnMessage
(
int
MsgType,
void
*pRawMsg)
override
;
32
virtual
bool
OnInput
(
const
IInput::CEvent
&Event)
override
;
33
};
34
35
#endif
CComponent
Definition:
component.h:20
CMotd
Definition:
motd.h:12
CMotd::m_RectQuadContainer
int m_RectQuadContainer
Definition:
motd.h:16
CMotd::m_aServerMotd
char m_aServerMotd[std::size(g_Config.m_SvMotd)]
Definition:
motd.h:13
CMotd::Sizeof
virtual int Sizeof() const override
Definition:
motd.h:21
CMotd::OnWindowResize
virtual void OnWindowResize() override
Definition:
motd.cpp:38
CMotd::m_ServerMotdTime
int64_t m_ServerMotdTime
Definition:
motd.h:14
CMotd::OnRender
virtual void OnRender() override
Definition:
motd.cpp:44
CMotd::OnMessage
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition:
motd.cpp:91
CMotd::IsActive
bool IsActive() const
Definition:
motd.cpp:27
CMotd::m_TextContainerIndex
STextContainerIndex m_TextContainerIndex
Definition:
motd.h:17
CMotd::ServerMotd
const char * ServerMotd() const
Definition:
motd.h:23
CMotd::OnStateChange
virtual void OnStateChange(int NewState, int OldState) override
Definition:
motd.cpp:32
CMotd::ServerMotdUpdateTime
int64_t ServerMotdUpdateTime() const
Definition:
motd.h:24
CMotd::Clear
void Clear()
Definition:
motd.cpp:20
CMotd::CMotd
CMotd()
Definition:
motd.cpp:13
CMotd::OnInput
virtual bool OnInput(const IInput::CEvent &Event) override
Definition:
motd.cpp:137
CMotd::m_ServerMotdUpdateTime
int64_t m_ServerMotdUpdateTime
Definition:
motd.h:15
IInput::CEvent
Definition:
input.h:24
component.h
g_Config
CConfig g_Config
Definition:
config.cpp:12
config.h
STextContainerIndex
Definition:
textrender.h:293
textrender.h
src
game
client
components
motd.h
Generated by
1.9.4