From e931a51017d493cb2db68f556b176e4230bc359f Mon Sep 17 00:00:00 2001 From: Aloshi Date: Tue, 25 Mar 2014 17:46:58 -0500 Subject: [PATCH] Can now press Ctrl-G to toggle show all borders on all ComponentGrids. --- src/Settings.cpp | 4 +++- src/Window.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Settings.cpp b/src/Settings.cpp index 13e342a82..2cae7bfab 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -29,12 +29,14 @@ void Settings::setDefaults() mBoolMap["ParseGamelistOnly"] = false; mBoolMap["DrawFramerate"] = false; mBoolMap["ShowExit"] = true; - mBoolMap["Debug"] = false; mBoolMap["Windowed"] = false; mBoolMap["EnableSounds"] = true; mBoolMap["ShowHelpPrompts"] = true; mBoolMap["ScrapeRatings"] = true; + mBoolMap["Debug"] = false; + mBoolMap["DebugGrid"] = false; + mIntMap["DimTime"] = 120*1000; mIntMap["ScraperResizeWidth"] = 400; mIntMap["ScraperResizeHeight"] = 0; diff --git a/src/Window.cpp b/src/Window.cpp index b4f456e02..148979eca 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -104,7 +104,11 @@ void Window::deinit() void Window::input(InputConfig* config, Input input) { - if(config->isMappedTo("mastervolup", input)) + if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_g && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug")) + { + // toggle debug grid + Settings::getInstance()->setBool("DebugGrid", !Settings::getInstance()->getBool("DebugGrid")); + }else if(config->isMappedTo("mastervolup", input)) { VolumeControl::getInstance()->setVolume(VolumeControl::getInstance()->getVolume() + 5); }