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_BROADCAST_H
4#define GAME_CLIENT_COMPONENTS_BROADCAST_H
5
6#include <engine/textrender.h>
7
8#include <game/client/component.h>
9
10class CBroadcast : public CComponent
11{
12 // broadcasts
13 char m_aBroadcastText[1024];
14 int m_BroadcastTick;
15 float m_BroadcastRenderOffset;
16 STextContainerIndex m_TextContainerIndex;
17
18 void RenderServerBroadcast();
19
20public:
21 int Sizeof() const override { return sizeof(*this); }
22 void OnReset() override;
23 void OnWindowResize() override;
24 void OnRender() override;
25 void OnMessage(int MsgType, void *pRawMsg) override;
26
27 void DoBroadcast(const char *pText);
28};
29
30#endif
31