Files
settled-reach/client/addons/gdUnit4/src/core/GodotVersionFixures.gd
T
jpmschweitzerandClaude Opus 4.6 61e0762a84 chore(client): add gdUnit4 test framework addon
Vendor gdUnit4 for Godot 4 client testing (D-030).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:52:00 +01:00

12 lines
545 B
GDScript

## This service class contains helpers to wrap Godot functions and handle them carefully depending on the current Godot version
class_name GodotVersionFixures
extends RefCounted
# handle global_position fixed by https://github.com/godotengine/godot/pull/88473
static func set_event_global_position(event: InputEventMouseMotion, global_position: Vector2) -> void:
if Engine.get_version_info().hex >= 0x40202 or Engine.get_version_info().hex == 0x40104:
event.global_position = event.position
else:
event.global_position = global_position