fix: Huge cleanup (#420)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
@@ -1,5 +0,0 @@
|
||||
extends Label
|
||||
|
||||
func _ready():
|
||||
var scale = get_parent().get_scale()
|
||||
self.set_scale(Vector2(1/scale.x, 1/scale.y)) #2D
|
||||
@@ -1,18 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi_font.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/characters/tools/debug_label.gd" type="Script" id=2]
|
||||
|
||||
[node name="debug" type="Label"]
|
||||
margin_left = 46.8283
|
||||
margin_top = -26.1921
|
||||
margin_right = 58.8283
|
||||
margin_bottom = -2.1921
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "0"
|
||||
align = 1
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false,
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
14
game/dialog_avatars/player.tres
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_resource type="AnimatedTexture" load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://game/dialog_avatars/mark_talk_down_right_1.png" type="Texture" id=1]
|
||||
[ext_resource path="res://game/dialog_avatars/mark_talk_down_right_3.png" type="Texture" id=2]
|
||||
[ext_resource path="res://game/dialog_avatars/mark_talk_down_right_2.png" type="Texture" id=3]
|
||||
|
||||
[resource]
|
||||
flags = 4
|
||||
frames = 3
|
||||
frame_0/texture = ExtResource( 1 )
|
||||
frame_1/texture = ExtResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 2 )
|
||||
frame_2/delay_sec = 0.0
|
||||
7
game/fonts/caslonantique.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/fonts/caslonantique.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
size = 21
|
||||
font_data = ExtResource( 1 )
|
||||
BIN
game/fonts/caslonantique.ttf
Executable file
@@ -1,13 +1,13 @@
|
||||
:look
|
||||
> [eq dialog_popup_advance 0]
|
||||
say player ROOM1_look_wall_item_1:"I don't know what that stuff is." dialog_box_inset
|
||||
say player ROOM1_look_wall_item_1:"I don't know what that stuff is." avatar_dialog_player
|
||||
set_global dialog_popup_advance 1
|
||||
stop
|
||||
> [eq dialog_popup_advance 1]
|
||||
say player ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is." dialog_box_inset
|
||||
say player ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is." avatar_dialog_player
|
||||
set_global dialog_popup_advance 2
|
||||
stop
|
||||
> [eq dialog_popup_advance 2]
|
||||
say player ROOM1_look_wall_item_3:"No, SERIOUSLY, I have no idea what that is!" dialog_box_inset
|
||||
say player ROOM1_look_wall_item_4:"Please stop asking me that!" dialog_box_inset
|
||||
say player ROOM1_look_wall_item_3:"No, SERIOUSLY, I have no idea what that is!" avatar_dialog_player
|
||||
say player ROOM1_look_wall_item_4:"Please stop asking me that!" avatar_dialog_player
|
||||
stop
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://game/rooms/room01/walkable_area.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/rooms/room01/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=7]
|
||||
@@ -23,6 +23,8 @@ editor_debug_mode = 1
|
||||
[node name="background" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="advice" type="Label" parent="background"]
|
||||
anchor_right = 0.023274
|
||||
anchor_bottom = 0.018018
|
||||
margin_left = 90.2752
|
||||
margin_top = 120.824
|
||||
margin_right = 270.275
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://game/rooms/room02/walkable_area.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/rooms/room02/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://game/rooms/room03/walkable_area.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/rooms/room03/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room05/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/rooms/room05/item_wall/item_wall.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[ext_resource path="res://game/rooms/room06/r_door.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
[ext_resource path="res://game/characters/worker/worker.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=8]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=8]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=9]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id=1]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[ext_resource path="res://game/rooms/room07/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/items/escitems/button.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=5]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=8]
|
||||
|
||||
@@ -1,20 +1,7 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/rooms/room08/puzzle/10_buttons_puzzle.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi.TTF" type="DynamicFontData" id=3]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 50
|
||||
font_data = ExtResource( 3 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 50
|
||||
font_data = ExtResource( 3 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
size = 50
|
||||
font_data = ExtResource( 3 )
|
||||
|
||||
[node name="10_buttons_puzzle" type="Panel"]
|
||||
anchor_right = 1.0
|
||||
@@ -29,7 +16,7 @@ margin_left = 174.813
|
||||
margin_top = 79.6769
|
||||
margin_right = 899.813
|
||||
margin_bottom = 126.677
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "Click the buttons in the increasing order"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
@@ -40,7 +27,7 @@ margin_left = 558.177
|
||||
margin_top = 674.983
|
||||
margin_right = 719.177
|
||||
margin_bottom = 721.983
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "Well done!"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
@@ -61,7 +48,7 @@ margin_right = 191.0
|
||||
margin_bottom = 214.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button2" type="Button" parent="GridContainer"]
|
||||
@@ -70,7 +57,7 @@ margin_right = 386.0
|
||||
margin_bottom = 214.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button3" type="Button" parent="GridContainer"]
|
||||
@@ -79,7 +66,7 @@ margin_right = 581.0
|
||||
margin_bottom = 214.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button4" type="Button" parent="GridContainer"]
|
||||
@@ -88,7 +75,7 @@ margin_right = 776.0
|
||||
margin_bottom = 214.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button5" type="Button" parent="GridContainer"]
|
||||
@@ -97,7 +84,7 @@ margin_right = 971.0
|
||||
margin_bottom = 214.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button6" type="Button" parent="GridContainer"]
|
||||
@@ -106,7 +93,7 @@ margin_right = 191.0
|
||||
margin_bottom = 432.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button7" type="Button" parent="GridContainer"]
|
||||
@@ -116,7 +103,7 @@ margin_right = 386.0
|
||||
margin_bottom = 432.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button8" type="Button" parent="GridContainer"]
|
||||
@@ -126,7 +113,7 @@ margin_right = 581.0
|
||||
margin_bottom = 432.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button9" type="Button" parent="GridContainer"]
|
||||
@@ -136,7 +123,7 @@ margin_right = 776.0
|
||||
margin_bottom = 432.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="Button10" type="Button" parent="GridContainer"]
|
||||
@@ -146,7 +133,7 @@ margin_right = 971.0
|
||||
margin_bottom = 432.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
toggle_mode = true
|
||||
|
||||
[node name="quit" type="Button" parent="."]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room09/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/rooms/room09/closet/magical_closet.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -6,7 +6,7 @@ say player "Hello. I will now walk a bit and won't listen at what you say!"
|
||||
accept_input NONE
|
||||
walk_block player player_start
|
||||
walk_block player accept_input_location
|
||||
say player "Ha! Now you can't even skip this text!" dialog_box_inset
|
||||
say player "Ha! Now you can't even skip this text!" avatar_dialog_player
|
||||
accept_input SKIP
|
||||
say player "Okay, you can skip this text, but still not move me until 3 seconds have passed."
|
||||
wait 3
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room10/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room11/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room12/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room12/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="Shader" id=3]
|
||||
code = "shader_type canvas_item;
|
||||
uniform vec4 col : hint_color;
|
||||
|
||||
|
||||
bool is_equal(vec4 c1, vec4 refcol) {
|
||||
float epsilon = 0.001;
|
||||
vec3 delta = abs(c1.rgb - refcol.rgb);
|
||||
return float(delta.r + delta.g + delta.b) < epsilon ? true : false;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 tex = texture(TEXTURE, UV);
|
||||
|
||||
if (is_equal(tex, col)) {
|
||||
COLOR = vec4(0.0,0.0,0.0,0.3);
|
||||
}
|
||||
// else {
|
||||
// COLOR = texture(TEXTURE, UV);
|
||||
// }
|
||||
|
||||
}
|
||||
"
|
||||
|
||||
[resource]
|
||||
shader = SubResource( 3 )
|
||||
shader_param/col = Color( 0.572549, 0.25098, 0.105882, 1 )
|
||||
@@ -1,6 +1,7 @@
|
||||
:init
|
||||
|
||||
spawn _main_menu res://game/ui/commons/main_menu/main_menu.tscn false
|
||||
set_sound_state _music res://game/sfx/Game-Menu_Looping.mp3 true
|
||||
spawn _main_menu res://addons/escoria-core/ui_library/menus/main_menu/main_menu.tscn false
|
||||
set_active _main_menu true
|
||||
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi_font.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/images/no_image.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/escoria-core/template_scenes/dialog_scenes/dialog_box_inset.gd" type="Script" id=3]
|
||||
[ext_resource path="res://game/ui/commons/dialogs/insets/dialog_box_avatars.tscn" type="PackedScene" id=4]
|
||||
|
||||
[node name="dialog_box" type="PanelContainer"]
|
||||
anchor_left = 0.155
|
||||
anchor_top = 0.334
|
||||
anchor_right = 0.845
|
||||
anchor_bottom = 0.666
|
||||
margin_left = 0.100006
|
||||
margin_top = -0.200012
|
||||
margin_right = -0.100098
|
||||
margin_bottom = 0.199951
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 876.0
|
||||
margin_bottom = 292.2
|
||||
custom_constants/margin_right = 20
|
||||
custom_constants/margin_top = 20
|
||||
custom_constants/margin_left = 20
|
||||
custom_constants/margin_bottom = 20
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HSplitContainer" type="HSplitContainer" parent="MarginContainer"]
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 849.0
|
||||
margin_bottom = 265.0
|
||||
custom_constants/separation = 35
|
||||
dragger_visibility = 1
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HSplitContainer"]
|
||||
margin_right = 174.0
|
||||
margin_bottom = 245.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_stretch_ratio = 0.3
|
||||
|
||||
[node name="avatar" type="TextureRect" parent="MarginContainer/HSplitContainer/VBoxContainer"]
|
||||
margin_right = 174.0
|
||||
margin_bottom = 217.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource( 2 )
|
||||
expand = true
|
||||
|
||||
[node name="name" type="Label" parent="MarginContainer/HSplitContainer/VBoxContainer"]
|
||||
margin_top = 221.0
|
||||
margin_right = 174.0
|
||||
margin_bottom = 245.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
valign = 1
|
||||
|
||||
[node name="text" type="RichTextLabel" parent="MarginContainer/HSplitContainer"]
|
||||
margin_left = 209.0
|
||||
margin_right = 829.0
|
||||
margin_bottom = 245.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/normal_font = ExtResource( 1 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "Here be some text"
|
||||
text = "Here be some text"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Tween" type="Tween" parent="MarginContainer/HSplitContainer/text"]
|
||||
|
||||
[node name="dialog_avatars" parent="." instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 876.0
|
||||
margin_bottom = 259.0
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
@@ -1,22 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi_font.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://addons/escoria-core/template_scenes/dialog_scenes/dialog_label.gd" type="Script" id=2]
|
||||
|
||||
[node name="dialog_label" type="RichTextLabel"]
|
||||
margin_right = 643.0
|
||||
margin_bottom = 60.0
|
||||
custom_fonts/normal_font = ExtResource( 1 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "[center]Here be some text.[/center]"
|
||||
text = "Here be some text."
|
||||
fit_content_height = true
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
text_speed_per_character = 0.0
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
@@ -1,16 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/dialogs/insets/mark_talk_down_right_1.png" type="Texture" id=1]
|
||||
|
||||
[node name="dialog_avatars" type="Control"]
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="player" type="TextureRect" parent="."]
|
||||
margin_right = 23.0
|
||||
margin_bottom = 27.0
|
||||
texture = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.1 KiB |
@@ -1,67 +0,0 @@
|
||||
extends ESCDialogOptionsChooser
|
||||
|
||||
export(Color, RGB) var color_normal = Color(1.0,1.0,1.0,1.0)
|
||||
export(Color, RGB) var color_hover = Color(165.0,42.0,42.0, 1.0)
|
||||
export(Font) var font
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
hide_chooser()
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if $MarginContainer.visible and self.dialog and self.dialog.timeout > 0:
|
||||
$TimerProgress.value = (
|
||||
self.dialog.timeout - $Timer.time_left
|
||||
) / self.dialog.timeout * 100
|
||||
|
||||
|
||||
func show_chooser():
|
||||
var _vbox = $MarginContainer/ScrollContainer/VBoxContainer
|
||||
for option_node in _vbox.get_children():
|
||||
_vbox.remove_child(option_node)
|
||||
|
||||
_remove_avatar()
|
||||
|
||||
for option in self.dialog.options:
|
||||
var _option_node = Button.new()
|
||||
_option_node.text = (option as ESCDialogOption).option
|
||||
_option_node.flat = true
|
||||
_option_node.add_color_override("font_color", color_normal)
|
||||
_option_node.add_color_override("font_color_hover", color_hover)
|
||||
_option_node.add_font_override("font", font)
|
||||
_vbox.add_child(_option_node)
|
||||
_option_node.connect("pressed", self, "_on_answer_selected", [option])
|
||||
|
||||
if self.dialog.avatar != "-":
|
||||
$AvatarContainer.add_child(
|
||||
ResourceLoader.load(self.dialog.avatar).instance()
|
||||
)
|
||||
|
||||
$MarginContainer.show()
|
||||
|
||||
if self.dialog.timeout > 0:
|
||||
$Timer.start(self.dialog.timeout)
|
||||
|
||||
|
||||
func hide_chooser():
|
||||
$MarginContainer.hide()
|
||||
|
||||
|
||||
func _option_chosen(option: ESCDialogOption):
|
||||
_remove_avatar()
|
||||
$TimerProgress.value = 0
|
||||
emit_signal("option_chosen", option)
|
||||
|
||||
|
||||
func _on_answer_selected(option: ESCDialogOption):
|
||||
_option_chosen(option)
|
||||
|
||||
|
||||
func _on_Timer_timeout() -> void:
|
||||
_option_chosen(self.dialog.options[self.dialog.timeout_option - 1])
|
||||
|
||||
|
||||
func _remove_avatar():
|
||||
if $AvatarContainer.get_child_count() > 0:
|
||||
$AvatarContainer.remove_child($AvatarContainer.get_child(0))
|
||||
@@ -1,64 +0,0 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/template_scenes/dialog_scenes/dialog_choosers/text_dialog_choice.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi_font.tres" type="DynamicFont" id=2]
|
||||
|
||||
[sub_resource type="Gradient" id=1]
|
||||
colors = PoolColorArray( 1, 0, 0, 1, 1, 0, 0, 1 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
gradient = SubResource( 1 )
|
||||
|
||||
[node name="text_dialog_choice" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
color_hover = Color( 0.647059, 0.164706, 0.164706, 1 )
|
||||
font = ExtResource( 2 )
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 900.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_top = 20
|
||||
custom_constants/margin_left = 20
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"]
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 1260.0
|
||||
margin_bottom = 880.0
|
||||
scroll_horizontal_enabled = false
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ScrollContainer"]
|
||||
margin_right = 1240.0
|
||||
margin_bottom = 860.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 20
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[node name="TimerProgress" type="TextureProgress" parent="."]
|
||||
anchor_right = 1.0
|
||||
rect_min_size = Vector2( 0, 20 )
|
||||
texture_progress = SubResource( 2 )
|
||||
nine_patch_stretch = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AvatarContainer" type="Node2D" parent="."]
|
||||
position = Vector2( 29.1458, 120.012 )
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
@@ -1,7 +0,0 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/assets/fonts/efmi/efmi.TTF" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
size = 21
|
||||
font_data = ExtResource( 1 )
|
||||
@@ -1,30 +0,0 @@
|
||||
extends Control
|
||||
|
||||
signal back_button_pressed
|
||||
|
||||
export(PackedScene) var slot_ui_scene
|
||||
|
||||
func _ready():
|
||||
refresh_savegames()
|
||||
|
||||
func _on_slot_pressed(slot_id: int) -> void:
|
||||
escoria.save_manager.load_game(slot_id)
|
||||
|
||||
func _on_back_pressed():
|
||||
emit_signal("back_button_pressed")
|
||||
|
||||
func refresh_savegames():
|
||||
for slot in $CenterContainer/VBoxContainer/\
|
||||
ScrollContainer/slots.get_children():
|
||||
$CenterContainer/VBoxContainer/\
|
||||
ScrollContainer/slots.remove_child(slot)
|
||||
|
||||
var saves_list = escoria.save_manager.get_saves_list()
|
||||
for i in saves_list.size():
|
||||
var save_data = saves_list[i+1]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
$CenterContainer/VBoxContainer/ScrollContainer/slots.add_child(
|
||||
new_slot
|
||||
)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
|
||||
@@ -1,60 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/ui/commons/load_save_slot/load_save_slot.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/load/load_game.gd" type="Script" id=3]
|
||||
|
||||
[node name="load_game" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
slot_ui_scene = ExtResource( 2 )
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
margin_left = 390.0
|
||||
margin_top = 184.0
|
||||
margin_right = 890.0
|
||||
margin_bottom = 715.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="CenterContainer/VBoxContainer"]
|
||||
margin_right = 500.0
|
||||
margin_bottom = 500.0
|
||||
rect_min_size = Vector2( 500, 500 )
|
||||
scroll_horizontal_enabled = false
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="slots" type="VBoxContainer" parent="CenterContainer/VBoxContainer/ScrollContainer"]
|
||||
margin_right = 500.0
|
||||
margin_bottom = 500.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="back" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
margin_top = 504.0
|
||||
margin_right = 500.0
|
||||
margin_bottom = 531.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "OPTIONS_BACK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/back" to="." method="_on_back_pressed"]
|
||||
@@ -1,7 +0,0 @@
|
||||
extends Button
|
||||
|
||||
|
||||
func set_slot_name_date(p_name: String, p_date: String):
|
||||
$VBoxContainer/slot_name.text = p_name
|
||||
$VBoxContainer/date.text = p_date
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/ui/commons/load_save_slot/load_save_slot.gd" type="Script" id=2]
|
||||
|
||||
[node name="slot" type="Button"]
|
||||
margin_right = 665.0
|
||||
margin_bottom = 86.0
|
||||
rect_min_size = Vector2( 0, 100 )
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="slot_name" type="Label" parent="VBoxContainer"]
|
||||
margin_top = 27.0
|
||||
margin_right = 665.0
|
||||
margin_bottom = 48.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "slot_name"
|
||||
align = 1
|
||||
|
||||
[node name="date" type="Label" parent="VBoxContainer"]
|
||||
margin_top = 52.0
|
||||
margin_right = 665.0
|
||||
margin_bottom = 73.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "date"
|
||||
align = 1
|
||||
@@ -1,55 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
|
||||
[node name="main" type="VBoxContainer"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -179.0
|
||||
margin_top = -35.746
|
||||
margin_right = 179.0
|
||||
margin_bottom = 227.254
|
||||
custom_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="new_game" type="Button" parent="."]
|
||||
margin_right = 358.0
|
||||
margin_bottom = 152.0
|
||||
rect_min_size = Vector2( 0, 150 )
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "NEW_GAME"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="load_game" type="Button" parent="."]
|
||||
margin_top = 162.0
|
||||
margin_right = 358.0
|
||||
margin_bottom = 189.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "LOAD_GAME"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="options" type="Button" parent="."]
|
||||
margin_top = 199.0
|
||||
margin_right = 358.0
|
||||
margin_bottom = 226.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "OPTIONS"
|
||||
|
||||
[node name="quit" type="Button" parent="."]
|
||||
margin_top = 236.0
|
||||
margin_right = 358.0
|
||||
margin_bottom = 263.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "QUIT"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
extends Control
|
||||
|
||||
|
||||
func _ready():
|
||||
var event = ESCEvent.new(":music")
|
||||
event.statements.append(
|
||||
ESCCommand.new(
|
||||
"set_sound_state _music res://game/sfx/Game-Menu_Looping.mp3 true"
|
||||
)
|
||||
)
|
||||
escoria.event_manager.queue_event(event)
|
||||
var rc = yield(event, "finished")
|
||||
|
||||
if rc != ESCExecution.RC_OK:
|
||||
escoria.logger.report_errors(
|
||||
"main_menu: Can't start menu music",
|
||||
[
|
||||
"set_sound_state returned %d" % rc
|
||||
]
|
||||
)
|
||||
return false
|
||||
|
||||
|
||||
func _on_continue_pressed():
|
||||
pass
|
||||
|
||||
|
||||
func switch_language(lang: String):
|
||||
TranslationServer.set_locale(lang)
|
||||
|
||||
|
||||
func _on_new_game_pressed():
|
||||
escoria.new_game()
|
||||
|
||||
|
||||
func _on_load_game_pressed():
|
||||
$Panel/CenterContainer/main.hide()
|
||||
$Panel/load_game.refresh_savegames()
|
||||
$Panel/load_game.show()
|
||||
|
||||
|
||||
func _on_options_pressed():
|
||||
$Panel/CenterContainer/main.hide()
|
||||
$Panel/options.show()
|
||||
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
###########################################################################
|
||||
###########################################################################
|
||||
# OPTIONS
|
||||
|
||||
func _on_options_back_button_pressed():
|
||||
$Panel/options.hide()
|
||||
$Panel/CenterContainer/main.show()
|
||||
|
||||
|
||||
func _on_load_game_back_button_pressed():
|
||||
$Panel/load_game.hide()
|
||||
$Panel/CenterContainer/main.show()
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/main_menu/main_menu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/ui/commons/main_menu/main.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/escoria-core/design/escoria-logo-small.png" type="Texture" id=3]
|
||||
[ext_resource path="res://game/ui/commons/options/options.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/commons/load/load_game.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="main_menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false,
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Panel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="main" type="VBoxContainer" parent="Panel/CenterContainer"]
|
||||
margin_left = 332.0
|
||||
margin_top = 151.0
|
||||
margin_right = 948.0
|
||||
margin_bottom = 748.0
|
||||
custom_constants/separation = 100
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/CenterContainer/main"]
|
||||
margin_right = 616.0
|
||||
margin_bottom = 236.0
|
||||
texture = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="buttons" parent="Panel/CenterContainer/main" instance=ExtResource( 2 )]
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 0.0
|
||||
margin_top = 336.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 597.0
|
||||
|
||||
[node name="new_game" parent="Panel/CenterContainer/main/buttons" index="0"]
|
||||
margin_right = 616.0
|
||||
margin_bottom = 150.0
|
||||
|
||||
[node name="load_game" parent="Panel/CenterContainer/main/buttons" index="1"]
|
||||
margin_top = 160.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 187.0
|
||||
|
||||
[node name="options" parent="Panel/CenterContainer/main/buttons" index="2"]
|
||||
margin_top = 197.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 224.0
|
||||
|
||||
[node name="quit" parent="Panel/CenterContainer/main/buttons" index="3"]
|
||||
margin_top = 234.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 261.0
|
||||
|
||||
[node name="options" parent="Panel" instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
|
||||
[node name="load_game" parent="Panel" instance=ExtResource( 5 )]
|
||||
visible = false
|
||||
|
||||
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/new_game" to="." method="_on_new_game_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/load_game" to="." method="_on_load_game_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/options" to="." method="_on_options_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/main/buttons/quit" to="." method="_on_quit_pressed"]
|
||||
[connection signal="back_button_pressed" from="Panel/options" to="." method="_on_options_back_button_pressed"]
|
||||
[connection signal="back_button_pressed" from="Panel/load_game" to="." method="_on_load_game_back_button_pressed"]
|
||||
|
||||
[editable path="Panel/CenterContainer/main/buttons"]
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,86 +0,0 @@
|
||||
extends Control
|
||||
|
||||
signal back_button_pressed
|
||||
|
||||
onready var settings_changed = false
|
||||
var backup_settings
|
||||
|
||||
|
||||
# A list of languages already added to the language selection
|
||||
var _loaded_languages: Array = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var _flags_container: HBoxContainer = \
|
||||
$CenterContainer/VBoxContainer/MarginContainer/options/flags
|
||||
for child in _flags_container.get_children():
|
||||
_flags_container.remove_child(child)
|
||||
|
||||
_loaded_languages = []
|
||||
|
||||
for lang in TranslationServer.get_loaded_locales():
|
||||
if not lang in _loaded_languages:
|
||||
_loaded_languages.append(lang)
|
||||
var _lang = TextureRect.new()
|
||||
_lang.texture = load(
|
||||
"res://game/ui/commons/options/flags/%s.png" % lang
|
||||
)
|
||||
_flags_container.add_child(_lang)
|
||||
_lang.connect("gui_input", self, "_on_language_input", [lang])
|
||||
|
||||
|
||||
func show():
|
||||
backup_settings = escoria.settings.duplicate()
|
||||
initialize_options(escoria.settings)
|
||||
visible = true
|
||||
|
||||
|
||||
func initialize_options(p_settings):
|
||||
var _options = $CenterContainer/VBoxContainer/MarginContainer/options
|
||||
_options.get_node("general_volume").value = p_settings["master_volume"]
|
||||
_options.get_node("sound_volume").value = p_settings["sfx_volume"]
|
||||
_options.get_node("music_volume").value = p_settings["music_volume"]
|
||||
_options.get_node("speech_volume").value = p_settings["speech_volume"]
|
||||
|
||||
|
||||
func _on_language_input(event: InputEvent, language: String):
|
||||
if event.is_pressed():
|
||||
TranslationServer.set_locale(language)
|
||||
escoria.settings["text_lang"] = language
|
||||
settings_changed = true
|
||||
|
||||
|
||||
func _on_sound_volume_changed(value):
|
||||
escoria.settings["sfx_volume"] = value
|
||||
escoria._on_settings_loaded(escoria.settings)
|
||||
settings_changed = true
|
||||
|
||||
|
||||
func _on_music_volume_changed(value):
|
||||
escoria.settings["music_volume"] = value
|
||||
escoria._on_settings_loaded(escoria.settings)
|
||||
settings_changed = true
|
||||
|
||||
|
||||
func _on_general_volume_changed(value):
|
||||
escoria.settings["master_volume"] = value
|
||||
escoria._on_settings_loaded(escoria.settings)
|
||||
settings_changed = true
|
||||
|
||||
|
||||
func _on_apply_pressed():
|
||||
escoria.save_manager.save_settings()
|
||||
settings_changed = false
|
||||
emit_signal("back_button_pressed")
|
||||
|
||||
|
||||
func _on_back_pressed():
|
||||
escoria.settings = backup_settings
|
||||
escoria._on_settings_loaded(escoria.settings)
|
||||
emit_signal("back_button_pressed")
|
||||
|
||||
|
||||
func _on_speech_volume_value_changed(value: float) -> void:
|
||||
escoria.settings["speech_volume"] = value
|
||||
escoria._on_settings_loaded(escoria.settings)
|
||||
settings_changed = true
|
||||
@@ -1,168 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/ui/commons/options/options.gd" type="Script" id=4]
|
||||
|
||||
[node name="options" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
margin_left = 482.0
|
||||
margin_top = 354.0
|
||||
margin_right = 798.0
|
||||
margin_bottom = 546.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/VBoxContainer"]
|
||||
margin_right = 316.0
|
||||
margin_bottom = 161.0
|
||||
size_flags_vertical = 6
|
||||
custom_constants/margin_right = 20
|
||||
custom_constants/margin_top = 20
|
||||
custom_constants/margin_left = 20
|
||||
custom_constants/margin_bottom = 20
|
||||
|
||||
[node name="options" type="GridContainer" parent="CenterContainer/VBoxContainer/MarginContainer"]
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 296.0
|
||||
margin_bottom = 141.0
|
||||
size_flags_vertical = 6
|
||||
custom_constants/hseparation = 40
|
||||
columns = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="label" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_right = 220.0
|
||||
margin_bottom = 21.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "OPTIONS_LANGUAGE"
|
||||
|
||||
[node name="flags" type="HBoxContainer" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_left = 260.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 21.0
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="label2" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_top = 25.0
|
||||
margin_right = 220.0
|
||||
margin_bottom = 46.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "GENERAL_VOLUME"
|
||||
|
||||
[node name="general_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_left = 260.0
|
||||
margin_top = 25.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 41.0
|
||||
size_flags_horizontal = 3
|
||||
min_value = 0.001
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
value = 0.001
|
||||
|
||||
[node name="label3" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_top = 50.0
|
||||
margin_right = 220.0
|
||||
margin_bottom = 71.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "SOUND_VOLUME"
|
||||
|
||||
[node name="sound_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_left = 260.0
|
||||
margin_top = 50.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 66.0
|
||||
size_flags_horizontal = 3
|
||||
min_value = 0.001
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
value = 0.001
|
||||
|
||||
[node name="label4" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_top = 75.0
|
||||
margin_right = 220.0
|
||||
margin_bottom = 96.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "MUSIC_VOLUME"
|
||||
|
||||
[node name="music_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_left = 260.0
|
||||
margin_top = 75.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 91.0
|
||||
size_flags_horizontal = 3
|
||||
min_value = 0.001
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
value = 0.001
|
||||
|
||||
[node name="label5" type="Label" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_top = 100.0
|
||||
margin_right = 220.0
|
||||
margin_bottom = 121.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "SPEECH_VOLUME"
|
||||
|
||||
[node name="speech_volume" type="HSlider" parent="CenterContainer/VBoxContainer/MarginContainer/options"]
|
||||
margin_left = 260.0
|
||||
margin_top = 100.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 116.0
|
||||
size_flags_horizontal = 3
|
||||
min_value = 0.001
|
||||
max_value = 1.0
|
||||
step = 0.001
|
||||
value = 0.001
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
|
||||
margin_top = 165.0
|
||||
margin_right = 316.0
|
||||
margin_bottom = 192.0
|
||||
custom_constants/separation = 20
|
||||
alignment = 1
|
||||
|
||||
[node name="back" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
|
||||
margin_left = 22.0
|
||||
margin_right = 196.0
|
||||
margin_bottom = 27.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "OPTIONS_BACK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="apply" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
|
||||
margin_left = 216.0
|
||||
margin_right = 293.0
|
||||
margin_bottom = 27.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "APPLY"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/general_volume" to="." method="_on_general_volume_changed"]
|
||||
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/sound_volume" to="." method="_on_sound_volume_changed"]
|
||||
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/music_volume" to="." method="_on_music_volume_changed"]
|
||||
[connection signal="value_changed" from="CenterContainer/VBoxContainer/MarginContainer/options/speech_volume" to="." method="_on_speech_volume_value_changed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/back" to="." method="_on_back_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/HBoxContainer/apply" to="." method="_on_apply_pressed"]
|
||||
@@ -1,39 +0,0 @@
|
||||
extends Control
|
||||
|
||||
|
||||
func _ready():
|
||||
self.pause_mode = Node.PAUSE_MODE_PROCESS
|
||||
hide()
|
||||
|
||||
|
||||
func _on_continue_pressed():
|
||||
escoria.main.current_scene.game.pause_game()
|
||||
|
||||
|
||||
func _on_save_game_pressed():
|
||||
$Panel/CenterContainer/VBoxContainer.hide()
|
||||
$save_game.show()
|
||||
|
||||
|
||||
func _on_load_game_pressed():
|
||||
$Panel/CenterContainer/VBoxContainer.hide()
|
||||
$load_game.refresh_savegames()
|
||||
$load_game.show()
|
||||
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _on_save_game_back_button_pressed():
|
||||
$Panel/CenterContainer/VBoxContainer.show()
|
||||
$save_game.hide()
|
||||
|
||||
|
||||
func _on_load_game_back_button_pressed():
|
||||
$Panel/CenterContainer/VBoxContainer.show()
|
||||
$load_game.hide()
|
||||
|
||||
|
||||
func set_save_enabled(p_enabled: bool):
|
||||
$Panel/CenterContainer/VBoxContainer/menuitems/save_game.disabled = !p_enabled
|
||||
@@ -1,110 +0,0 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/pause_menu/pause_menu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://addons/escoria-core/design/escoria-logo-small.png" type="Texture" id=3]
|
||||
[ext_resource path="res://game/ui/commons/save/save_game.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/commons/load/load_game.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="pause_menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Panel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/CenterContainer"]
|
||||
margin_left = 332.0
|
||||
margin_top = 151.0
|
||||
margin_right = 948.0
|
||||
margin_bottom = 748.0
|
||||
custom_constants/separation = 100
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/CenterContainer/VBoxContainer"]
|
||||
margin_right = 616.0
|
||||
margin_bottom = 236.0
|
||||
texture = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="menuitems" type="VBoxContainer" parent="Panel/CenterContainer/VBoxContainer"]
|
||||
margin_top = 336.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 597.0
|
||||
custom_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="continue" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
|
||||
margin_right = 616.0
|
||||
margin_bottom = 150.0
|
||||
rect_min_size = Vector2( 0, 150 )
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "CONTINUE_GAME"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="save_game" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
|
||||
margin_top = 160.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 187.0
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "SAVE_GAME"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="load_game" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
|
||||
margin_top = 197.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 224.0
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "LOAD_GAME"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="quit" type="Button" parent="Panel/CenterContainer/VBoxContainer/menuitems"]
|
||||
margin_top = 234.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 261.0
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "QUIT"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="save_game" parent="." instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
|
||||
[node name="load_game" parent="." instance=ExtResource( 5 )]
|
||||
visible = false
|
||||
|
||||
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/continue" to="." method="_on_continue_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/save_game" to="." method="_on_save_game_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/load_game" to="." method="_on_load_game_pressed"]
|
||||
[connection signal="pressed" from="Panel/CenterContainer/VBoxContainer/menuitems/quit" to="." method="_on_quit_pressed"]
|
||||
[connection signal="back_button_pressed" from="save_game" to="." method="_on_save_game_back_button_pressed"]
|
||||
[connection signal="back_button_pressed" from="load_game" to="." method="_on_load_game_back_button_pressed"]
|
||||
@@ -1,43 +0,0 @@
|
||||
extends OptionButton
|
||||
|
||||
var selected_id = 0
|
||||
var options_paths = []
|
||||
|
||||
func _ready():
|
||||
var rooms_folder = "res://game/rooms/"
|
||||
var dir = Directory.new()
|
||||
var rooms_list: Array = []
|
||||
var path = ProjectSettings.globalize_path(rooms_folder)
|
||||
if not OS.has_feature("editor"):
|
||||
path = OS.get_executable_path().get_base_dir().plus_file(path)
|
||||
var tmp = dir.open(path)
|
||||
if tmp == OK:
|
||||
dir.list_dir_begin(true)
|
||||
var file_name = dir.get_next()
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
rooms_list.push_back(file_name)
|
||||
file_name = dir.get_next()
|
||||
|
||||
rooms_list.sort()
|
||||
for room in rooms_list:
|
||||
add_item(room)
|
||||
options_paths.push_back("res://game/rooms/" + room + "/" +
|
||||
room + ".tscn")
|
||||
|
||||
else:
|
||||
escoria.logger.report_warnings("room_select.gd:_ready()",
|
||||
["A problem occurred while opening rooms folder."])
|
||||
|
||||
|
||||
func _on_button_pressed():
|
||||
|
||||
var script = escoria.esc_compiler.compile([
|
||||
":debug",
|
||||
"change_scene %s" % options_paths[selected_id]
|
||||
])
|
||||
escoria.event_manager.interrupt_running_event()
|
||||
escoria.event_manager.queue_event(script.events['debug'])
|
||||
|
||||
func _on_option_item_selected(index):
|
||||
selected_id = index
|
||||
@@ -1,25 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/room_select.gd" type="Script" id=1]
|
||||
|
||||
[node name="room_select" type="HBoxContainer"]
|
||||
margin_right = 63.0
|
||||
margin_bottom = 40.0005
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="option" type="OptionButton" parent="."]
|
||||
margin_right = 29.0
|
||||
margin_bottom = 40.0
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
margin_left = 33.0
|
||||
margin_right = 63.0
|
||||
margin_bottom = 40.0
|
||||
text = "Go"
|
||||
|
||||
[connection signal="item_selected" from="option" to="option" method="_on_option_item_selected"]
|
||||
[connection signal="pressed" from="button" to="option" method="_on_button_pressed"]
|
||||
@@ -1,12 +0,0 @@
|
||||
extends PopupDialog
|
||||
|
||||
signal confirm_yes
|
||||
|
||||
func _on_no_pressed():
|
||||
hide()
|
||||
|
||||
|
||||
func _on_yes_pressed():
|
||||
emit_signal("confirm_yes")
|
||||
hide()
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/ui/commons/save/overwrite_confirm_popup.gd" type="Script" id=2]
|
||||
|
||||
[node name="overwrite_confirm_popup" type="PopupDialog"]
|
||||
margin_left = 429.0
|
||||
margin_top = 281.0
|
||||
margin_right = 863.0
|
||||
margin_bottom = 442.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_constants/margin_right = 30
|
||||
custom_constants/margin_top = 30
|
||||
custom_constants/margin_left = 30
|
||||
custom_constants/margin_bottom = 30
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
margin_left = 30.0
|
||||
margin_top = 30.0
|
||||
margin_right = 404.0
|
||||
margin_bottom = 131.0
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
margin_right = 374.0
|
||||
margin_bottom = 21.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "CONFIRM_OVERWRITE"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -224.0
|
||||
margin_top = -56.0
|
||||
margin_right = -30.0
|
||||
margin_bottom = -20.0
|
||||
custom_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="yes" type="Button" parent="HBoxContainer"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 36.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "YES"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="no" type="Button" parent="HBoxContainer"]
|
||||
margin_left = 102.0
|
||||
margin_right = 194.0
|
||||
margin_bottom = 36.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "NO"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="HBoxContainer/yes" to="." method="_on_yes_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/no" to="." method="_on_no_pressed"]
|
||||
@@ -1,63 +0,0 @@
|
||||
extends Control
|
||||
|
||||
signal back_button_pressed
|
||||
|
||||
export(PackedScene) var slot_ui_scene
|
||||
|
||||
var slot_pressed
|
||||
|
||||
func _ready():
|
||||
refresh_savegames()
|
||||
|
||||
|
||||
func _on_slot_pressed(p_slot_n: int):
|
||||
slot_pressed = p_slot_n
|
||||
if escoria.save_manager.save_game_exists(p_slot_n):
|
||||
$overwrite_confirm_popup.popup()
|
||||
else:
|
||||
$save_name_popup.popup()
|
||||
|
||||
|
||||
func refresh_savegames():
|
||||
var _slots = $CenterContainer/VBoxContainer/ScrollContainer/slots
|
||||
for slot in _slots.get_children():
|
||||
_slots.remove_child(slot)
|
||||
|
||||
var saves_list = escoria.save_manager.get_saves_list()
|
||||
for i in saves_list.size():
|
||||
var save_data = saves_list[i+1]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
_slots.add_child(new_slot)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
|
||||
|
||||
var datetime = OS.get_datetime()
|
||||
var datetime_string = "%02d/%02d/%02d %02d:%02d" % [
|
||||
datetime["day"],
|
||||
datetime["month"],
|
||||
datetime["year"],
|
||||
datetime["hour"],
|
||||
datetime["minute"],
|
||||
]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
_slots.add_child(new_slot)
|
||||
new_slot.set_slot_name_date(tr("New save"), datetime_string)
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [saves_list.size()+1])
|
||||
|
||||
|
||||
func _on_back_pressed():
|
||||
emit_signal("back_button_pressed")
|
||||
|
||||
|
||||
func _on_save_name_popup_savegame_name_ok(p_savename: String):
|
||||
escoria.save_manager.save_game(slot_pressed, p_savename)
|
||||
refresh_savegames()
|
||||
slot_pressed = null
|
||||
|
||||
|
||||
func _on_save_name_popup_savegame_cancel():
|
||||
pass
|
||||
|
||||
|
||||
func _on_overwrite_confirm_popup_confirm_yes():
|
||||
$save_name_popup.popup()
|
||||
@@ -1,65 +0,0 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/load_save_slot/load_save_slot.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/ui/commons/save/save_game.gd" type="Script" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/ui/commons/save/save_name_popup.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/commons/save/overwrite_confirm_popup.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="save_game" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
slot_ui_scene = ExtResource( 1 )
|
||||
|
||||
[node name="save_name_popup" parent="." instance=ExtResource( 4 )]
|
||||
|
||||
[node name="overwrite_confirm_popup" parent="." instance=ExtResource( 5 )]
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
margin_left = 390.0
|
||||
margin_top = 184.0
|
||||
margin_right = 890.0
|
||||
margin_bottom = 715.0
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="CenterContainer/VBoxContainer"]
|
||||
margin_right = 500.0
|
||||
margin_bottom = 500.0
|
||||
rect_min_size = Vector2( 500, 500 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="slots" type="VBoxContainer" parent="CenterContainer/VBoxContainer/ScrollContainer"]
|
||||
margin_right = 500.0
|
||||
margin_bottom = 500.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="back" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
margin_top = 504.0
|
||||
margin_right = 500.0
|
||||
margin_bottom = 531.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "OPTIONS_BACK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="savegame_cancel" from="save_name_popup" to="." method="_on_save_name_popup_savegame_cancel"]
|
||||
[connection signal="savegame_name_ok" from="save_name_popup" to="." method="_on_save_name_popup_savegame_name_ok"]
|
||||
[connection signal="confirm_yes" from="overwrite_confirm_popup" to="." method="_on_overwrite_confirm_popup_confirm_yes"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/back" to="." method="_on_back_pressed"]
|
||||
@@ -1,14 +0,0 @@
|
||||
extends PopupDialog
|
||||
|
||||
signal savegame_name_ok(savegame_name)
|
||||
signal savegame_cancel
|
||||
|
||||
func _on_cancel_pressed():
|
||||
emit_signal("savegame_cancel")
|
||||
hide()
|
||||
|
||||
func _on_ok_pressed():
|
||||
if not $MarginContainer/VBoxContainer/LineEdit.text.empty():
|
||||
emit_signal("savegame_name_ok", $MarginContainer/VBoxContainer/LineEdit.text)
|
||||
$MarginContainer/VBoxContainer/LineEdit.clear()
|
||||
hide()
|
||||
@@ -1,81 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://game/ui/commons/save/save_name_popup.gd" type="Script" id=2]
|
||||
|
||||
[node name="save_name_popup" type="PopupDialog"]
|
||||
margin_left = 429.0
|
||||
margin_top = 281.0
|
||||
margin_right = 863.0
|
||||
margin_bottom = 442.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_constants/margin_right = 30
|
||||
custom_constants/margin_top = 30
|
||||
custom_constants/margin_left = 30
|
||||
custom_constants/margin_bottom = 30
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
margin_left = 30.0
|
||||
margin_top = 30.0
|
||||
margin_right = 404.0
|
||||
margin_bottom = 131.0
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
margin_right = 374.0
|
||||
margin_bottom = 21.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "ENTER_SAVE_NAME"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="MarginContainer/VBoxContainer"]
|
||||
margin_top = 25.0
|
||||
margin_right = 374.0
|
||||
margin_bottom = 56.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -224.0
|
||||
margin_top = -56.0
|
||||
margin_right = -30.0
|
||||
margin_bottom = -20.0
|
||||
custom_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="cancel" type="Button" parent="HBoxContainer"]
|
||||
margin_right = 96.0
|
||||
margin_bottom = 36.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "CANCEL"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ok" type="Button" parent="HBoxContainer"]
|
||||
margin_left = 106.0
|
||||
margin_right = 194.0
|
||||
margin_bottom = 36.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "OK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="HBoxContainer/cancel" to="." method="_on_cancel_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/ok" to="." method="_on_ok_pressed"]
|
||||