Table of Contents
debug / chapters / chapters.tscn
Diagram
Overridden virtual functions
_ready
func _ready() -> void:
Current.account = full_resource
reload()
dump_json()
$Chapters
func _ready() -> void:
if get_parent() == get_tree().root:
%AnimationPlayer.play('opening')
FocusHelper.set_neighbors_h(%ChaptersContainer.get_children())
for chapter in %ChaptersContainer.get_children():
chapter.focus_entered.connect(_on_chapater_focused.bind(chapter))
load_focused_chapter_to_menu()
_input
$Chapters
func _input(event: InputEvent) -> void:
if not (shown && current_plate == Plate.ROOT): return
if event.is_action_pressed("ui_back"):
go_back()
elif event.is_action_pressed("ui_accept"):
go_foward()
Instantiators
|
Caution
|
No other scene instantiate this scene. |
Scene Tree
-
Chapters Control
-
ReloadButton Button
Signal Connections
$Chapters:[ui_backed]⇒$.
func _on_chapters_ui_backed() -> void:
reload()
$ReloadButton:[pressed]⇒$.
func _on_reload_button_pressed() -> void:
reload()
Properties
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
theme |
|
script |
|
full_resource |
| Name | Value |
|---|---|
unique_name_in_owner |
|
layout_mode |
|
| Name | Value |
|---|---|
layout_mode |
|
offset_left |
|
offset_top |
|
offset_right |
|
offset_bottom |
|
text |
|
chapters.gd
extends Control
@export var full_resource : AccountResource
func _ready() -> void:
Current.account = full_resource
reload()
dump_json()
func reload() -> void:
%Chapters.setup_from_account_resource()
%Chapters.play_opening = true
func dump_json() -> void:
var json = ResourceHelper.json(Current.account)
var res = JSON.parse_string(json)
true
func _on_reload_button_pressed() -> void:
reload()
func _on_chapters_ui_backed() -> void:
reload()