X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Fanim.c;h=b6ee0b933cb1b12307578c73fe3b2b18eb705825;hb=9274b9677563b997d6521b6c2c700ce30847cdfe;hp=a38a1c3dca867fd5bc10cb0841aea26829c3dc87;hpb=a97d51220232bd25cc77bddb2c655fb521ccf519;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index a38a1c3d..b6ee0b93 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1450,8 +1450,14 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part) if (anim_event_action == -1) return FALSE; - return (DoGadgetAction(anim_event_action) || - DoScreenAction(anim_event_action)); + boolean action_executed = (DoGadgetAction(anim_event_action) || + DoScreenAction(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() @@ -1537,7 +1543,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)) { @@ -1601,7 +1608,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) } } - return anything_clicked; + return (anything_clicked || any_event_action); } static void ResetGlobalAnim_Clickable()