mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 11:45:18 +02:00
UI: Make System_InputBox API asynchronous.
Doing this as a precursor to cleaning up the Android madness.
This commit is contained in:
+5
-7
@@ -26,13 +26,11 @@ void ChatMenu::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
#if defined(USING_WIN_UI)
|
||||
//freeze the ui when using ctrl + C hotkey need workaround
|
||||
if (g_Config.bBypassOSKWithKeyboard && !g_Config.bFullScreen) {
|
||||
std::wstring titleText = ConvertUTF8ToWString(n->T("Chat"));
|
||||
std::wstring defaultText = ConvertUTF8ToWString(n->T("Chat Here"));
|
||||
std::wstring inputChars;
|
||||
if (System_InputBoxGetWString(titleText.c_str(), defaultText, inputChars)) {
|
||||
//chatEdit_->SetText(ConvertWStringToUTF8(inputChars));
|
||||
sendChat(ConvertWStringToUTF8(inputChars));
|
||||
}
|
||||
System_InputBoxGetString(n->T("Chat"), n->T("Chat Here"), [](bool result, const std::string &value) {
|
||||
if (result) {
|
||||
sendChat(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
chatEdit_->OnEnter.Handle(this, &ChatMenu::OnSubmit);
|
||||
|
||||
Reference in New Issue
Block a user