mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Handle menu-related buttons inside Menu class
This commit is contained in:
28
src/menu.cpp
28
src/menu.cpp
@@ -207,6 +207,34 @@ void Menu::paint(Surface &s) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Menu::handleButtonPress(InputManager::Button button) {
|
||||
switch (button) {
|
||||
case InputManager::ACCEPT:
|
||||
if (selLink() != NULL) selLink()->run();
|
||||
return true;
|
||||
case InputManager::UP:
|
||||
linkUp();
|
||||
return true;
|
||||
case InputManager::DOWN:
|
||||
linkDown();
|
||||
return true;
|
||||
case InputManager::LEFT:
|
||||
linkLeft();
|
||||
return true;
|
||||
case InputManager::RIGHT:
|
||||
linkRight();
|
||||
return true;
|
||||
case InputManager::ALTLEFT:
|
||||
decSectionIndex();
|
||||
return true;
|
||||
case InputManager::ALTRIGHT:
|
||||
incSectionIndex();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void Menu::handleTS() {
|
||||
ConfIntHash &skinConfInt = gmenu2x->skinConfInt;
|
||||
const int topBarHeight = skinConfInt["topBarHeight"];
|
||||
|
||||
Reference in New Issue
Block a user