mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 11:56:16 +02:00
MenuSettingBool: Support toggling of boolean settings using left/right.
This commit is contained in:
parent
a38c283e17
commit
641c989934
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user