cooking options, start refactor process

This commit is contained in:
Tabby 2026-05-31 21:28:25 +10:00
parent c083791b9a
commit 2322ae9ec2
6 changed files with 106 additions and 35 deletions

View file

@ -3,6 +3,8 @@ extends Control
var taskbar_height : int = 50
@export var bar: TextureProgressBar
@export var label: Label
@export var options_window: Window
@export var bar_position : Position
@ -36,7 +38,10 @@ func setup_window():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
var days : float = (Time.get_unix_time_from_system() + (60*60*10)) / 86400
var unix : float = Time.get_unix_time_from_system()
var days : float = (Time.get_unix_time_from_system() + (60*60*10)) / 86400 # days since unix
var offset : float = 0.5 # 0 = midday, 12 = midnight
# bar should fill from 11:30pm (11.5) -> 1:30am (13.5)
var current_day : float = fmod(days + offset,1)
@ -57,3 +62,10 @@ func _process(delta: float) -> void:
#DisplayServer.window_set_size(Vector2i(screen_size.x, 10))
#get_window().size = Vector2i(screen_size.x, 10)
pass
func _on_popup_menu_id_pressed(id: int) -> void:
if id == 0:
get_tree().quit()
if id == 1:
options_window.show()