feat: added clock
This commit is contained in:
parent
c422a83f59
commit
c5dcf3d9d1
9 changed files with 103 additions and 1 deletions
15
scenes/clock/clock_window.gd
Normal file
15
scenes/clock/clock_window.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
extends Window
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
move_window_to_top_right()
|
||||
|
||||
|
||||
func move_window_to_top_right():
|
||||
var display_index: int = DisplayServer.window_get_current_screen()
|
||||
|
||||
var work_area_position: Vector2i = DisplayServer.screen_get_usable_rect(display_index).position
|
||||
var work_area_size: Vector2i = DisplayServer.screen_get_usable_rect(display_index).size
|
||||
|
||||
var offset: int = 30
|
||||
position = work_area_position + Vector2i(work_area_size.x - size.x - offset, offset)
|
Loading…
Add table
Add a link
Reference in a new issue