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

Method ShowFileDialogError

src/game/editor/editor.cpp:4195–4218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4193}
4194
4195void CEditor::ShowFileDialogError(const char *pFormat, ...)
4196{
4197 char aMessage[1024];
4198 va_list VarArgs;
4199 va_start(VarArgs, pFormat);
4200 str_format_v(aMessage, sizeof(aMessage), pFormat, VarArgs);
4201 va_end(VarArgs);
4202
4203 auto ContextIterator = m_PopupMessageContexts.find(aMessage);
4204 CUi::SMessagePopupContext *pContext;
4205 if(ContextIterator != m_PopupMessageContexts.end())
4206 {
4207 pContext = ContextIterator->second;
4208 Ui()->ClosePopupMenu(pContext);
4209 }
4210 else
4211 {
4212 pContext = new CUi::SMessagePopupContext();
4213 pContext->ErrorColor();
4214 str_copy(pContext->m_aMessage, aMessage);
4215 m_PopupMessageContexts[pContext->m_aMessage] = pContext;
4216 }
4217 Ui()->ShowPopupMessage(Ui()->MouseX(), Ui()->MouseY(), pContext);
4218}
4219
4220void CEditor::RenderModebar(CUIRect View)
4221{

Callers 15

CallbackOpenMapMethod · 0.80
CallbackAppendMapMethod · 0.80
CallbackSaveMapMethod · 0.80
CallbackSaveCopyMapMethod · 0.80
CallbackSaveImageMethod · 0.80
CallbackSaveSoundMethod · 0.80
AddImageMethod · 0.80
AddSoundMethod · 0.80
PopupMenuToolsMethod · 0.80
PopupImageMethod · 0.80
PopupSoundMethod · 0.80

Calls 9

str_format_vFunction · 0.85
UiFunction · 0.85
endMethod · 0.80
ClosePopupMenuMethod · 0.80
ErrorColorMethod · 0.80
ShowPopupMessageMethod · 0.80
MouseXMethod · 0.80
MouseYMethod · 0.80
str_copyFunction · 0.50

Tested by

no test coverage detected