-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I'd propose to change a few lines of code, change the method: "func _context_update(window : Window, control : Control) -> void:" in "plugins/script_spliter/core/builder.gd" to:
func _context_update(window : Window, control : Control) -> void:
if is_instance_valid(window) and is_instance_valid(control):
var mouse_pos: Vector2 = DisplayServer.mouse_get_position()
var screen_rect: Rect2 = DisplayServer.screen_get_usable_rect(window.current_screen)
var gvp: Vector2 = control.get_screen_position() + control.get_local_mouse_position()
gvp.y = min(gvp.y, screen_rect.position.y + screen_rect.size.y - window.size.y + 16.0)
gvp.x = min(gvp.x, screen_rect.position.x + screen_rect.size.x - window.size.x + 16.0)
window.set_deferred("position", gvp)with this the context menu show up in the right screen in multi-monitor setup.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request