mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
SettingsDialog: simplify code using InputManager::waitForPressedButton().
Replaced MenuSetting::manageInput() by handleButtonPress(), because we will only pass pressed buttons to it, not the entire input event.
This commit is contained in:
@@ -105,13 +105,9 @@ bool SettingsDialog::exec() {
|
||||
gmenu2x->s->flip();
|
||||
voices[sel]->handleTS();
|
||||
|
||||
InputManager::ButtonEvent event;
|
||||
do {
|
||||
inputMgr.waitForEvent(&event);
|
||||
} while (event.state != InputManager::PRESSED);
|
||||
|
||||
if (voices[sel]->manageInput(&event) == false) {
|
||||
switch (event.button) {
|
||||
InputManager::Button button = inputMgr.waitForPressedButton();
|
||||
if (!voices[sel]->handleButtonPress(button)) {
|
||||
switch (button) {
|
||||
case InputManager::SETTINGS:
|
||||
close = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user