diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2021-03-13 09:38:05 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2021-03-13 15:34:50 -0500 |
commit | 2581f03c00f5a14f49081d82eb8e1a31c31aae88 (patch) | |
tree | aa7fd5864204408ff3c189b7b2351b6619d6f0cb /src/menu_system.cpp | |
parent | f839e07d4d2e94070129129c669072145235cf4f (diff) | |
download | tanetane-2581f03c00f5a14f49081d82eb8e1a31c31aae88.tar.gz tanetane-2581f03c00f5a14f49081d82eb8e1a31c31aae88.tar.bz2 tanetane-2581f03c00f5a14f49081d82eb8e1a31c31aae88.zip |
Player can move cursor on pause menu
#7
Diffstat (limited to 'src/menu_system.cpp')
-rw-r--r-- | src/menu_system.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/menu_system.cpp b/src/menu_system.cpp index acbfd76..d3a310e 100644 --- a/src/menu_system.cpp +++ b/src/menu_system.cpp | |||
@@ -49,3 +49,23 @@ void MenuSystem::closePauseMenu() { | |||
49 | pauseAnimation_.start(125, 0.0); | 49 | pauseAnimation_.start(125, 0.0); |
50 | openState_ = OpenState::Animating; | 50 | openState_ = OpenState::Animating; |
51 | } | 51 | } |
52 | |||
53 | void MenuSystem::pressedUp() { | ||
54 | if (cursor_ > 0) { | ||
55 | cursor_--; | ||
56 | cursorBob_ = 0; | ||
57 | cursorBobDown_ = true; | ||
58 | |||
59 | game_.getMixer().playSound("../res/sfx/vertical_menu.wav"); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | void MenuSystem::pressedDown() { | ||
64 | if (cursor_ < menu_.size() - 1) { | ||
65 | cursor_++; | ||
66 | cursorBob_ = 0; | ||
67 | cursorBobDown_ = true; | ||
68 | |||
69 | game_.getMixer().playSound("../res/sfx/vertical_menu.wav"); | ||
70 | } | ||
71 | } | ||