From: Holger Schemel Date: Thu, 4 Jan 2024 13:36:48 +0000 (+0100) Subject: re-added explicitly setting draw order for pointer-style animations X-Git-Tag: 4.3.8.2~4 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d3169996a584ab249a078dd71a62111f60c7683c;p=rocksndiamonds.git re-added explicitly setting draw order for pointer-style animations Even though pointer-style animations are handled specially when being drawn (on top of all other global animations), they are not handled specially when being checked for clicks. Therefore, forcing a high draw order for pointer-style animations is still required (as the draw order is not only used for drawing, but also for the order of checking animations for mouse clicks). This reverts commit d1a0dcb3. --- diff --git a/src/anim.c b/src/anim.c index b651ac6f..1389dc4e 100644 --- a/src/anim.c +++ b/src/anim.c @@ -598,10 +598,15 @@ static void InitGlobalAnimControls(void) anim->has_base = TRUE; } - // force pointer-style animations to pass-through clicks - if (part->control_info.class == get_hash_from_key("pointer") && - part->control_info.style == STYLE_DEFAULT) + // apply special settings to pointer-style animations + if (part->control_info.class == get_hash_from_key("pointer")) + { + // force pointer-style animations to be checked for clicks first + part->control_info.draw_order = 1000000; + + // force pointer-style animations to pass-through clicks part->control_info.style |= STYLE_PASSTHROUGH; + } } if (anim->num_parts > 0 || anim->has_base)