mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-31 19:47:06 +01:00
Apply rounded corners to all Choices by default, apply proper group rounding in many places.
This commit is contained in:
1 parent
038e4b67ca
commit
ad132d8f1b
15 files changed
+131
-77
No files matched your search
@@ -227,26 +227,31 @@ static const BindingCategory cats[] = {
|
||||
{}, // sentinel
|
||||
};
|
||||
|
||||
|
||||
void ControlMappingScreen::CreateSettingsViews(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
auto km = GetI18NCategory(I18NCat::KEYMAPPING);
|
||||
parent->Add(new Choice(km->T("Clear All")))->OnClick.Add([](UI::EventParams &) {
|
||||
|
||||
ChoiceGroup *resetChoices = parent->Add(new ChoiceGroup("", new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(0, 12))));
|
||||
|
||||
resetChoices->Add(new Choice(km->T("Clear All")))->OnClick.Add([](UI::EventParams &) {
|
||||
KeyMap::ClearAllMappings();
|
||||
});
|
||||
parent->Add(new Choice(km->T("Default All")))->OnClick.Add([](UI::EventParams &) {
|
||||
resetChoices->Add(new Choice(km->T("Default All")))->OnClick.Add([](UI::EventParams &) {
|
||||
KeyMap::RestoreDefault();
|
||||
});
|
||||
|
||||
ChoiceGroup *moreChoices = parent->Add(new ChoiceGroup("", new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
|
||||
std::string sysName = System_GetProperty(SYSPROP_NAME);
|
||||
// If there's a builtin controller, restore to default should suffice. No need to conf the controller on top.
|
||||
if (!KeyMap::HasBuiltinController(sysName) && KeyMap::GetSeenPads().size()) {
|
||||
parent->Add(new Choice(km->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure);
|
||||
moreChoices->Add(new Choice(km->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure);
|
||||
}
|
||||
parent->Add(new Choice(km->T("Show PSP")))->OnClick.Add([this](UI::EventParams ¶ms) {
|
||||
moreChoices->Add(new Choice(km->T("Show PSP")))->OnClick.Add([this](UI::EventParams ¶ms) {
|
||||
screenManager()->push(new VisualMappingScreen(gamePath_));
|
||||
});
|
||||
parent->Add(new CheckBox(&g_Config.bAllowMappingCombos, km->T("Allow combo mappings")));
|
||||
parent->Add(new CheckBox(&g_Config.bStrictComboOrder, km->T("Strict combo input order")));
|
||||
moreChoices->Add(new CheckBox(&g_Config.bAllowMappingCombos, km->T("Allow combo mappings")));
|
||||
moreChoices->Add(new CheckBox(&g_Config.bStrictComboOrder, km->T("Strict combo input order")));
|
||||
}
|
||||
|
||||
std::string_view ControlMappingScreen::GetTitle() const {
|
||||
|
||||
Reference in new issue
Block a user