Apply rounded corners to all Choices by default, apply proper group rounding in many places.

This commit is contained in:
Henrik Rydgård committed 2026-10-24 11:21:40 +02:00
1 parent 038e4b67ca
commit ad132d8f1b
15 files changed
+131 -77

No files matched your search

+12 -7
View File
@@ -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 &params) {
moreChoices->Add(new Choice(km->T("Show PSP")))->OnClick.Add([this](UI::EventParams &params) {
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 {