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

Method OpenTwoButton

NetStream/source/dialog.cpp:159–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void dialog::OpenTwoButton(
160 Plugin *workPlugin,
161 const wchar_t *titleText,
162 const wchar_t *messageText,
163 uint32_t button1TextHashref,
164 uint32_t button2TextHashref)
165{
166 if (s_currentDialog != CURRENT_DIALOG_NONE)
167 return;
168
169 bool isMainThread = thread::ThreadIDCache::Check();
170
171 CommonGuiDialog::Param dparam;
172
173 dparam = CommonGuiDialog::Param::s_dialogYesNo;
174 sce_paf_memcpy(s_twoButtonContTable, CommonGuiDialog::Param::s_dialogYesNo.contents_list, sizeof(s_twoButtonContTable));
175 s_twoButtonContTable[1] = button2TextHashref;
176 s_twoButtonContTable[5] = button1TextHashref;
177 s_twoButtonContTable[3] = 0x20413274;
178 dparam.contents_list = (CommonGuiDialog::ContentsHashTable *)s_twoButtonContTable;
179
180 paf::wstring title = titleText;
181 paf::wstring message = messageText;
182
183 if (!isMainThread)
184 thread::RMutex::MainThreadMutex()->Lock();
185
186 s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &dparam, CommonGuiEventHandler, NULL);
187 s_currentPlugin = workPlugin;
188
189 if (!isMainThread)
190 thread::RMutex::MainThreadMutex()->Unlock();
191}
192
193ui::ListView *dialog::OpenListView(
194 Plugin *workPlugin,

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected