long overdue update but i'm not sure it works at all lol

This commit is contained in:
martyTF 2026-01-09 20:48:30 +01:00
parent e6ab1fb39a
commit ae1da3a3d6
7 changed files with 51 additions and 27 deletions

View file

@ -32,8 +32,10 @@ func _enter_tree() -> void:
pixel_x = get_viewport_rect().size[0] / ui_scale
pixel_y = get_viewport_rect().size[1] / ui_scale
module_fit_window()
#call_deferred("module_fit_window")
set_bar_items()
await get_tree().create_timer(0.0001).timeout
%size_right.position.x = %ui_bar.position.x + %ui_bar.size.x - 32
module.redraw()
func _process(_delta: float) -> void:
if pixel_x != get_viewport_rect().size[0] or pixel_y != get_viewport_rect().size[1]:
@ -50,9 +52,11 @@ func module_fit_window():
if get_viewport_rect().size[0] > get_viewport_rect().size[1]:
module.get_child(0).size = %ui_background.size - Vector2(64,64)
module.get_child(0).position = %ui_background.position + Vector2(32,32)
for i in [%size_right,%size_left,%size_bottom]:
i.visible = true
else:
position = Vector2(0,0)
%ui_background.size = get_viewport_rect().size
%window.position = Vector2(0,0)
%ui_background.size = get_viewport_rect().size / ui_scale
module.get_child(0).size = %ui_background.size - Vector2(64,64)
module.get_child(0).position = Vector2(32,96)
%ui_bar.size.x = %ui_background.size.x
@ -61,8 +65,8 @@ func module_fit_window():
%minimize.position.x = %close.position.x - 92
for i in [%size_right,%size_left,%size_bottom]:
i.visible = false
module.set_items()
move_child(module,1)
module.redraw()
func _on_ui_bar_gui_input(ev: InputEvent) -> void:
if ev is InputEventMouseButton: