X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=0a278aa35cb36a97983be9ea1cc7b62934bb3799;hb=5ef9148d1f605af02e872264519eda261a3e88ca;hp=0043a3e9c864c6b516e6183540c9dff26426de0d;hpb=2e7d20bb1b647abaf20051f2bd7a840c946af3aa;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 0043a3e9..0a278aa3 100644 --- a/src/anim.c +++ b/src/anim.c @@ -14,6 +14,8 @@ #include "anim.h" #include "main.h" #include "tools.h" +#include "events.h" +#include "screens.h" /* values for global toon animation definition */ @@ -1450,7 +1452,15 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part) if (anim_event_action == -1) return FALSE; - return DoGadgetAction(anim_event_action); + boolean action_executed = (DoGadgetAction(anim_event_action) || + DoScreenAction(anim_event_action) || + DoKeysymAction(anim_event_action)); + + // check if further actions are allowed to be executed + if (part->control_info.style & STYLE_MULTIPLE_ACTIONS) + return FALSE; + + return action_executed; } static void InitGlobalAnim_Clickable() @@ -1536,7 +1546,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) if (!any_event_action && DoGlobalAnim_EventAction(part)) any_event_action = TRUE; - any_part_clicked = TRUE; + // determine if mouse clicks should be blocked from other animations + any_part_clicked = clickConsumed(part); if (isClickablePart(part, ANIM_EVENT_SELF)) { @@ -1600,7 +1611,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) } } - return anything_clicked; + return (anything_clicked || any_event_action); } static void ResetGlobalAnim_Clickable()