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_EMOTICON_H
4#define GAME_CLIENT_COMPONENTS_EMOTICON_H
5#include <base/vmath.h>
6#include <engine/console.h>
7#include <game/client/component.h>
8
9class CEmoticon : public CComponent
10{
11 bool m_WasActive;
12 bool m_Active;
13
14 vec2 m_SelectorMouse;
15 int m_SelectedEmote;
16 int m_SelectedEyeEmote;
17
18 static void ConKeyEmoticon(IConsole::IResult *pResult, void *pUserData);
19 static void ConEmote(IConsole::IResult *pResult, void *pUserData);
20
21public:
22 CEmoticon();
23 virtual int Sizeof() const override { return sizeof(*this); }
24
25 virtual void OnReset() override;
26 virtual void OnConsoleInit() override;
27 virtual void OnRender() override;
28 virtual void OnRelease() override;
29 virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override;
30
31 void Emote(int Emoticon);
32 void EyeEmote(int EyeEmote);
33};
34
35#endif
36