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:
@@ -68,9 +68,10 @@ void MenuSettingRGBA::handleTS() {
|
||||
MenuSetting::handleTS();
|
||||
}
|
||||
|
||||
bool MenuSettingRGBA::manageInput(InputManager::ButtonEvent *event) {
|
||||
bool MenuSettingRGBA::handleButtonPress(InputManager::Button button)
|
||||
{
|
||||
if (edit) {
|
||||
switch(event->button) {
|
||||
switch (button) {
|
||||
case InputManager::LEFT:
|
||||
dec();
|
||||
break;
|
||||
@@ -93,7 +94,7 @@ bool MenuSettingRGBA::manageInput(InputManager::ButtonEvent *event) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch(event->button) {
|
||||
switch (button) {
|
||||
case InputManager::LEFT:
|
||||
leftComponent();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user