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

InputManager: C++-style type definitions.

There is no need to typedef enums and structs in C++.
Put types defined by InputManager inside the class namespace.
Changed type names to CamelCase.
This commit is contained in:
Maarten ter Huurne
2011-10-23 08:57:52 +02:00
parent c6db9ff21b
commit 315bf0a180
24 changed files with 265 additions and 321 deletions

View File

@@ -105,17 +105,17 @@ bool SettingsDialog::exec() {
gmenu2x->s->flip();
voices[sel]->handleTS();
bevent_t event;
do {
inputMgr.waitForEvent(&event);
} while (event.state != PRESSED);
InputManager::ButtonEvent event;
do {
inputMgr.waitForEvent(&event);
} while (event.state != InputManager::PRESSED);
if (voices[sel]->manageInput(&event) == false) {
switch (event.button) {
case SETTINGS:
case InputManager::SETTINGS:
close = true;
break;
case UP:
case InputManager::UP:
if (sel==0)
sel = voices.size()-1;
else
@@ -123,7 +123,7 @@ bool SettingsDialog::exec() {
gmenu2x->setInputSpeed();
voices[sel]->adjustInput();
break;
case DOWN:
case InputManager::DOWN:
sel += 1;
if (sel>=voices.size()) sel = 0;
gmenu2x->setInputSpeed();