From 867f9444593f414e0d73b6e85f341f49b0b3aad5 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 28 Mar 2011 21:10:37 +0200 Subject: [PATCH] added graphic buttons for remove/add friend and chat ignore/notice --- data/gui_buttons.png | Bin 0 -> 13232 bytes datasrc/content.py | 9 ++++++ src/game/client/components/menus.h | 2 +- src/game/client/components/menus_demo.cpp | 14 ++++----- src/game/client/components/menus_ingame.cpp | 33 +++++++++++++------- 5 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 data/gui_buttons.png diff --git a/data/gui_buttons.png b/data/gui_buttons.png new file mode 100644 index 0000000000000000000000000000000000000000..3593569f7dbb9ea14656350415791db1d4a2f485 GIT binary patch literal 13232 zcmXY21yt1S(_Okt3F#0-Lb@C25Tv`MluD#Sm-3^5C{ZIPF7MC0)Yo#Lc~y!!M`@p5h(Z%%|TYj83Mt0@%#xl zzU21+flxu@B*oP|(hk$zeeiqkdsp18Yw-nW15rZ*sHil=@_e}A@zAoUq;iYYrTUJ) zQe{yEWkp147tzqbGmc9|65t|zKTFJ@q6&;vBB4I4hKg=qHDoQbFjkeg-ufxTAQ!-K2GEH`kXGX$>cZDS{Bz3%Vi7*U&D}w*JLIT(ux@p85!i@5 zFtdN5oTw6S<|FZ`WA;v(SaY9_eyn{6CUSEM<<;dS9W8CheBBqdLM8J3$>QM3 zO4j7$QKPu@hpZ2|P>rIi?A_1t@luYxdcd+l zsfQ4e_bL9?JHub)w$p_~$w{}0SF*!`V9G|Tj#QE&+Xn{<-zbE4r%H+1ye@MLTHHK5 zJQ8&O5?1A%|E2j}kc4G3WHISY9V<-w53t z93P@I72{(DYN6l((x_D|ZOhOVdkEE+Ko7cPCNgC0@O(P4ZA)Wj+)6y0;Q>@NR>EdFCtWxZ-*}t4A3NYL?El;yj6=Etc>@Li(YBC| zog7yuxf2UR2uh%-#awr#Z*v$<-mcFb1f9nWTjGu^Nw3CwM;54J7u^X4v>ZH@bbRe# z3g;Dtw6?X~j`+hQ!14QEfeKG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37lc`Pn)mo0f?YM%OgPyVCu$0 zBxT}dOiSchU^4ev3p*3n1$2ginVD-2gyQMNMfbwO!lwZ+UD*+cpx^8gadF`? zK0YoB6ox2r>pER9WFraMA~15owh3Mb3vfv0v+uNMAd|sBH>RhDr|0*iBpD^87!y$M zUja*>Gm7^$rgiDST6;4&3OT|%2V*Q?Kqf}6qg~vAc0BW0*Q~c)0C{Wa@uozpGDfK| z7dWb5WImqVN?BPMyzB{B*2F~o!-LN=zXIO2n5yavVq)S?pFaI$-X1Sjqo?rNr3Q#< zbLQji?VY-*qOKmIR47q8MRFGVwC^GSkN{NWH}v#jz^DZSB_qHS+HBg72o%1KhU$;Q-N2lP;~N83cBd{8#Ks zbR+tSmhU|Fp1k(2cW4;b^}8>65W>T*5=6c^P)#y_+Ye9G{`BM9ryuP}A}geK7hA0r z@S<=l`%loV?_@$N|Ir1APZ{N#q9TM+XG93%4XaN5I;v%MbY4%RpQgN}k?g2F2=6I( zdmUs|Cs~Fx{&FqZ@B>swK_VkCzfJ`kH^y)V&)y5=;msCPD_X>*$gmFvuR?DoButtonLogic(pID, pText, Checked, pRect); } -int CMenus::DoButton_DemoPlayer_Sprite(const void *pID, int SpriteID, int Checked, const CUIRect *pRect) +int CMenus::DoButton_Sprite(const void *pID, int ImageID, int SpriteID, int Checked, const CUIRect *pRect) { RenderTools()->DrawUIRect(pRect, vec4(1,1,1, Checked ? 0.10f : 0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f); - Graphics()->TextureSet(g_pData->m_aImages[IMAGE_DEMOBUTTONS].m_Id); + Graphics()->TextureSet(g_pData->m_aImages[ImageID].m_Id); Graphics()->QuadsBegin(); RenderTools()->SelectSprite(SpriteID); IGraphics::CQuadItem QuadItem(pRect->x, pRect->y, pRect->w, pRect->h); @@ -147,12 +147,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) static int s_PlayPauseButton = 0; if(!pInfo->m_Paused) { - if(DoButton_DemoPlayer_Sprite(&s_PlayPauseButton, SPRITE_DEMOBUTTON_PAUSE, pInfo->m_Paused, &Button)) + if(DoButton_Sprite(&s_PlayPauseButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_PAUSE, pInfo->m_Paused, &Button)) DemoPlayer()->Pause(); } else { - if(DoButton_DemoPlayer_Sprite(&s_PlayPauseButton, SPRITE_DEMOBUTTON_PLAY, !pInfo->m_Paused, &Button)) + if(DoButton_Sprite(&s_PlayPauseButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_PLAY, !pInfo->m_Paused, &Button)) DemoPlayer()->Unpause(); } @@ -161,7 +161,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) ButtonBar.VSplitLeft(Margins, 0, &ButtonBar); ButtonBar.VSplitLeft(ButtonbarHeight, &Button, &ButtonBar); static int s_ResetButton = 0; - if(DoButton_DemoPlayer_Sprite(&s_ResetButton, SPRITE_DEMOBUTTON_STOP, false, &Button)) + if(DoButton_Sprite(&s_ResetButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_STOP, false, &Button)) { m_pClient->OnReset(); DemoPlayer()->Pause(); @@ -172,14 +172,14 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) ButtonBar.VSplitLeft(Margins, 0, &ButtonBar); ButtonBar.VSplitLeft(ButtonbarHeight, &Button, &ButtonBar); static int s_SlowDownButton = 0; - if(DoButton_DemoPlayer_Sprite(&s_SlowDownButton, SPRITE_DEMOBUTTON_SLOWER, 0, &Button) || Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN)) + if(DoButton_Sprite(&s_SlowDownButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_SLOWER, 0, &Button) || Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN)) DecreaseDemoSpeed = true; // fastforward ButtonBar.VSplitLeft(Margins, 0, &ButtonBar); ButtonBar.VSplitLeft(ButtonbarHeight, &Button, &ButtonBar); static int s_FastForwardButton = 0; - if(DoButton_DemoPlayer_Sprite(&s_FastForwardButton, SPRITE_DEMOBUTTON_FASTER, 0, &Button)) + if(DoButton_Sprite(&s_FastForwardButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_FASTER, 0, &Button)) IncreaseDemoSpeed = true; // speed meter diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index 27c2875b7..007842f8a 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -121,11 +121,11 @@ void CMenus::RenderGame(CUIRect MainView) if(!m_pClient->m_Snap.m_paPlayerInfos[i] || i == m_pClient->m_Snap.m_LocalClientID) continue; - Options.HSplitTop(25.0f, &ButtonBar, &Options); + Options.HSplitTop(28.0f, &ButtonBar, &Options); ButtonBar.VSplitRight(200.0f, &Player, &ButtonBar); // player info - Player.VSplitLeft(25.0f, &Button, &Player); + Player.VSplitLeft(28.0f, &Button, &Player); CTeeRenderInfo Info = m_pClient->m_aClients[i].m_RenderInfo; Info.m_Size = Button.h; RenderTools()->RenderTee(CAnimState::GetIdle(), &Info, EMOTE_NORMAL, vec2(1.0f, 0.0f), vec2(Button.x+Button.h/2, Button.y+Button.h/2)); @@ -142,19 +142,30 @@ void CMenus::RenderGame(CUIRect MainView) TextRender()->TextEx(&Cursor, m_pClient->m_aClients[i].m_aClan, -1); // ignore button - ButtonBar.VSplitMid(&Button, &ButtonBar); - Button.VSplitRight(10.0f, &Button, 0); - if(DoButton_CheckBox(&s_aPlayerIDs[i][0], Localize("Ignore"), m_pClient->m_aClients[i].m_ChatIgnore, &Button)) - m_pClient->m_aClients[i].m_ChatIgnore ^= 1; + ButtonBar.VSplitLeft(10.0f, 0, &ButtonBar); + ButtonBar.VSplitLeft(ButtonBar.h*2.0f, &Button, &ButtonBar); + if(m_pClient->m_aClients[i].m_ChatIgnore) + { + if(DoButton_Sprite(&s_aPlayerIDs[i][0], IMAGE_GUIBUTTONS, SPRITE_GUIBUTTON_CHATON, m_pClient->m_aClients[i].m_ChatIgnore, &Button)) + m_pClient->m_aClients[i].m_ChatIgnore = 0; + } + else + { + if(DoButton_Sprite(&s_aPlayerIDs[i][0], IMAGE_GUIBUTTONS, SPRITE_GUIBUTTON_CHATOFF, !m_pClient->m_aClients[i].m_ChatIgnore, &Button)) + m_pClient->m_aClients[i].m_ChatIgnore = 1; + } // friend button - ButtonBar.VSplitMid(&Button, &ButtonBar); - Button.VSplitLeft(10.0f, 0, &Button); - if(DoButton_CheckBox(&s_aPlayerIDs[i][1], Localize("Friend"), m_pClient->m_aClients[i].m_Friend, &Button)) + ButtonBar.VSplitLeft(10.0f, 0, &ButtonBar); + ButtonBar.VSplitLeft(ButtonBar.h*2.0f, &Button, &ButtonBar); + if(m_pClient->m_aClients[i].m_Friend) { - if(m_pClient->m_aClients[i].m_Friend) + if(DoButton_Sprite(&s_aPlayerIDs[i][1], IMAGE_GUIBUTTONS, SPRITE_GUIBUTTON_FRIENDREM, m_pClient->m_aClients[i].m_Friend, &Button)) m_pClient->Friends()->RemoveFriend(m_pClient->m_aClients[i].m_aName, m_pClient->m_aClients[i].m_aClan); - else + } + else + { + if(DoButton_Sprite(&s_aPlayerIDs[i][1], IMAGE_GUIBUTTONS, SPRITE_GUIBUTTON_FRIENDADD, !m_pClient->m_aClients[i].m_Friend, &Button)) m_pClient->Friends()->AddFriend(m_pClient->m_aClients[i].m_aName, m_pClient->m_aClients[i].m_aClan); } }