diff --git a/UI/CustomButtonMappingScreen.cpp b/UI/CustomButtonMappingScreen.cpp index 1452294d4c..bc01153009 100644 --- a/UI/CustomButtonMappingScreen.cpp +++ b/UI/CustomButtonMappingScreen.cpp @@ -116,7 +116,7 @@ private: ImageID img_; }; -void CustomKeyScreen::CreateViews() { +void CustomButtonMappingScreen::CreateViews() { using namespace UI; using namespace CustomKeyData; auto co = GetI18NCategory("Controls"); @@ -281,7 +281,7 @@ static uint64_t arrayToInt(const bool ary[ARRAY_SIZE(CustomKeyData::customKeyLis return value; } -void CustomKeyScreen::saveArray() { +void CustomButtonMappingScreen::saveArray() { switch (id_) { case 0: g_Config.CustomButton0.key = arrayToInt(array); @@ -316,17 +316,17 @@ void CustomKeyScreen::saveArray() { } } -void CustomKeyScreen::dialogFinished(const Screen *dialog, DialogResult result) { +void CustomButtonMappingScreen::dialogFinished(const Screen *dialog, DialogResult result) { saveArray(); RecreateViews(); } -void CustomKeyScreen::onFinish(DialogResult result) { +void CustomButtonMappingScreen::onFinish(DialogResult result) { saveArray(); - g_Config.Save("ComboKeyScreen::onFinish"); + g_Config.Save("CustomButtonMappingScreen::onFinish"); } -UI::EventReturn CustomKeyScreen::ChoiceEventHandler::onChoiceClick(UI::EventParams &e){ +UI::EventReturn CustomButtonMappingScreen::ChoiceEventHandler::onChoiceClick(UI::EventParams &e){ checkbox_->Toggle(); return UI::EVENT_DONE; }; diff --git a/UI/CustomButtonMappingScreen.h b/UI/CustomButtonMappingScreen.h index f8927d94fb..2fda916268 100644 --- a/UI/CustomButtonMappingScreen.h +++ b/UI/CustomButtonMappingScreen.h @@ -24,9 +24,9 @@ namespace UI { class CheckBox; } -class CustomKeyScreen : public UIDialogScreenWithGameBackground { +class CustomButtonMappingScreen : public UIDialogScreenWithGameBackground { public: - CustomKeyScreen(const Path &gamePath, int id) : UIDialogScreenWithGameBackground(gamePath), id_(id) {} + CustomButtonMappingScreen(const Path &gamePath, int id) : UIDialogScreenWithGameBackground(gamePath), id_(id) {} const char *tag() const override { return "CustomKey"; } diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index 7144cd26d0..6b9c8206dd 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -90,43 +90,43 @@ void TouchControlVisibilityScreen::CreateViews() { }}); toggles_.push_back({ "Fast-forward", &g_Config.touchFastForwardKey.show, ImageID::invalid(), nullptr }); toggles_.push_back({ "Custom 1", &g_Config.touchCustom0.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 0)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 0)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 2", &g_Config.touchCustom1.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 1)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 1)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 3", &g_Config.touchCustom2.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 2)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 2)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 4", &g_Config.touchCustom3.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 3)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 3)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 5", &g_Config.touchCustom4.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 4)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 4)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 6", &g_Config.touchCustom5.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 5)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 5)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 7", &g_Config.touchCustom6.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 6)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 6)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 8", &g_Config.touchCustom7.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 7)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 7)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 9", &g_Config.touchCustom8.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 8)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 8)); return UI::EVENT_DONE; }}); toggles_.push_back({ "Custom 10", &g_Config.touchCustom9.show, ImageID::invalid(), [=](EventParams &e) { - screenManager()->push(new CustomKeyScreen(gamePath_, 9)); + screenManager()->push(new CustomButtonMappingScreen(gamePath_, 9)); return UI::EVENT_DONE; }});