long overdue update but i'm not sure it works at all lol
This commit is contained in:
parent
e6ab1fb39a
commit
ae1da3a3d6
7 changed files with 51 additions and 27 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue