mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-30 00:05:21 +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)
|
bool MenuSettingBool::handleButtonPress(InputManager::Button button)
|
||||||
{
|
{
|
||||||
if (button == InputManager::ACCEPT) {
|
switch (button) {
|
||||||
toggle();
|
case InputManager::ACCEPT:
|
||||||
return true;
|
case InputManager::LEFT:
|
||||||
} else {
|
case InputManager::RIGHT:
|
||||||
return false;
|
toggle();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuSettingBool::toggle()
|
void MenuSettingBool::toggle()
|
||||||
|
Loading…
Reference in New Issue
Block a user