derkork / godot-statecharts

A state charts extension for Godot 4
MIT License
797 stars 43 forks source link

Event popup misplaced #86

Closed cyber-mantis closed 7 months ago

cyber-mantis commented 7 months ago

When using multiple monitors and clicking the dropdown button to select events, the popup appeared on the other side of the screen. I managed to fix it by adding the window position to the popup position:

var popup_pos = gt.end - Vector2(ms, 0) + Vector2(DisplayServer.window_get_position())

derkork commented 7 months ago

Thanks a lot for reporting this and taking the time to provide a fix with the report, much appreciated! I added this to the code base and it at least doesn't seem to break anything but for the lack of multiple monitors I cannot really verify this fix. In any case I'll add it to the next release. Thanks again!