1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Rewrite of how the events are handled by the menusetting* objects.

This commit is contained in:
Ayla
2011-09-15 20:20:35 +02:00
parent fdee206d93
commit 7f2c7db8e2
12 changed files with 60 additions and 77 deletions

View File

@@ -64,10 +64,13 @@ void MenuSettingBool::draw(int y)
gmenu2x->s->write( gmenu2x->font, strvalue, 155, y, ASFont::HAlignLeft, ASFont::VAlignTop );
}
void MenuSettingBool::manageInput(bevent_t *event)
bool MenuSettingBool::manageInput(bevent_t *event)
{
if (event->button == ACCEPT && event->state == PRESSED)
toggle();
if (event->button == ACCEPT && event->state == PRESSED) {
toggle();
return true;
}
return false;
}
void MenuSettingBool::toggle()