removed explicitly setting draw order for pointer-style animations
authorHolger Schemel <info@artsoft.org>
Tue, 12 Dec 2023 13:12:40 +0000 (14:12 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 12 Dec 2023 13:12:40 +0000 (14:12 +0100)
As pointer-style animations are handled specially anyway (always drawn
on top of all other global animations), setting the draw order is not
required anymore.

src/anim.c

index dcd66e330f2862decf9856ccabd6c3ba97860a8b..a23d6e581de1c2f23c1b780d91e1f771c92f1247 100644 (file)
@@ -602,19 +602,10 @@ static void InitGlobalAnimControls(void)
          anim->has_base = TRUE;
        }
 
-       // apply special settings for pointer-style animations
-       if (part->control_info.class == get_hash_from_key("pointer"))
-       {
-         // force animation to be on top (must set anim and part control)
-         if (anim->control_info.draw_order == 0)
-           anim->control_info.draw_order = 1000000;
-         if (part->control_info.draw_order == 0)
-           part->control_info.draw_order = 1000000;
-
-         // force animation to pass-through clicks (must set part control)
-         if (part->control_info.style == STYLE_DEFAULT)
-           part->control_info.style |= STYLE_PASSTHROUGH;
-       }
+       // force pointer-style animations to pass-through clicks
+       if (part->control_info.class == get_hash_from_key("pointer") &&
+           part->control_info.style == STYLE_DEFAULT)
+         part->control_info.style |= STYLE_PASSTHROUGH;
       }
 
       if (anim->num_parts > 0 || anim->has_base)