feat: base scene working
This commit is contained in:
parent
55901d4fd4
commit
2d7902c31c
3 changed files with 23 additions and 2 deletions
17
scripts/window.gd
Normal file
17
scripts/window.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
extends Node
|
||||
|
||||
func _ready():
|
||||
await get_tree().process_frame
|
||||
move_window_to_bottom_right()
|
||||
|
||||
func move_window_to_bottom_right():
|
||||
var display_index = DisplayServer.window_get_current_screen()
|
||||
|
||||
var work_area_position = DisplayServer.screen_get_usable_rect(display_index).position
|
||||
var work_area_size = DisplayServer.screen_get_usable_rect(display_index).size
|
||||
|
||||
var window_size = DisplayServer.window_get_size()
|
||||
|
||||
var new_position = work_area_position + Vector2i(work_area_size.x - window_size.x, work_area_size.y - window_size.y)
|
||||
|
||||
DisplayServer.window_set_position(new_position)
|
1
scripts/window.gd.uid
Normal file
1
scripts/window.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://3kyt3shje5r1
|
Loading…
Add table
Add a link
Reference in a new issue