fixed bug with checking for mouse events used by custom elements
authorHolger Schemel <info@artsoft.org>
Sun, 13 Aug 2023 10:41:15 +0000 (12:41 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Aug 2023 10:41:15 +0000 (12:41 +0200)
src/game.c

index 2372aac5f4106df0f5eb1610271cc96df6c1bc9e..c3b2ef7efa08938c50f2d43ddb4091eb2815a70c 100644 (file)
@@ -3505,10 +3505,10 @@ static void InitGameEngine(void)
     {
       int element = EL_CUSTOM_START + i;
 
-      if (HAS_CHANGE_EVENT(element, CE_CLICKED_BY_MOUSE) ||
-         HAS_CHANGE_EVENT(element, CE_PRESSED_BY_MOUSE) ||
-         HAS_CHANGE_EVENT(element, CE_MOUSE_CLICKED_ON_X) ||
-         HAS_CHANGE_EVENT(element, CE_MOUSE_PRESSED_ON_X))
+      if (HAS_ANY_CHANGE_EVENT(element, CE_CLICKED_BY_MOUSE) ||
+         HAS_ANY_CHANGE_EVENT(element, CE_PRESSED_BY_MOUSE) ||
+         HAS_ANY_CHANGE_EVENT(element, CE_MOUSE_CLICKED_ON_X) ||
+         HAS_ANY_CHANGE_EVENT(element, CE_MOUSE_PRESSED_ON_X))
        game.use_mouse_actions = TRUE;
     }
   }