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

@@ -68,39 +68,39 @@ void MenuSettingRGBA::handleTS() {
MenuSetting::handleTS();
}
bool MenuSettingRGBA::manageInput(bevent_t *event) {
bool MenuSettingRGBA::manageInput(InputManager::ButtonEvent *event) {
if (edit) {
switch(event->button) {
case LEFT:
dec();
break;
case RIGHT:
inc();
break;
case ALTLEFT:
update_value(-10);
break;
case ALTRIGHT:
update_value(10);
break;
case ACCEPT:
case UP:
case DOWN:
edit = false;
updateButtonBox();
break;
default:
return false;
}
switch(event->button) {
case InputManager::LEFT:
dec();
break;
case InputManager::RIGHT:
inc();
break;
case InputManager::ALTLEFT:
update_value(-10);
break;
case InputManager::ALTRIGHT:
update_value(10);
break;
case InputManager::ACCEPT:
case InputManager::UP:
case InputManager::DOWN:
edit = false;
updateButtonBox();
break;
default:
return false;
}
} else {
switch(event->button) {
case LEFT:
case InputManager::LEFT:
leftComponent();
break;
case RIGHT:
case InputManager::RIGHT:
rightComponent();
break;
case ACCEPT:
case InputManager::ACCEPT:
edit = true;
updateButtonBox();
break;