Update clock.gd

This commit is contained in:
Tabby 2026-05-30 17:16:47 +10:00
parent 5b3fb52681
commit 1ca7f885cb

View file

@ -13,7 +13,7 @@ enum Position {
Left, Left,
} }
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree fscor the first time.
func _ready() -> void: func _ready() -> void:
setup_window() setup_window()
@ -28,6 +28,7 @@ func setup_window():
position.y = 0 # set position of bar to be where it should be (moves when we change the window size) position.y = 0 # set position of bar to be where it should be (moves when we change the window size)
if bar_position == Position.Right: if bar_position == Position.Right:
get_window().size = Vector2i(10, screen_size.y) # set window size to be 10 high and screen width wide get_window().size = Vector2i(10, screen_size.y) # set window size to be 10 high and screen width wide
size.x = screen_size.y - taskbar_height
DisplayServer.window_set_position(screen_pos + Vector2i(screen_size.x-10,0)) # set position of window to be just above the taskbar DisplayServer.window_set_position(screen_pos + Vector2i(screen_size.x-10,0)) # set position of window to be just above the taskbar
position.y = 0 # set position of bar to be where it should be (moves when we change the window size) position.y = 0 # set position of bar to be where it should be (moves when we change the window size)
position.x = 10 position.x = 10