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_BROADCAST_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_BROADCAST_H
|
2023-05-06 12:48:01 +00:00
|
|
|
|
|
|
|
#include <engine/textrender.h>
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CBroadcast : public CComponent
|
|
|
|
{
|
|
|
|
// broadcasts
|
|
|
|
char m_aBroadcastText[1024];
|
2019-04-02 21:28:10 +00:00
|
|
|
int m_BroadcastTick;
|
2010-12-16 02:17:16 +00:00
|
|
|
float m_BroadcastRenderOffset;
|
2023-05-06 12:48:01 +00:00
|
|
|
STextContainerIndex m_TextContainerIndex;
|
2010-12-16 02:17:16 +00:00
|
|
|
|
2023-05-06 08:26:52 +00:00
|
|
|
void RenderServerBroadcast();
|
2023-05-06 08:25:09 +00:00
|
|
|
void OnBroadcastMessage(const CNetMsg_Sv_Broadcast *pMsg);
|
|
|
|
|
2010-12-16 02:17:16 +00:00
|
|
|
public:
|
2022-01-31 02:11:47 +00:00
|
|
|
virtual int Sizeof() const override { return sizeof(*this); }
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnReset() override;
|
2023-05-06 12:48:01 +00:00
|
|
|
virtual void OnWindowResize() override;
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnRender() override;
|
|
|
|
virtual void OnMessage(int MsgType, void *pRawMsg) override;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|