diff options
| author | oy <Tom_Adams@web.de> | 2011-02-16 11:45:19 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-02-16 11:45:19 +0100 |
| commit | 927954a53bd4d1322e5474fd054d3241212394c4 (patch) | |
| tree | f99bbd6ff481c62ca29c4f3f6b85ffc8c36747be /src/game/client/components | |
| parent | b59c710ebac43c5d1aa126aa7f1eb49e9c942ac0 (diff) | |
| download | zcatch-927954a53bd4d1322e5474fd054d3241212394c4.tar.gz zcatch-927954a53bd4d1322e5474fd054d3241212394c4.zip | |
added new emoticons. Closes #362
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/emoticon.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/game/client/components/emoticon.cpp b/src/game/client/components/emoticon.cpp index 4500f418..1fa72a7f 100644 --- a/src/game/client/components/emoticon.cpp +++ b/src/game/client/components/emoticon.cpp @@ -6,7 +6,6 @@ #include <game/generated/client_data.h> #include <game/gamecore.h> // get_angle -#include <game/client/gameclient.h> #include <game/client/ui.h> #include <game/client/render.h> #include "emoticon.h" @@ -104,12 +103,6 @@ void CEmoticon::OnRender() m_WasActive = true; - float x, y; - Input()->MouseRelative(&x, &y); - - m_SelectorMouse.x += x; - m_SelectorMouse.y += y; - if (length(m_SelectorMouse) > 140) m_SelectorMouse = normalize(m_SelectorMouse) * 140; @@ -118,7 +111,7 @@ void CEmoticon::OnRender() SelectedAngle += 2*pi; if (length(m_SelectorMouse) > 100) - m_SelectedEmote = (int)(SelectedAngle / (2*pi) * 12.0f); + m_SelectedEmote = (int)(SelectedAngle / (2*pi) * NUM_EMOTICONS); CUIRect Screen = *UI()->Screen(); @@ -135,15 +128,15 @@ void CEmoticon::OnRender() Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id); Graphics()->QuadsBegin(); - for (int i = 0; i < 12; i++) + for (int i = 0; i < NUM_EMOTICONS; i++) { - float Angle = 2*pi*i/12.0; + float Angle = 2*pi*i/NUM_EMOTICONS; if (Angle > pi) Angle -= 2*pi; bool Selected = m_SelectedEmote == i; - float Size = Selected ? 96 : 64; + float Size = Selected ? 80 : 32; float NudgeX = 120 * cosf(Angle); float NudgeY = 120 * sinf(Angle); |