add todos app
This commit is contained in:
parent
25a62f9c43
commit
dfff9d383c
28 changed files with 648 additions and 1 deletions
21
todos/main.gd
Normal file
21
todos/main.gd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
extends Control
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
const margin_value = 25
|
||||
$MarginContainer.add_theme_constant_override("margin_top", margin_value)
|
||||
$MarginContainer.add_theme_constant_override("margin_left", margin_value)
|
||||
$MarginContainer.add_theme_constant_override("margin_bottom", margin_value)
|
||||
$MarginContainer.add_theme_constant_override("margin_right", margin_value)
|
||||
|
||||
Global.state_changed.connect(_update_state)
|
||||
if Global.current_state == Global.State.UNLOADED:
|
||||
pass
|
||||
elif Global.current_state == Global.State.LOADED:
|
||||
$MarginContainer.remove_child($MarginContainer/Unloaded)
|
||||
var s = ResourceLoader.load("res://loaded.tscn")
|
||||
var current_scene = s.instantiate()
|
||||
$MarginContainer.add_child(current_scene)
|
||||
|
||||
func _update_state(_old: Global.State, _new: Global.State):
|
||||
print("updated state")
|
||||
Loading…
Add table
Add a link
Reference in a new issue