From: Holger Schemel Date: Mon, 22 Apr 2019 08:41:25 +0000 (+0200) Subject: fixed handling global animation click events X-Git-Tag: 4.1.3.0~11 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=4be294f9d518dcacd0a54dc718e35c15c7c75c33;hp=4be294f9d518dcacd0a54dc718e35c15c7c75c33 fixed handling global animation click events When handling global animation click events, it may happen that more than one click event occurs within the same game frame (especially when doing a click by tapping on a touch pad or screen, which may lead to a "press" and "release" event within the same game frame). Before, only the first click event was correctly handled (as the event was not directly handled, but stored and processed later in the screen redraw phase, when global animations are handled), while all following events (that occurred within the same game frame) are usually lost if they should be processed for the next part of the animation (which is not active before the first event was processed). Example: Global animation for a button that will be shown as "pressed" after handling a "click" event and that will be shown as "unpressed" again after handling a "release" event. If the "click" and "release" events occur within the same game frame, the global animation still is in the "unpressed" animation part when the "release" event is handled, so it will be ignored and the button will stay in the "pressed" state. To fix this buggy behavior, click (and release) events are now handled immediately after they occur (instead of processing them in the screen redraw phase), which results in changing the animation's active part directly after the event occured, so the next event can be processed by the next part of the animation. ---