Dev 0.1.0
* Ajout des logs et de la radio
This commit is contained in:
@@ -0,0 +1,248 @@
|
||||
[gd_scene format=3 uid="uid://bf5viaiuq62f0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cbmuf1aju21a4" path="res://gui/game/log_screen/scripts/log_screen.gd" id="1_jcg4x"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwbg8ec5hdall" path="res://gui/game/screen/textures/screen.png" id="1_so4ql"]
|
||||
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_jcg4x"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_ik2sy"]
|
||||
[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="5_xy2of"]
|
||||
[ext_resource type="Texture2D" uid="uid://80gifgp26h2g" path="res://common/icons/check.svg" id="6_a27af"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_g4v7s"]
|
||||
font = ExtResource("2_jcg4x")
|
||||
font_size = 35
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jv632"]
|
||||
bg_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g6afv"]
|
||||
bg_color = Color(0.692349, 0.477218, 0.112321, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.694118, 0.478431, 0.113725, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_23ume"]
|
||||
bg_color = Color(0.976471, 0.741176, 0.4, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.975367, 0.740445, 0.401877, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jcg4x"]
|
||||
resource_name = "Appear"
|
||||
length = 0.6
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("LogContainer:modulate:a")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.6),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:visible")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.06666667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("ColorRect:modulate:a")
|
||||
tracks/2/interp = 2
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.06666667, 0.33333334),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_chq3a"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("LogContainer:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:visible")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("ColorRect:modulate:a")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qpt0d"]
|
||||
_data = {
|
||||
&"Appear": SubResource("Animation_jcg4x"),
|
||||
&"RESET": SubResource("Animation_chq3a")
|
||||
}
|
||||
|
||||
[node name="LogScreen" type="CanvasLayer" unique_id=1955577551]
|
||||
layer = 20
|
||||
visible = false
|
||||
script = ExtResource("1_jcg4x")
|
||||
log_text = "[b]Text"
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1143720046]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0.06318334, 0.059500005, 0.17, 0.8627451)
|
||||
|
||||
[node name="LogContainer" type="MarginContainer" parent="." unique_id=520385269]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 100
|
||||
theme_override_constants/margin_top = 80
|
||||
theme_override_constants/margin_right = 100
|
||||
theme_override_constants/margin_bottom = 100
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LogContainer" unique_id=1331957941]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="Screen" type="NinePatchRect" parent="LogContainer/VBoxContainer" unique_id=442630254]
|
||||
z_index = 1
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_so4ql")
|
||||
region_rect = Rect2(0, 0, 491, 520)
|
||||
patch_margin_left = 64
|
||||
patch_margin_top = 58
|
||||
patch_margin_right = 171
|
||||
patch_margin_bottom = 113
|
||||
|
||||
[node name="ScreenContainer" type="MarginContainer" parent="LogContainer/VBoxContainer/Screen" unique_id=676042286]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 55
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 36
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="LogContainer/VBoxContainer/Screen/ScreenContainer" unique_id=754803424]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="LogContainer/VBoxContainer/Screen/ScreenContainer/ScrollContainer" unique_id=1949173849]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LogContainer/VBoxContainer/Screen/ScreenContainer/ScrollContainer/MarginContainer" unique_id=1868794514]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="LogTitleLabel" type="Label" parent="LogContainer/VBoxContainer/Screen/ScreenContainer/ScrollContainer/MarginContainer/VBoxContainer" unique_id=1669010223]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Title"
|
||||
label_settings = SubResource("LabelSettings_g4v7s")
|
||||
|
||||
[node name="LogTextLabel" type="RichTextLabel" parent="LogContainer/VBoxContainer/Screen/ScreenContainer/ScrollContainer/MarginContainer/VBoxContainer" unique_id=1367189559]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/line_separation = 0
|
||||
theme_override_constants/paragraph_separation = 5
|
||||
theme_override_fonts/bold_font = ExtResource("4_ik2sy")
|
||||
theme_override_fonts/bold_italics_font = ExtResource("4_ik2sy")
|
||||
theme_override_font_sizes/normal_font_size = 20
|
||||
theme_override_font_sizes/bold_font_size = 20
|
||||
theme_override_font_sizes/bold_italics_font_size = 20
|
||||
theme_override_font_sizes/italics_font_size = 20
|
||||
theme_override_font_sizes/mono_font_size = 20
|
||||
bbcode_enabled = true
|
||||
text = "[b]Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
Text
|
||||
v"
|
||||
fit_content = true
|
||||
|
||||
[node name="QuitButton" type="Button" parent="LogContainer/VBoxContainer" unique_id=233333756]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("5_xy2of")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_jv632")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_g6afv")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_23ume")
|
||||
text = "OK"
|
||||
icon = ExtResource("6_a27af")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=309966847]
|
||||
unique_name_in_owner = true
|
||||
libraries/ = SubResource("AnimationLibrary_qpt0d")
|
||||
|
||||
[connection signal="pressed" from="LogContainer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
@@ -0,0 +1,33 @@
|
||||
@tool
|
||||
extends CanvasLayer
|
||||
class_name LogScreen
|
||||
|
||||
@export var log_title : String = "Title" : set = set_title
|
||||
@export var log_text : String = "Text" : set = set_text
|
||||
|
||||
signal disappeared
|
||||
|
||||
func _ready():
|
||||
set_title()
|
||||
set_text()
|
||||
|
||||
func appear():
|
||||
%AnimationPlayer.play("Appear")
|
||||
|
||||
func disappear():
|
||||
disappeared.emit()
|
||||
%AnimationPlayer.play_backwards("Appear")
|
||||
|
||||
func set_title(v := log_title):
|
||||
log_title = v
|
||||
if is_node_ready():
|
||||
%LogTitleLabel.text = log_title
|
||||
|
||||
func set_text(v := log_text):
|
||||
log_text = v
|
||||
if is_node_ready():
|
||||
%LogTextLabel.text = log_text
|
||||
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
disappear()
|
||||
@@ -0,0 +1 @@
|
||||
uid://cbmuf1aju21a4
|
||||
Reference in New Issue
Block a user