REVIEWED: Automation events mouse wheel #4263

This commit is contained in:
Ray
2024-08-20 19:13:18 +02:00
parent 7fab03c0b4
commit 039df36f4b
2 changed files with 40 additions and 37 deletions

View File

@@ -669,7 +669,6 @@ void InitWindow(int width, int height, const char *title)
#endif
#endif
CORE.Time.frameCounter = 0;
CORE.Window.shouldClose = false;
@@ -2707,8 +2706,8 @@ void PlayAutomationEvent(AutomationEvent event)
} break;
case INPUT_MOUSE_WHEEL_MOTION: // param[0]: x delta, param[1]: y delta
{
CORE.Input.Mouse.currentWheelMove.x = (float)event.params[0]; break;
CORE.Input.Mouse.currentWheelMove.y = (float)event.params[1]; break;
CORE.Input.Mouse.currentWheelMove.x = (float)event.params[0];
CORE.Input.Mouse.currentWheelMove.y = (float)event.params[1];
} break;
case INPUT_TOUCH_UP: CORE.Input.Touch.currentTouchState[event.params[0]] = false; break; // param[0]: id
case INPUT_TOUCH_DOWN: CORE.Input.Touch.currentTouchState[event.params[0]] = true; break; // param[0]: id
@@ -2745,6 +2744,8 @@ void PlayAutomationEvent(AutomationEvent event)
case ACTION_SETTARGETFPS: SetTargetFPS(event.params[0]); break;
default: break;
}
TRACELOG(LOG_INFO, "AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i", event.frame, event.type, event.params[0], event.params[1], event.params[2]);
}
#endif
}