* Plays the window popup animation. */
| 127 | * Plays the window popup animation. |
| 128 | */ |
| 129 | void Window::popup() |
| 130 | { |
| 131 | if (AreSame(_popupStep, 0.0)) |
| 132 | { |
| 133 | int sound = SDL_GetTicks() % 3; // this is a hack to avoid calling RNG::generate(0, 2) and skewing our seed. |
| 134 | if (soundPopup[sound] != 0) |
| 135 | { |
| 136 | soundPopup[sound]->play(Mix_GroupAvailable(0)); |
| 137 | } |
| 138 | } |
| 139 | if (_popupStep < 1.0) |
| 140 | { |
| 141 | _popupStep += POPUP_SPEED; |
| 142 | } |
| 143 | else |
| 144 | { |
| 145 | if (_screen) |
| 146 | { |
| 147 | _state->toggleScreen(); |
| 148 | } |
| 149 | _state->showAll(); |
| 150 | _popupStep = 1.0; |
| 151 | _timer->stop(); |
| 152 | } |
| 153 | _redraw = true; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Draws the bordered window with a graphic background. |
nothing calls this directly
no test coverage detected