MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / OpenYesNo

Method OpenYesNo

NetStream/source/dialog.cpp:55–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void dialog::OpenYesNo(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText)
56{
57 if (s_currentDialog != CURRENT_DIALOG_NONE)
58 return;
59
60 bool isMainThread = thread::ThreadIDCache::Check();
61
62 paf::wstring title = titleText;
63 paf::wstring message = messageText;
64
65 if (!isMainThread)
66 thread::RMutex::MainThreadMutex()->Lock();
67
68 s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogYesNo, CommonGuiEventHandler, NULL);
69 s_currentPlugin = workPlugin;
70
71 if (!isMainThread)
72 thread::RMutex::MainThreadMutex()->Unlock();
73}
74
75void dialog::OpenOk(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText)
76{

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected