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