X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=dec9d18ee61d49cf1667e61298111e2c9f9060d0;hb=35487ddb762f2f8a424a713dc00bf7a04e9a40e3;hp=3c19176fc62aa7b7ad1e5f6926319035fdc5d2eb;hpb=506db99d238d96b14932fb48c6d101f7f5d67377;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 3c19176f..dec9d18e 100644 --- a/src/anim.c +++ b/src/anim.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // 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");