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

Method PopupMessage

src/game/client/ui.cpp:1793–1803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1791}
1792
1793CUi::EPopupMenuFunctionResult CUi::PopupMessage(void *pContext, CUIRect View, bool Active)
1794{
1795 SMessagePopupContext *pMessagePopup = static_cast<SMessagePopupContext *>(pContext);
1796 CUi *pUI = pMessagePopup->m_pUI;
1797
1798 pUI->TextRender()->TextColor(pMessagePopup->m_TextColor);
1799 pUI->TextRender()->Text(View.x, View.y, SMessagePopupContext::POPUP_FONT_SIZE, pMessagePopup->m_aMessage, View.w);
1800 pUI->TextRender()->TextColor(pUI->TextRender()->DefaultTextColor());
1801
1802 return (Active && pUI->ConsumeHotkey(HOTKEY_ENTER)) ? CUi::POPUP_CLOSE_CURRENT : CUi::POPUP_KEEP_OPEN;
1803}
1804
1805void CUi::ShowPopupMessage(float X, float Y, SMessagePopupContext *pContext)
1806{

Callers

nothing calls this directly

Calls 5

TextColorMethod · 0.80
TextMethod · 0.80
DefaultTextColorMethod · 0.80
ConsumeHotkeyMethod · 0.80
TextRenderMethod · 0.45

Tested by

no test coverage detected