2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_MOTD_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_MOTD_H
|
2023-03-09 23:32:48 +00:00
|
|
|
|
|
|
|
#include <engine/shared/config.h>
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CMotd : public CComponent
|
|
|
|
{
|
2023-03-09 23:32:48 +00:00
|
|
|
char m_aServerMotd[std::size(g_Config.m_SvMotd)];
|
2021-06-23 05:05:49 +00:00
|
|
|
int64_t m_ServerMotdTime;
|
2023-02-19 11:17:56 +00:00
|
|
|
int64_t m_ServerMotdUpdateTime;
|
2023-02-14 22:56:47 +00:00
|
|
|
int m_RectQuadContainer = -1;
|
2023-05-05 13:58:17 +00:00
|
|
|
STextContainerIndex m_TextContainerIndex;
|
2020-09-26 19:41:58 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
2023-02-19 11:17:56 +00:00
|
|
|
CMotd();
|
2022-01-31 02:11:47 +00:00
|
|
|
virtual int Sizeof() const override { return sizeof(*this); }
|
2023-02-14 22:56:07 +00:00
|
|
|
|
|
|
|
const char *ServerMotd() const { return m_aServerMotd; }
|
2023-02-19 11:17:56 +00:00
|
|
|
int64_t ServerMotdUpdateTime() const { return m_ServerMotdUpdateTime; }
|
2010-05-29 07:25:38 +00:00
|
|
|
void Clear();
|
2023-02-14 22:56:27 +00:00
|
|
|
bool IsActive() const;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnRender() override;
|
|
|
|
virtual void OnStateChange(int NewState, int OldState) override;
|
2023-02-14 22:56:47 +00:00
|
|
|
virtual void OnWindowResize() override;
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnMessage(int MsgType, void *pRawMsg) override;
|
2023-04-21 16:31:11 +00:00
|
|
|
virtual bool OnInput(const IInput::CEvent &Event) override;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|