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
7#include <engine/textrender.h>
8
10
11class CMotd : public CComponent
12{
13 char m_aServerMotd[std::size(g_Config.m_SvMotd)];
18
19public:
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
Definition: component.h:20
Definition: motd.h:12
int m_RectQuadContainer
Definition: motd.h:16
char m_aServerMotd[std::size(g_Config.m_SvMotd)]
Definition: motd.h:13
virtual int Sizeof() const override
Definition: motd.h:21
virtual void OnWindowResize() override
Definition: motd.cpp:38
int64_t m_ServerMotdTime
Definition: motd.h:14
virtual void OnRender() override
Definition: motd.cpp:44
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition: motd.cpp:91
bool IsActive() const
Definition: motd.cpp:27
STextContainerIndex m_TextContainerIndex
Definition: motd.h:17
const char * ServerMotd() const
Definition: motd.h:23
virtual void OnStateChange(int NewState, int OldState) override
Definition: motd.cpp:32
int64_t ServerMotdUpdateTime() const
Definition: motd.h:24
void Clear()
Definition: motd.cpp:20
CMotd()
Definition: motd.cpp:13
virtual bool OnInput(const IInput::CEvent &Event) override
Definition: motd.cpp:137
int64_t m_ServerMotdUpdateTime
Definition: motd.h:15
Definition: input.h:24
CConfig g_Config
Definition: config.cpp:12
Definition: textrender.h:293