DDraceNetwork Documentation
Loading...
Searching...
No Matches
important_alert.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_IMPORTANT_ALERT_H
4#define GAME_CLIENT_COMPONENTS_IMPORTANT_ALERT_H
5
6#include <engine/textrender.h>
7
9
10#include <optional>
11
13{
14 bool m_Active = false;
17 char m_aTitleText[128];
18 char m_aMessageText[1024];
22
25 void DoImportantAlert(const char *pTitle, const char *pLogGroup, const char *pMessage);
26 float SecondsActive() const;
27
28public:
29 int Sizeof() const override { return sizeof(*this); }
30 void OnReset() override;
31 void OnWindowResize() override;
32 void OnRender() override;
33 void OnMessage(int MsgType, void *pRawMsg) override;
34 bool OnInput(const IInput::CEvent &Event) override;
35
36 bool IsActive() const;
37};
38
39#endif
Definition component.h:165
Definition important_alert.h:13
char m_aMessageText[1024]
Definition important_alert.h:18
void OnWindowResize() override
Definition important_alert.cpp:27
bool m_Active
Definition important_alert.h:14
char m_aTitleText[128]
Definition important_alert.h:17
void RenderImportantAlert()
Definition important_alert.cpp:58
void OnReset() override
Definition important_alert.cpp:21
bool IsActive() const
Definition important_alert.cpp:187
int Sizeof() const override
Definition important_alert.h:29
void OnRender() override
Definition important_alert.cpp:32
void OnMessage(int MsgType, void *pRawMsg) override
Definition important_alert.cpp:157
float SecondsActive() const
Definition important_alert.cpp:152
void DoImportantAlert(const char *pTitle, const char *pLogGroup, const char *pMessage)
Definition important_alert.cpp:128
void DeleteTextContainers()
Definition important_alert.cpp:51
STextContainerIndex m_TitleTextContainerIndex
Definition important_alert.h:19
float m_ActiveSince
Definition important_alert.h:15
bool OnInput(const IInput::CEvent &Event) override
Definition important_alert.cpp:171
STextContainerIndex m_CloseHintTextContainerIndex
Definition important_alert.h:21
float m_FadeOutSince
Definition important_alert.h:16
STextContainerIndex m_MessageTextContainerIndex
Definition important_alert.h:20
Definition input.h:22
Definition textrender.h:272