diff --git a/data/gui_icons.png b/data/gui_icons.png index 33c921577..f9e2814c8 100644 Binary files a/data/gui_icons.png and b/data/gui_icons.png differ diff --git a/datasrc/content.py b/datasrc/content.py index ec700d440..495cb5a75 100644 --- a/datasrc/content.py +++ b/datasrc/content.py @@ -269,7 +269,7 @@ set_speedup_arrow = SpriteSet("speedup_arrow", image_speedup_arrow, 1, 1) set_demobuttons = SpriteSet("demobuttons", image_demobuttons, 5, 1) set_fileicons = SpriteSet("fileicons", image_fileicons, 8, 1) set_guibuttons = SpriteSet("guibuttons", image_guibuttons, 12, 4) -set_guiicons = SpriteSet("guiicons", image_guiicons, 8, 2) +set_guiicons = SpriteSet("guiicons", image_guiicons, 12, 2) set_demobuttons2 = SpriteSet("demobuttons2", image_demobuttons2, 4, 1) set_audio_source = SpriteSet("audio_source", image_audio_source, 1, 1) @@ -423,6 +423,7 @@ container.sprites.Add(Sprite("guibutton_hover", set_guibuttons, 8,0,4,4)) container.sprites.Add(Sprite("guiicon_mute", set_guiicons, 0,0,4,2)) container.sprites.Add(Sprite("guiicon_friend", set_guiicons, 4,0,4,2)) +container.sprites.Add(Sprite("guiicon_emoticon_mute", set_guiicons, 8,0,4,2)) container.sprites.Add(Sprite("audio_source", set_audio_source, 0,0,1,1)) diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index 6fe444186..0144058d5 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -183,6 +183,15 @@ void CMenus::RenderPlayers(CUIRect MainView) Graphics()->QuadsDrawTL(&QuadItem, 1); Graphics()->QuadsEnd(); + ButtonBar.HMargin(1.0f, &ButtonBar); + ButtonBar.VSplitLeft(Width, &Button, &ButtonBar); + Graphics()->TextureSet(g_pData->m_aImages[IMAGE_GUIICONS].m_Id); + Graphics()->QuadsBegin(); + RenderTools()->SelectSprite(SPRITE_GUIICON_EMOTICON_MUTE); + QuadItem = IGraphics::CQuadItem(Button.x, Button.y, Button.w, Button.h); + Graphics()->QuadsDrawTL(&QuadItem, 1); + Graphics()->QuadsEnd(); + ButtonBar.VSplitLeft(20.0f, 0, &ButtonBar); ButtonBar.VSplitLeft(Width, &Button, &ButtonBar); Graphics()->TextureSet(g_pData->m_aImages[IMAGE_GUIICONS].m_Id); @@ -214,7 +223,7 @@ void CMenus::RenderPlayers(CUIRect MainView) UiDoListboxStart(&s_VoteList, &List, 24.0f, "", "", TotalPlayers, 1, -1, s_ScrollValue); // options - static int s_aPlayerIDs[MAX_CLIENTS][2] = {{0}}; + static int s_aPlayerIDs[MAX_CLIENTS][3] = {{0}}; for(int i = 0, Count = 0; i < MAX_CLIENTS; ++i) { @@ -261,7 +270,7 @@ void CMenus::RenderPlayers(CUIRect MainView) m_pClient->m_pCountryFlags->Render(m_pClient->m_aClients[Index].m_Country, &Color, Button2.x, Button2.y + Button2.h/2.0f - 0.75*Button2.h/2.0f, 1.5f*Button2.h, 0.75f*Button2.h); - // ignore button + // ignore chat button Item.m_Rect.HMargin(2.0f, &Item.m_Rect); Item.m_Rect.VSplitLeft(Width, &Button, &Item.m_Rect); Button.VSplitLeft((Width-Button.h)/4.0f, 0, &Button); @@ -272,12 +281,23 @@ void CMenus::RenderPlayers(CUIRect MainView) if(DoButton_Toggle(&s_aPlayerIDs[Index][0], m_pClient->m_aClients[Index].m_ChatIgnore, &Button, true)) m_pClient->m_aClients[Index].m_ChatIgnore ^= 1; + // ignore emoticon button + Item.m_Rect.VSplitLeft(20.0f, &Button, &Item.m_Rect); + Item.m_Rect.VSplitLeft(Width, &Button, &Item.m_Rect); + Button.VSplitLeft((Width-Button.h)/4.0f, 0, &Button); + Button.VSplitLeft(Button.h, &Button, 0); + if(g_Config.m_ClShowChatFriends && !m_pClient->m_aClients[Index].m_Friend) + DoButton_Toggle(&s_aPlayerIDs[Index][1], 1, &Button, false); + else + if(DoButton_Toggle(&s_aPlayerIDs[Index][1], m_pClient->m_aClients[Index].m_EmoticonIgnore, &Button, true)) + m_pClient->m_aClients[Index].m_EmoticonIgnore ^= 1; + // friend button Item.m_Rect.VSplitLeft(20.0f, &Button, &Item.m_Rect); Item.m_Rect.VSplitLeft(Width, &Button, &Item.m_Rect); Button.VSplitLeft((Width-Button.h)/4.0f, 0, &Button); Button.VSplitLeft(Button.h, &Button, 0); - if(DoButton_Toggle(&s_aPlayerIDs[Index][1], m_pClient->m_aClients[Index].m_Friend, &Button, true)) + if(DoButton_Toggle(&s_aPlayerIDs[Index][2], m_pClient->m_aClients[Index].m_Friend, &Button, true)) { if(m_pClient->m_aClients[Index].m_Friend) m_pClient->Friends()->RemoveFriend(m_pClient->m_aClients[Index].m_aName, m_pClient->m_aClients[Index].m_aClan); diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index ec7156fef..40af1bd5f 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -592,7 +592,7 @@ void CPlayers::RenderPlayer( Graphics()->QuadsSetRotation(0); } - if(g_Config.m_ClShowEmotes && m_pClient->m_aClients[ClientID].m_EmoticonStart != -1 && m_pClient->m_aClients[ClientID].m_EmoticonStart <= Client()->GameTick(g_Config.m_ClDummy) && m_pClient->m_aClients[ClientID].m_EmoticonStart + 2 * Client()->GameTickSpeed() > Client()->GameTick(g_Config.m_ClDummy)) + if(g_Config.m_ClShowEmotes && !m_pClient->m_aClients[ClientID].m_EmoticonIgnore && m_pClient->m_aClients[ClientID].m_EmoticonStart != -1 && m_pClient->m_aClients[ClientID].m_EmoticonStart <= Client()->GameTick(g_Config.m_ClDummy) && m_pClient->m_aClients[ClientID].m_EmoticonStart + 2 * Client()->GameTickSpeed() > Client()->GameTick(g_Config.m_ClDummy)) { Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id); diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index d5c49c8b0..adf07365d 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1859,6 +1859,7 @@ void CGameClient::CClientData::Reset() m_EmoticonStart = -1; m_Active = false; m_ChatIgnore = false; + m_EmoticonIgnore = false; m_Friend = false; m_Foe = false; m_AuthLevel = AUTHED_NO; diff --git a/src/game/client/gameclient.h b/src/game/client/gameclient.h index 3f06c219b..7611456c7 100644 --- a/src/game/client/gameclient.h +++ b/src/game/client/gameclient.h @@ -266,6 +266,7 @@ public: float m_Angle; bool m_Active; bool m_ChatIgnore; + bool m_EmoticonIgnore; bool m_Friend; bool m_Foe;