+ if (!clicked)
+ {
+ part->clicked = FALSE;
+
+ continue;
+ }
+
+ if (!part->clickable)
+ continue;
+
+ if (part->state != ANIM_STATE_RUNNING)
+ continue;
+
+ // always handle "any" click events (clicking anywhere on screen) ...
+ if (isClickablePart(part, ANIM_EVENT_ANY))
+ {
+ part->clicked = TRUE;
+ anything_clicked = clickConsumed(part);
+ }
+
+ // ... but only handle the first (topmost) clickable animation
+ if (any_part_clicked)
+ continue;
+
+ if (isClickedPart(part, mx, my, clicked))
+ {
+#if 0
+ printf("::: %d.%d CLICKED [%d]\n", anim_nr, part_nr,
+ part->control_info.anim_event_action);
+#endif
+
+ // after executing event action, ignore any further actions
+ if (!any_event_action && DoGlobalAnim_EventAction(part))
+ any_event_action = TRUE;
+
+ // determine if mouse clicks should be blocked from other animations
+ any_part_clicked = clickConsumed(part);
+
+ if (isClickablePart(part, ANIM_EVENT_SELF))
+ {
+ part->clicked = TRUE;
+ anything_clicked = clickConsumed(part);
+ }
+
+ // check if this click is defined to trigger other animations
+ int gic_anim_nr = part->old_anim_nr + 1; // X as in "anim_X"
+ int gic_part_nr = part->old_nr + 1; // Y as in "part_Y"
+ int mask = gic_anim_nr << ANIM_EVENT_ANIM_BIT;
+
+ if (!part->is_base)
+ mask |= gic_part_nr << ANIM_EVENT_PART_BIT;
+
+ int anim2_nr;
+
+ for (anim2_nr = 0; anim2_nr < ctrl->num_anims; anim2_nr++)
+ {
+ struct GlobalAnimMainControlInfo *anim2 = &ctrl->anim[anim2_nr];
+ int part2_nr;