src / beginning / screen / screen.tscn
Diagram
Overridden virtual functions
_ready
func _ready() -> void:
SceneHelper.preload_scene(MenuScenePath)
_input
func _input(_event: InputEvent) -> void:
if Input.is_action_just_pressed("ui_accept"):
match current_animation:
'show_title': transit('hide_title')
'hide_title': pass
_: transit('show_title')
Instantiators
|
Caution
|
No other scene instantiate this scene. |
Scene Tree
-
Screen Control
-
Background ColorRect
-
Author Control
-
Container VBoxContainer
-
NameContainer MarginContainer
-
Name Label
-
-
Presents Label
-
-
-
Title Control
-
TitleContainer CenterContainer
-
TitleLogo Sprite2D
-
-
ButtonContainer MarginContainer
-
JoyAButton Sprite2D
-
-
-
SubViewportContainer SubViewportContainer
-
SubViewport SubViewport
-
-
Blinder ColorRect
-
AnimationPlayer AnimationPlayer
-
AnimationTree AnimationTree
-
Signal Connections
func _on_animation_tree_animation_finished(anim_name: StringName) -> void:
if anim_name == 'hide_title':
SceneHelper.transit(self, MenuScenePath)
func _on_animation_tree_animation_started(anim_name: StringName) -> void:
current_animation = anim_name
Animations
Animation_g86x5
hide_title
opening (autoplay)
show_title
Properties
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
script |
|
MenuScenePath |
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
color |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
visible |
|
modulate |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_left |
|
anchor_top |
|
anchor_right |
|
anchor_bottom |
|
offset_left |
|
offset_top |
|
offset_right |
|
offset_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
layout_mode |
|
theme_override_constants/margin_bottom |
|
| Name | Value |
|---|---|
layout_mode |
|
theme_override_fonts/font |
|
theme_override_font_sizes/font_size |
|
text |
|
horizontal_alignment |
|
| Name | Value |
|---|---|
layout_mode |
|
theme_override_colors/font_color |
|
theme_override_font_sizes/font_size |
|
text |
|
horizontal_alignment |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
position |
|
texture |
|
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_left |
|
anchor_top |
|
anchor_right |
|
anchor_bottom |
|
offset_left |
|
offset_top |
|
grow_horizontal |
|
grow_vertical |
|
theme_override_constants/margin_right |
|
theme_override_constants/margin_bottom |
|
| Name | Value |
|---|---|
texture |
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
transparent_bg |
|
handle_input_locally |
|
size |
|
render_target_update_mode |
|
| Name | Value |
|---|---|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
color |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
libraries |
|
autoplay |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
root_node |
|
tree_root |
|
anim_player |
|
screen.gd
extends Control
@export_file("*.tscn") var MenuScenePath : String
var current_animation : StringName
func _ready() -> void:
SceneHelper.preload_scene(MenuScenePath)
func _input(_event: InputEvent) -> void:
if Input.is_action_just_pressed("ui_accept"):
match current_animation:
'show_title': transit('hide_title')
'hide_title': pass
_: transit('show_title')
func transit(animation: String):
%AnimationTree.get('parameters/playback').start(animation)
func _on_animation_tree_animation_started(anim_name: StringName) -> void:
current_animation = anim_name
func _on_animation_tree_animation_finished(anim_name: StringName) -> void:
if anim_name == 'hide_title':
SceneHelper.transit(self, MenuScenePath)