X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=e7a308601ddaffe2b8bc353c69ae75f63439e748;hb=60905b7f08ae9a2c88299731a8ce490c31d8b6e0;hp=3c19176fc62aa7b7ad1e5f6926319035fdc5d2eb;hpb=506db99d238d96b14932fb48c6d101f7f5d67377;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 3c19176f..e7a30860 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1146,6 +1146,11 @@ static boolean isClickedPart(struct GlobalAnimPartControlInfo *part, return TRUE; } +static boolean clickBlocked(struct GlobalAnimPartControlInfo *part) +{ + return (part->control_info.style & STYLE_BLOCK ? TRUE : FALSE); +} + static boolean clickConsumed(struct GlobalAnimPartControlInfo *part) { return (part->control_info.style & STYLE_PASSTHROUGH ? FALSE : TRUE); @@ -1874,6 +1879,9 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) click_consumed |= clickConsumed(part); } + // determine if mouse clicks should be blocked by this animation + click_consumed |= clickBlocked(part); + // check if this click is defined to trigger other animations InitGlobalAnim_Triggered(part, &click_consumed, &any_event_action, ANIM_EVENT_CLICK, "CLICK");