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

Method OpenThreeButton

NetStream/source/dialog.cpp:122–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void dialog::OpenThreeButton(
123 Plugin *workPlugin,
124 const wchar_t *titleText,
125 const wchar_t *messageText,
126 uint32_t button1TextHashref,
127 uint32_t button2TextHashref,
128 uint32_t button3TextHashref)
129{
130 if (s_currentDialog != CURRENT_DIALOG_NONE)
131 return;
132
133 bool isMainThread = thread::ThreadIDCache::Check();
134
135 CommonGuiDialog::Param dparam;
136
137 dparam = CommonGuiDialog::Param::s_dialogYesNoCancel;
138 sce_paf_memcpy(s_threeButtonContTable, CommonGuiDialog::Param::s_dialogYesNoCancel.contents_list, sizeof(s_threeButtonContTable));
139 s_threeButtonContTable[1] = button1TextHashref;
140 s_threeButtonContTable[5] = button2TextHashref;
141 s_threeButtonContTable[9] = button3TextHashref;
142 s_threeButtonContTable[7] = 0x20413274;
143 s_threeButtonContTable[11] = 0x20413274;
144 dparam.contents_list = (CommonGuiDialog::ContentsHashTable *)s_threeButtonContTable;
145
146 paf::wstring title = titleText;
147 paf::wstring message = messageText;
148
149 if (!isMainThread)
150 thread::RMutex::MainThreadMutex()->Lock();
151
152 s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &dparam, CommonGuiEventHandler, NULL);
153 s_currentPlugin = workPlugin;
154
155 if (!isMainThread)
156 thread::RMutex::MainThreadMutex()->Unlock();
157}
158
159void dialog::OpenTwoButton(
160 Plugin *workPlugin,

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected