mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Remove an ifdef controlling dialog button order
This commit is contained in:
parent
fc49c1029a
commit
676a4de4d7
@ -188,6 +188,8 @@ enum SystemProperty {
|
||||
SYSPROP_SKIP_UI,
|
||||
|
||||
SYSPROP_USER_DOCUMENTS_DIR,
|
||||
|
||||
SYSPROP_OK_BUTTON_LEFT,
|
||||
};
|
||||
|
||||
enum class SystemNotification {
|
||||
|
@ -393,10 +393,8 @@ void PopupScreen::TriggerFinish(DialogResult result) {
|
||||
|
||||
OnCompleted(result);
|
||||
}
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
// Inform UI that popup close to hide OSK (if visible)
|
||||
System_NotifyUIState("popup_closed");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PopupScreen::CreateViews() {
|
||||
@ -433,17 +431,17 @@ void PopupScreen::CreateViews() {
|
||||
Margins buttonMargins(5, 5);
|
||||
|
||||
// Adjust button order to the platform default.
|
||||
#if defined(_WIN32)
|
||||
defaultButton_ = buttonRow->Add(new Button(button1_, new LinearLayoutParams(1.0f, buttonMargins)));
|
||||
defaultButton_->OnClick.Handle<UIScreen>(this, &UIScreen::OnOK);
|
||||
if (!button2_.empty())
|
||||
buttonRow->Add(new Button(button2_, new LinearLayoutParams(1.0f, buttonMargins)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
|
||||
#else
|
||||
if (!button2_.empty())
|
||||
buttonRow->Add(new Button(button2_, new LinearLayoutParams(1.0f)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
|
||||
defaultButton_ = buttonRow->Add(new Button(button1_, new LinearLayoutParams(1.0f)));
|
||||
defaultButton_->OnClick.Handle<UIScreen>(this, &UIScreen::OnOK);
|
||||
#endif
|
||||
if (System_GetPropertyBool(SYSPROP_OK_BUTTON_LEFT)) {
|
||||
defaultButton_ = buttonRow->Add(new Button(button1_, new LinearLayoutParams(1.0f, buttonMargins)));
|
||||
defaultButton_->OnClick.Handle<UIScreen>(this, &UIScreen::OnOK);
|
||||
if (!button2_.empty())
|
||||
buttonRow->Add(new Button(button2_, new LinearLayoutParams(1.0f, buttonMargins)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
|
||||
} else {
|
||||
if (!button2_.empty())
|
||||
buttonRow->Add(new Button(button2_, new LinearLayoutParams(1.0f)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
|
||||
defaultButton_ = buttonRow->Add(new Button(button1_, new LinearLayoutParams(1.0f)));
|
||||
defaultButton_->OnClick.Handle<UIScreen>(this, &UIScreen::OnOK);
|
||||
}
|
||||
|
||||
box_->Add(buttonRow);
|
||||
}
|
||||
|
@ -435,6 +435,8 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
||||
}
|
||||
case SYSPROP_DEBUGGER_PRESENT:
|
||||
return IsDebuggerPresent();
|
||||
case SYSPROP_OK_BUTTON_LEFT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -383,6 +383,8 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
||||
return !g_Config.bDisableHTTPS;
|
||||
case SYSPROP_DEBUGGER_PRESENT:
|
||||
return IsDebuggerPresent();
|
||||
case SYSPROP_OK_BUTTON_LEFT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user