MCPcopy Create free account
hub / github.com/ddnet/ddnet / DoButton_GridHeader

Method DoButton_GridHeader

src/game/client/components/menus.cpp:249–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249int CMenus::DoButton_GridHeader(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Align)
250{
251 if(Checked == 2)
252 pRect->Draw(ColorRGBA(1, 0.98f, 0.5f, 0.55f), IGraphics::CORNER_T, 5.0f);
253 else if(Checked)
254 pRect->Draw(ColorRGBA(1, 1, 1, 0.5f), IGraphics::CORNER_T, 5.0f);
255
256 CUIRect Temp;
257 pRect->VMargin(5.0f, &Temp);
258 Ui()->DoLabel(&Temp, pText, pRect->h * CUi::ms_FontmodHeight, Align);
259 return Ui()->DoButtonLogic(pId, Checked, pRect, BUTTONFLAG_LEFT);
260}
261
262int CMenus::DoButton_Favorite(const void *pButtonId, const void *pParentId, bool Checked, const CUIRect *pRect)
263{

Callers 1

Calls 6

UiFunction · 0.85
VMarginMethod · 0.80
DoLabelMethod · 0.80
ColorRGBAClass · 0.70
DrawMethod · 0.45
DoButtonLogicMethod · 0.45

Tested by

no test coverage detected