Make Toggle All actually function.

This commit is contained in:
The Dax committed 2013-10-19 23:24:38 -04:00
1 parent c5c0945559
commit d099692ed0
6 files changed
+23 -25

No files matched your search

+3 -5
View File
@@ -23,10 +23,6 @@
#include <vector>
#include <string>
TouchControlVisibilityScreen::TouchControlVisibilityScreen() {
}
void TouchControlVisibilityScreen::CreateViews() {
using namespace UI;
@@ -58,7 +54,6 @@ void TouchControlVisibilityScreen::CreateViews() {
keyImages["L"] = I_L;
keyImages["R"] = I_R;
std::map<std::string, bool*> keyToggles;
keyToggles["Circle"] = &g_Config.bShowTouchCircle;
keyToggles["Cross"] = &g_Config.bShowTouchCross;
keyToggles["Square"] = &g_Config.bShowTouchSquare;
@@ -98,5 +93,8 @@ UI::EventReturn TouchControlVisibilityScreen::OnBack(UI::EventParams &e) {
}
UI::EventReturn TouchControlVisibilityScreen::OnToggleAll(UI::EventParams &e) {
for (auto i = keyToggles.begin(); i != keyToggles.end(); ++i)
*i->second = !*i->second;
return UI::EVENT_DONE;
}