1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 19:03:44 +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) {
toggle();
return true;
} else {
return false;
switch (button) {
case InputManager::ACCEPT:
case InputManager::LEFT:
case InputManager::RIGHT:
toggle();
break;
default:
return false;
}
return true;
}
void MenuSettingBool::toggle()