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

@ -1,10 +1,29 @@
extends Control
var text
var module_type = Button
var value = 0
func set_stat_text(text):
func init():
set_stat_text()
set_value()
resize()
func resize():
if %vbox.size.x != $".".size.x:
%vbox.size.x = $".".size.x
var sizey = 0
for i in %vbox.get_children():
sizey = sizey + i.size.y
#print(str(sizey))
$".".custom_minimum_size.y = sizey + 16
func set_stat_text():
%stat.text = text
func set_value(module_type,value):
func set_value():
var module = module_type.new()
module.text = str(value)
%value.add_child(module)

View file

@ -10,13 +10,12 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_rxp26")
[node name="vbox" type="VBoxContainer" parent="."]
unique_name_in_owner = true
layout_mode = 0
offset_right = 760.0
offset_right = 56.0
offset_bottom = 51.0
[node name="stat" type="Label" parent="vbox"]