summary refs log tree commit diff stats
path: root/src/menu_system.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 14:58:50 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 15:34:50 -0500
commit02c991e5ea1ec93c8245157a3f174b547774a7e3 (patch)
treea975df9e5bfa51a7910a4e6e3cccaadd991a0ec1 /src/menu_system.cpp
parent255bb9ce381eeb0989a5b8efb3d41c88a0f2c642 (diff)
downloadtanetane-02c991e5ea1ec93c8245157a3f174b547774a7e3.tar.gz
tanetane-02c991e5ea1ec93c8245157a3f174b547774a7e3.tar.bz2
tanetane-02c991e5ea1ec93c8245157a3f174b547774a7e3.zip
Sound volume is controllable from settings menu
#7
Diffstat (limited to 'src/menu_system.cpp')
-rw-r--r--src/menu_system.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/menu_system.cpp b/src/menu_system.cpp index c099afe..a430009 100644 --- a/src/menu_system.cpp +++ b/src/menu_system.cpp
@@ -65,8 +65,11 @@ void MenuSystem::openPauseMenu() {
65 game_.getMixer().setMusicVolume(menuItem.value); 65 game_.getMixer().setMusicVolume(menuItem.value);
66 }), 66 }),
67 MenuBuilder().Slider("Sound Volume: ") 67 MenuBuilder().Slider("Sound Volume: ")
68 .InitialValue(10) 68 .InitialValue(game_.getMixer().getSoundVolume())
69 .MaxValue(10), 69 .MaxValue(10)
70 .SelectionChangedFunction([this] (MenuItem& menuItem) {
71 game_.getMixer().setSoundVolume(menuItem.value);
72 }),
70 MenuBuilder().Command("Back") 73 MenuBuilder().Command("Back")
71 .ActivationFunction([this] (Game& game) { 74 .ActivationFunction([this] (Game& game) {
72 closePauseMenu(); 75 closePauseMenu();