diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bd33d28ea..e635a2d3c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1137,6 +1137,7 @@ set(NativeAppSource UI/GameScreen.cpp UI/GameSettingsScreen.cpp UI/TouchControlLayoutScreen.cpp + UI/TouchControlVisibilityScreen.cpp UI/GamepadEmu.cpp UI/UIShader.cpp UI/OnScreenDisplay.cpp diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index ad64efd5d6..7eca53adb1 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -303,7 +303,7 @@ void InitPadLayout() { int D_pad_X = 2.5 * D_pad_Radius; int D_pad_Y = dp_yres - D_pad_Radius; - if (g_Config.bShowTouchAnalogStick){ + if (g_Config.bShowTouchAnalogStick) { D_pad_Y -= 200 * scale; } @@ -430,21 +430,12 @@ UI::ViewGroup *CreatePadLayout(bool *pause) { const int halfW = dp_xres / 2; if (g_Config.bShowTouchControls) { - float scale = g_Config.fButtonScale; -<<<<<<< HEAD -<<<<<<< HEAD #if USE_PAUSE_BUTTON root->Add(new BoolButton(pause, I_ROUND, I_ARROW, scale, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); #endif - -======= -======= - ->>>>>>> 4936897... Make Toggle All actually function. if (g_Config.bShowTouchCircle) ->>>>>>> 86338a5... Add a touch control visibility screen. All touch controls can now be toggled on or off, except for the Pause button on platforms that have it, as a safety precaution. root->Add(new PSPButton(CTRL_CIRCLE, I_ROUND, I_CIRCLE, scale, new AnchorLayoutParams(Action_circle_button_X, Action_circle_button_Y, NONE, NONE, true))); if (g_Config.bShowTouchCross) diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index ce75a74a9d..aea4d9445a 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -74,10 +74,10 @@ void TouchControlVisibilityScreen::CreateViews() { for (auto i = keyToggles.begin(); i != keyToggles.end(); ++i) { LinearLayout *row = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); row->SetSpacing(0); - - imageFinder = keyImages.find(i->first); row->Add(new CheckBox(i->second, "", "", new LinearLayoutParams(50, WRAP_CONTENT))); + imageFinder = keyImages.find(i->first); + if (imageFinder != keyImages.end()) { row->Add(new Choice(keyImages[imageFinder->first], new LinearLayoutParams(1.0f))); } else { diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 3498f2cf68..500aaaffa2 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -113,6 +113,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/UI/ControlMappingScreen.cpp \ $(SRC)/UI/GameSettingsScreen.cpp \ $(SRC)/UI/TouchControlLayoutScreen.cpp \ + $(SRC)/UI/TouchControlVisibilityScreen.cpp \ $(SRC)/UI/CwCheatScreen.cpp \ $(SRC)/ext/disarm.cpp \ $(SRC)/ext/libkirk/AES.c \