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

Method OpenPleaseWait

NetStream/source/dialog.cpp:31–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void dialog::OpenPleaseWait(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText, bool withCancel)
32{
33 if (s_currentDialog != CURRENT_DIALOG_NONE)
34 return;
35
36 bool isMainThread = thread::ThreadIDCache::Check();
37
38 paf::wstring title = titleText;
39 paf::wstring message = messageText;
40
41 if (!isMainThread)
42 thread::RMutex::MainThreadMutex()->Lock();
43
44 if (withCancel)
45 s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogCancelBusy, CommonGuiEventHandler, NULL);
46 else
47 s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogTextSmallBusy, CommonGuiEventHandler, NULL);
48
49 s_currentPlugin = workPlugin;
50
51 if (!isMainThread)
52 thread::RMutex::MainThreadMutex()->Unlock();
53}
54
55void dialog::OpenYesNo(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText)
56{

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected