Table of Contents
src / beginning / chapters / chapter / chapter.tscn
Diagram
Instantiators
Scene Tree
-
Chapter MarginContainer
-
Placeholder TextureRect
-
Sprite2D Sprite2D
-
AnimationPlayer AnimationPlayer
-
Signal Connections
$.:[focus_entered]⇒$.
func _on_focus_entered() -> void:
if focus_animation_skip: focus_animation_skip = false
else: %AnimationPlayer.play("focused")
Animations
Animation_ue4pb
focused
opening
selected
unselected
Properties
| Name | Value |
|---|---|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
offset_right |
|
offset_bottom |
|
focus_mode |
|
theme_override_constants/margin_left |
|
theme_override_constants/margin_top |
|
theme_override_constants/margin_right |
|
theme_override_constants/margin_bottom |
|
script |
| Name | Value |
|---|---|
unique_name_in_owner |
|
custom_minimum_size |
|
layout_mode |
|
| Name | Value |
|---|---|
z_index |
|
z_as_relative |
|
texture_filter |
|
position |
|
texture |
| Name | Value |
|---|---|
unique_name_in_owner |
|
libraries |
|
chapter.gd
extends MarginContainer
@export var play_opening := false : set = set_play_opening
@export var resource : ChapterResource
var focus_animation_skip := false
func set_play_opening(val: bool) -> void:
if val: %AnimationPlayer.play("opening")
func focus_returned() -> void:
focus_animation_skip = true
grab_focus()
focus_animation_skip = false
func selected() -> void:
%AnimationPlayer.play('selected')
func unselected() -> void:
%AnimationPlayer.play('unselected')
func _on_focus_entered() -> void:
if focus_animation_skip: focus_animation_skip = false
else: %AnimationPlayer.play("focused")
