diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-21 10:40:31 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-21 10:40:31 -0400 |
commit | 5e37c9a7034edfc4eec4d4ed15224b0f63c736af (patch) | |
tree | faf00bd8cbd75cecec6b17bfca51d7a4cb0b3d18 /src/sign.cpp | |
parent | 38e6691fd3b713fe72cb955214c59cdee8b435b4 (diff) | |
download | ether-5e37c9a7034edfc4eec4d4ed15224b0f63c736af.tar.gz ether-5e37c9a7034edfc4eec4d4ed15224b0f63c736af.tar.bz2 ether-5e37c9a7034edfc4eec4d4ed15224b0f63c736af.zip |
fancier textboxes
Diffstat (limited to 'src/sign.cpp')
-rw-r--r-- | src/sign.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/sign.cpp b/src/sign.cpp index b9299d6..e488108 100644 --- a/src/sign.cpp +++ b/src/sign.cpp | |||
@@ -92,6 +92,8 @@ void Sign::update(size_t dt, Game& game) { | |||
92 | } | 92 | } |
93 | 93 | ||
94 | if (fullyRevealed) { | 94 | if (fullyRevealed) { |
95 | showNextArrow = false; | ||
96 | |||
95 | if (linesToShow.back().pause) { | 97 | if (linesToShow.back().pause) { |
96 | linesToShow.back().pause = false; | 98 | linesToShow.back().pause = false; |
97 | // Play a sound | 99 | // Play a sound |
@@ -126,6 +128,27 @@ void Sign::update(size_t dt, Game& game) { | |||
126 | } | 128 | } |
127 | linesToShow.push_back(lines.front()); | 129 | linesToShow.push_back(lines.front()); |
128 | lines.pop_front(); | 130 | lines.pop_front(); |
131 | } else { | ||
132 | showNextArrow = true; | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | |||
137 | if (showNextArrow) { | ||
138 | nextArrowBobTimer_.accumulate(dt); | ||
139 | while (nextArrowBobTimer_.step()) { | ||
140 | if (nextArrowBobDown_) { | ||
141 | nextArrowBobPos++; | ||
142 | |||
143 | if (nextArrowBobPos >= 4) { | ||
144 | nextArrowBobDown_ = false; | ||
145 | } | ||
146 | } else { | ||
147 | nextArrowBobPos--; | ||
148 | |||
149 | if (nextArrowBobPos <= 0) { | ||
150 | nextArrowBobDown_ = true; | ||
151 | } | ||
129 | } | 152 | } |
130 | } | 153 | } |
131 | } | 154 | } |