diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2021-03-13 09:29:47 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2021-03-13 15:34:50 -0500 |
| commit | f839e07d4d2e94070129129c669072145235cf4f (patch) | |
| tree | 3b1cd73c00d1ea968646dd649199d54a25964d8e /src/menu_system.cpp | |
| parent | 42495836c9ebe1c3914540043d2338eebd85dbab (diff) | |
| download | tanetane-f839e07d4d2e94070129129c669072145235cf4f.tar.gz tanetane-f839e07d4d2e94070129129c669072145235cf4f.tar.bz2 tanetane-f839e07d4d2e94070129129c669072145235cf4f.zip | |
Added cursor to pause menu
#7
Diffstat (limited to 'src/menu_system.cpp')
| -rw-r--r-- | src/menu_system.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
| diff --git a/src/menu_system.cpp b/src/menu_system.cpp index 00c4849..acbfd76 100644 --- a/src/menu_system.cpp +++ b/src/menu_system.cpp | |||
| @@ -12,6 +12,23 @@ void MenuSystem::tick(double dt) { | |||
| 12 | } else if (pauseAnimation_.getProgress() == 1.0) { | 12 | } else if (pauseAnimation_.getProgress() == 1.0) { |
| 13 | openState_ = OpenState::Open; | 13 | openState_ = OpenState::Open; |
| 14 | } | 14 | } |
| 15 | } else if (openState_ == OpenState::Open) { | ||
| 16 | cursorBobTimer_.accumulate(dt); | ||
| 17 | while (cursorBobTimer_.step()) { | ||
| 18 | if (cursorBobDown_) { | ||
| 19 | cursorBob_++; | ||
| 20 | |||
| 21 | if (cursorBob_ >= 4) { | ||
| 22 | cursorBobDown_ = false; | ||
| 23 | } | ||
| 24 | } else { | ||
| 25 | cursorBob_--; | ||
| 26 | |||
| 27 | if (cursorBob_ <= 0) { | ||
| 28 | cursorBobDown_ = true; | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
| 15 | } | 32 | } |
| 16 | } | 33 | } |
| 17 | 34 | ||
