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
|
|
@ -9,23 +9,10 @@ var items = []
|
|||
|
||||
var module_scene
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _enter_tree() -> void:
|
||||
config.load("res://02 - Configurations/" + category + ".ini")
|
||||
%scroll.size = $".".size
|
||||
create_book()
|
||||
|
||||
func set_items():
|
||||
for i in %container.get_children():
|
||||
match i.tooltip_text:
|
||||
"Text:long":
|
||||
i.get_child(1).custom_minimum_size = Vector2(%scroll.size.x - 400,192)
|
||||
"Array:int":
|
||||
var count = i.get_child(1).get_child_count()
|
||||
for j in count:
|
||||
i.get_child(1).get_child(j).custom_minimum_size.x = (%scroll.size.x - 96) / count
|
||||
|
||||
|
||||
func create_book():
|
||||
var conf_modules = ConfigFile.new()
|
||||
conf_modules.load("res://02 - Configurations/campaign/modules.ini")
|
||||
|
|
@ -35,7 +22,7 @@ func create_book():
|
|||
module_scene = load("res://01 - Menus/04 - Modules/module.tscn").instantiate()
|
||||
module_scene.size.x = %container.size.x
|
||||
%container.add_child(module_scene)
|
||||
module_scene.set_stat_text(i)
|
||||
module_scene.text = i
|
||||
module_scene.custom_minimum_size = Vector2(256,64)
|
||||
var module = conf_modules.get_value(category,i,"").split(":",true)
|
||||
create_module(module,i)
|
||||
|
|
@ -50,15 +37,18 @@ func create_module(module,i):
|
|||
fixed_array.fill(0)
|
||||
var value = config.get_value(item,i,fixed_array)
|
||||
for j in value:
|
||||
module_scene.set_value(LineEdit,j)
|
||||
module_scene.module_type = LineEdit
|
||||
module_scene.value = j
|
||||
module_scene.init()
|
||||
"list":
|
||||
match module[2]:
|
||||
"rec":
|
||||
pass
|
||||
"multi":
|
||||
for j in config.get_value(item,i,[]):
|
||||
module_scene.set_value(LineEdit,j)
|
||||
|
||||
module_scene.module_type = LineEdit
|
||||
module_scene.value = j
|
||||
module_scene.init()
|
||||
var conf_category = ConfigFile.new()
|
||||
conf_category.load("res://02 - Configurations/" + i + ".ini")
|
||||
var add_stat = OptionButton.new()
|
||||
|
|
@ -87,7 +77,7 @@ func create_module(module,i):
|
|||
stat.wrap_mode = 1
|
||||
stat.clip_contents = false
|
||||
stat.text = config.get_value(item,i,"")
|
||||
set_items()
|
||||
module_scene.init()
|
||||
|
||||
#func rec(i,conf,k):
|
||||
#var conff = "res://02 - Configurations/" + conf + ".ini"
|
||||
|
|
@ -128,3 +118,7 @@ func create_module(module,i):
|
|||
|
||||
func _on_close_button_up() -> void:
|
||||
queue_free()
|
||||
|
||||
func redraw():
|
||||
for i in %container.get_children():
|
||||
i.resize()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ unique_name_in_owner = true
|
|||
layout_mode = 0
|
||||
offset_right = 448.0
|
||||
offset_bottom = 256.0
|
||||
follow_focus = true
|
||||
draw_focus_border = true
|
||||
vertical_scroll_mode = 2
|
||||
|
||||
[node name="container" type="VBoxContainer" parent="scroll"]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue