1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 12:15:21 +02:00

MenuSettingBool: Support toggling of boolean settings using left/right.

This commit is contained in:
Maarten ter Huurne 2011-10-23 09:47:51 +02:00
parent a38c283e17
commit 641c989934

View File

@ -66,12 +66,16 @@ void MenuSettingBool::draw(int y)
bool MenuSettingBool::handleButtonPress(InputManager::Button button)
{
if (button == InputManager::ACCEPT) {
switch (button) {
case InputManager::ACCEPT:
case InputManager::LEFT:
case InputManager::RIGHT:
toggle();
return true;
} else {
break;
default:
return false;
}
return true;
}
void MenuSettingBool::toggle()