ServiceMenu: afegit so
This commit is contained in:
@@ -139,11 +139,13 @@ Color ServiceMenu::getSelectedColor()
|
||||
void ServiceMenu::setSelectorUp()
|
||||
{
|
||||
selected_ = (selected_ > 0) ? --selected_ : display_options_.size() - 1;
|
||||
Audio::get()->playSound(MENU_SOUND_);
|
||||
}
|
||||
|
||||
void ServiceMenu::setSelectorDown()
|
||||
{
|
||||
selected_ = (selected_ + 1) % display_options_.size();
|
||||
Audio::get()->playSound(MENU_SOUND_);
|
||||
}
|
||||
|
||||
void ServiceMenu::adjustOption(bool adjust_up)
|
||||
@@ -153,6 +155,7 @@ void ServiceMenu::adjustOption(bool adjust_up)
|
||||
display_options_.at(selected_).adjustValue(adjust_up);
|
||||
option_pairs_ = getOptionPairs(current_settings_group_);
|
||||
applySettings(current_settings_group_);
|
||||
Audio::get()->playSound(MENU_SOUND_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,6 +168,7 @@ void ServiceMenu::selectOption()
|
||||
current_settings_group_ = display_options_.at(selected_).target_group;
|
||||
updateMenu(current_settings_group_);
|
||||
selected_ = 0;
|
||||
Audio::get()->playSound(MENU_SOUND_);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -205,6 +209,7 @@ void ServiceMenu::moveBack()
|
||||
selected_ = 0;
|
||||
current_settings_group_ = previous_settings_group_;
|
||||
updateMenu(current_settings_group_);
|
||||
Audio::get()->playSound(MENU_SOUND_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ public:
|
||||
void setSelectorUp();
|
||||
void setSelectorDown();
|
||||
void adjustOption(bool adjust_up);
|
||||
void setSelectorLeft();
|
||||
void selectOption();
|
||||
void moveBack();
|
||||
|
||||
@@ -36,6 +35,8 @@ public:
|
||||
private:
|
||||
using OptionPairs = std::vector<std::pair<std::string, std::string>>;
|
||||
|
||||
static constexpr const char* MENU_SOUND_ = "clock.wav";
|
||||
|
||||
enum class Aspect
|
||||
{
|
||||
ASPECT1, // Fondo opaco y proyecta sombra
|
||||
|
||||
Reference in New Issue
Block a user