added option to generally set global animations to block clicks
[rocksndiamonds.git] / src / anim.c
index 3c19176fc62aa7b7ad1e5f6926319035fdc5d2eb..e7a308601ddaffe2b8bc353c69ae75f63439e748 100644 (file)
@@ -1146,6 +1146,11 @@ static boolean isClickedPart(struct GlobalAnimPartControlInfo *part,
   return TRUE;
 }
 
   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);
 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);
          }
 
            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");
          // check if this click is defined to trigger other animations
          InitGlobalAnim_Triggered(part, &click_consumed, &any_event_action,
                                   ANIM_EVENT_CLICK, "CLICK");