| 1830 | } |
| 1831 | |
| 1832 | void CUi::ShowPopupConfirm(float X, float Y, SConfirmPopupContext *pContext) |
| 1833 | { |
| 1834 | const float TextWidth = minimum(std::ceil(TextRender()->TextWidth(SConfirmPopupContext::POPUP_FONT_SIZE, pContext->m_aMessage, -1, -1.0f) + 0.5f), SConfirmPopupContext::POPUP_MAX_WIDTH); |
| 1835 | float TextHeight = 0.0f; |
| 1836 | STextSizeProperties TextSizeProps{}; |
| 1837 | TextSizeProps.m_pHeight = &TextHeight; |
| 1838 | TextRender()->TextWidth(SConfirmPopupContext::POPUP_FONT_SIZE, pContext->m_aMessage, -1, TextWidth, 0, TextSizeProps); |
| 1839 | const float PopupHeight = TextHeight + SConfirmPopupContext::POPUP_BUTTON_HEIGHT + SConfirmPopupContext::POPUP_BUTTON_SPACING + 10.0f; |
| 1840 | pContext->m_pUI = this; |
| 1841 | pContext->m_Result = SConfirmPopupContext::UNSET; |
| 1842 | DoPopupMenu(pContext, X, Y, TextWidth + 10.0f, PopupHeight, pContext, PopupConfirm); |
| 1843 | } |
| 1844 | |
| 1845 | CUi::EPopupMenuFunctionResult CUi::PopupConfirm(void *pContext, CUIRect View, bool Active) |
| 1846 | { |
no test coverage detected