changed order of processing game modes for global animations clicks
[rocksndiamonds.git] / src / anim.c
index 3c58fa917d04072d2e9e1263efe3bccd3fb52a70..7f50b28bc84f902145e61c3f0f3b57174b6d1e13 100644 (file)
@@ -2122,8 +2122,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
   int mode_nr;
   int i;
 
-  // check game modes in reverse draw order (to stop when clicked)
-  for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
+  for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++)
   {
     struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr];
     int anim_nr;
@@ -2139,6 +2138,11 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
       {
        struct GlobalAnimPartControlInfo *part = &anim->part[part_nr];
 
+       // if request dialog is active, only handle pointer-style animations
+       if (game.request_active &&
+           part->control_info.class != get_hash_from_key("pointer"))
+         continue;
+
        if (clicked_event == ANIM_CLICKED_RESET)
        {
          part->clicked = FALSE;