X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fanim.c;fp=src%2Fanim.c;h=e7a308601ddaffe2b8bc353c69ae75f63439e748;hp=3c19176fc62aa7b7ad1e5f6926319035fdc5d2eb;hb=411dffb336bdcdd487225bc78d82bb3bafa3016e;hpb=bbea8429d449be9badea09afeb8ab7b4e4a42877 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");