Initial commit of Escoria-Reloaded. Still a lot of missing stuff.

This commit is contained in:
Julian Murgia
2020-12-17 16:24:25 +01:00
commit f26d96f115
1794 changed files with 89611 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
[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://game/ui/commons/dialogs/insets/guybrush.jpeg" 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.199982
margin_right = -0.100098
margin_bottom = 0.200012
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 = 259.0
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 = 232.0
custom_constants/separation = 35
dragger_visibility = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HSplitContainer"]
margin_right = 150.0
margin_bottom = 212.0
[node name="avatar" type="TextureRect" parent="MarginContainer/HSplitContainer/VBoxContainer"]
margin_right = 150.0
margin_bottom = 150.0
texture = ExtResource( 2 )
[node name="name" type="Label" parent="MarginContainer/HSplitContainer/VBoxContainer"]
margin_top = 154.0
margin_right = 150.0
margin_bottom = 178.0
custom_fonts/font = ExtResource( 1 )
valign = 1
[node name="text" type="RichTextLabel" parent="MarginContainer/HSplitContainer"]
margin_left = 185.0
margin_right = 829.0
margin_bottom = 212.0
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="."]

View File

@@ -0,0 +1,22 @@
[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="."]

View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://game/ui/commons/dialogs/insets/guybrush.jpeg" type="Texture" id=1]
[node name="dialog_avatars" type="Control"]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="player" type="TextureRect" parent="."]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/guybrush.jpeg-2fc39d8d3de855fdd1e6fd25540a16ab.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/commons/dialogs/insets/guybrush.jpeg"
dest_files=[ "res://.import/guybrush.jpeg-2fc39d8d3de855fdd1e6fd25540a16ab.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -0,0 +1,34 @@
[gd_scene load_steps=3 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]
[node name="text_dialog_choice" type="MarginContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_constants/margin_top = 20
custom_constants/margin_left = 20
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
color_hover = Color( 0.647059, 0.164706, 0.164706, 1 )
font = ExtResource( 2 )
[node name="ScrollContainer" type="ScrollContainer" parent="."]
margin_left = 20.0
margin_top = 20.0
margin_right = 1280.0
margin_bottom = 800.0
scroll_horizontal_enabled = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 1260.0
size_flags_horizontal = 3
custom_constants/separation = 20
__meta__ = {
"_edit_use_anchors_": false
}

View File

@@ -0,0 +1,12 @@
extends Control
func _on_new_game_pressed():
escoria.new_game()
func _on_load_game_pressed():
# Show Loading screen
pass
func _on_quit_pressed():
get_tree().quit()

View File

@@ -0,0 +1,55 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://game/ui/ui_mouse_icons/main_menu.gd" type="Script" id=1]
[node name="main_menu" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -92.0
margin_top = -34.0
margin_right = 92.0
margin_bottom = 34.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="new_game" type="Button" parent="VBoxContainer"]
margin_right = 184.0
margin_bottom = 20.0
text = "New game"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="load_game" type="Button" parent="VBoxContainer"]
margin_top = 24.0
margin_right = 184.0
margin_bottom = 44.0
text = "Load game"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="quit" type="Button" parent="VBoxContainer"]
margin_top = 48.0
margin_right = 184.0
margin_bottom = 68.0
text = "Quit"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="VBoxContainer/new_game" to="." method="_on_new_game_pressed"]
[connection signal="pressed" from="VBoxContainer/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_pressed"]

View File

@@ -0,0 +1,62 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/escoria-core/template_scenes/label/action_target_tooltip.tscn" type="PackedScene" id=1]
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui.tscn" type="PackedScene" id=2]
[ext_resource path="res://game/ui/ui_9verbs/verbs_menu.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/escoria-core/game/scenes/dialogs/dialog_player.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/escoria-core/game/scenes/camera_player/camera.tscn" type="PackedScene" id=6]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.6, 0.6, 0.6, 0.5 )
[node name="game" type="Node"]
[node name="ui" type="CanvasLayer" parent="."]
[node name="panel_down" type="PanelContainer" parent="ui"]
anchor_top = 0.714
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -0.200012
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="verbs_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="verbs_menu" parent="ui/verbs_layer" instance=ExtResource( 3 )]
margin_left = 21.097
margin_top = 615.331
margin_right = 21.097
margin_bottom = 615.331
[node name="inventory_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="inventory_ui" parent="ui/inventory_layer" instance=ExtResource( 2 )]
margin_left = 661.041
margin_top = 615.331
margin_right = 661.041
margin_bottom = 615.331
[node name="tooltip_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="tooltip" parent="ui/tooltip_layer" instance=ExtResource( 1 )]
anchor_left = 0.208
anchor_top = 0.722
anchor_right = 0.734
anchor_bottom = 0.77
margin_left = 0.383453
margin_top = 0.364075
margin_right = 0.103394
margin_bottom = -0.0359497
[node name="dialog_layer" type="CanvasLayer" parent="ui"]
layer = 3
[node name="dialog_player" parent="ui/dialog_layer" instance=ExtResource( 4 )]
[node name="camera" parent="." instance=ExtResource( 6 )]

View File

@@ -0,0 +1,37 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" type="Script" id=1]
[ext_resource path="res://game/items/all_items.tscn" type="PackedScene" id=2]
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui_container.gd" type="Script" id=3]
[node name="inventory_ui" type="Control"]
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
items_container = NodePath("PanelContainer/ScrollContainer/GridContainer")
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 600.0
margin_bottom = 175.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer"]
margin_left = 7.0
margin_top = 7.0
margin_right = 593.0
margin_bottom = 168.0
[node name="GridContainer" type="GridContainer" parent="PanelContainer/ScrollContainer"]
margin_right = 586.0
size_flags_horizontal = 3
custom_constants/vseparation = 16
custom_constants/hseparation = 16
columns = 4
script = ExtResource( 3 )
[node name="all_items" parent="." instance=ExtResource( 2 )]
position = Vector2( 269.391, 275.003 )

View File

@@ -0,0 +1,42 @@
extends Control
"""
This script is totally user-defined. It does exactly what the user wants the
inventory to look like. It only requires 4 functions to be defined:
- is_empty() -> bool
- get_items() -> Array
- add_item(inventory_item : ESCInventoryItem)
- remove_item(inventory_item : ESCInventoryItem)
The user is free to implement these methods the way s-he likes.
"""
var current_nodes_in_container = {}
func is_empty() -> bool:
return get_child_count() > 0
func get_items() -> Array:
return current_nodes_in_container.keys()
func add_item(inventory_item : ESCInventoryItem):
var center_container = CenterContainer.new()
center_container.size_flags_horizontal = SIZE_EXPAND_FILL
center_container.connect("mouse_entered", inventory_item, "_on_inventory_item_mouse_enter")
center_container.connect("mouse_exited", inventory_item, "_on_inventory_item_mouse_exit")
center_container.connect("gui_input", self, "_on_gui_input", [inventory_item])
center_container.add_child(inventory_item)
add_child(center_container)
current_nodes_in_container[inventory_item] = center_container
func remove_item(inventory_item : ESCInventoryItem):
var node_to_remove = current_nodes_in_container[inventory_item]
current_nodes_in_container.erase(node_to_remove)
node_to_remove.disconnect("mouse_entered", inventory_item, "_on_inventory_item_mouse_enter")
node_to_remove.disconnect("mouse_exited", inventory_item, "_on_inventory_item_mouse_exit")
node_to_remove.disconnect("pressed", self, "_on_gui_input")
remove_child(node_to_remove)
node_to_remove.queue_free()
func _on_gui_input(event : InputEvent, inventory_item : ESCInventoryItem):
if event is InputEventMouseButton and event.is_pressed():
inventory_item._on_inventory_item_pressed()

View File

@@ -0,0 +1,14 @@
tool
extends Control
func _ready():
for but in $actions.get_children():
but.connect("pressed", self, "_on_action_selected", [but.name])
but.toggle_mode = true
func _on_action_selected(action : String):
escoria.esc_runner.set_current_action(action)
for but in $actions.get_children():
but.set_pressed(but.get_name() == action)

View File

@@ -0,0 +1,131 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://game/ui/ui_9verbs/verbs_menu.gd" type="Script" id=1]
[node name="verbs_menu" type="Control"]
margin_left = 1.0
margin_right = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="actions" type="GridContainer" parent="."]
margin_right = 333.0
margin_bottom = 175.0
columns = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="open" type="Button" parent="actions"]
margin_right = 108.0
margin_bottom = 55.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Open"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="pickup" type="Button" parent="actions"]
margin_left = 112.0
margin_right = 220.0
margin_bottom = 55.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Pick up"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="push" type="Button" parent="actions"]
margin_left = 224.0
margin_right = 332.0
margin_bottom = 55.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Push"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="close" type="Button" parent="actions"]
margin_top = 59.0
margin_right = 108.0
margin_bottom = 114.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Close"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="look" type="Button" parent="actions"]
margin_left = 112.0
margin_top = 59.0
margin_right = 220.0
margin_bottom = 114.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Look at"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="pull" type="Button" parent="actions"]
margin_left = 224.0
margin_top = 59.0
margin_right = 332.0
margin_bottom = 114.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Pull"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="give" type="Button" parent="actions"]
margin_top = 118.0
margin_right = 108.0
margin_bottom = 173.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Give"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="use" type="Button" parent="actions"]
margin_left = 112.0
margin_top = 118.0
margin_right = 220.0
margin_bottom = 173.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Use"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="talk" type="Button" parent="actions"]
margin_left = 224.0
margin_top = 118.0
margin_right = 332.0
margin_bottom = 173.0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
text = "Talk"
__meta__ = {
"_edit_use_anchors_": false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_examine.png-1f23c0056b30794de07578a6713310dc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_examine.png"
dest_files=[ "res://.import/cursor_examine.png-1f23c0056b30794de07578a6713310dc.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_foot.png-c83dec914f4c27682179ce5a67740f46.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_foot.png"
dest_files=[ "res://.import/cursor_foot.png-c83dec914f4c27682179ce5a67740f46.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_glasses.png-a6bbe02491932d9296cd142469d00599.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_glasses.png"
dest_files=[ "res://.import/cursor_glasses.png-a6bbe02491932d9296cd142469d00599.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_gun.png-335e31e4c2c14e1a1e5e9276a93ebb36.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_gun.png"
dest_files=[ "res://.import/cursor_gun.png-335e31e4c2c14e1a1e5e9276a93ebb36.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_hand.png-ec92d85d8d55eac1eefa752abe7b9f60.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_hand.png"
dest_files=[ "res://.import/cursor_hand.png-ec92d85d8d55eac1eefa752abe7b9f60.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_heal.png-c02141f318ab34b37fa464ce655b6053.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_heal.png"
dest_files=[ "res://.import/cursor_heal.png-c02141f318ab34b37fa464ce655b6053.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_lock.png-10cd0626d5fa53f721e9b0314b0a5fdc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_lock.png"
dest_files=[ "res://.import/cursor_lock.png-10cd0626d5fa53f721e9b0314b0a5fdc.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_pen.png-11f4e18eff3657b69f0764150f6231e6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_pen.png"
dest_files=[ "res://.import/cursor_pen.png-11f4e18eff3657b69f0764150f6231e6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_punch.png-6691fd454d9fc5d87c5dee90cbf6dea8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_punch.png"
dest_files=[ "res://.import/cursor_punch.png-6691fd454d9fc5d87c5dee90cbf6dea8.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_shield.png-a52e4715b3999aaef81244cf344e1650.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_shield.png"
dest_files=[ "res://.import/cursor_shield.png-a52e4715b3999aaef81244cf344e1650.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_tool.png-51655f01c573c02df85d5b6464c34f1d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_tool.png"
dest_files=[ "res://.import/cursor_tool.png-51655f01c573c02df85d5b6464c34f1d.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_wait.png-9175beab3857da4e6b4e49e122e1aed4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/cursor_wait.png"
dest_files=[ "res://.import/cursor_wait.png-9175beab3857da4e6b4e49e122e1aed4.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_examine.png-df9a1d3bab3becb0f13f259e6cab0bd0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_examine.png"
dest_files=[ "res://.import/cursor_examine.png-df9a1d3bab3becb0f13f259e6cab0bd0.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_foot.png-dfdb8d5d51540d3cd6713fd48bb68eec.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_foot.png"
dest_files=[ "res://.import/cursor_foot.png-dfdb8d5d51540d3cd6713fd48bb68eec.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_glasses.png-6309507a0e32ab5cab5d2a18f145c172.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_glasses.png"
dest_files=[ "res://.import/cursor_glasses.png-6309507a0e32ab5cab5d2a18f145c172.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_gun.png-346bbea052ce7a6f48a2e91fc46015d9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_gun.png"
dest_files=[ "res://.import/cursor_gun.png-346bbea052ce7a6f48a2e91fc46015d9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_hand.png-c36739378475561ff91f32f2fd9c67fb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_hand.png"
dest_files=[ "res://.import/cursor_hand.png-c36739378475561ff91f32f2fd9c67fb.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_heal.png-64eb4ef36f3554a9e9185684cc8cb719.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_heal.png"
dest_files=[ "res://.import/cursor_heal.png-64eb4ef36f3554a9e9185684cc8cb719.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_lock.png-d459c7dcd12c832708c60a393e999d42.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_lock.png"
dest_files=[ "res://.import/cursor_lock.png-d459c7dcd12c832708c60a393e999d42.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_pen.png-bc2ee89164a3c0323f6c358b30aef3ae.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_pen.png"
dest_files=[ "res://.import/cursor_pen.png-bc2ee89164a3c0323f6c358b30aef3ae.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_punch.png-2cc4b2f755cd98ef79981902de06fe02.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_punch.png"
dest_files=[ "res://.import/cursor_punch.png-2cc4b2f755cd98ef79981902de06fe02.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_shield.png-dd203fcb04aa5af310e57ec4be3ecf98.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_shield.png"
dest_files=[ "res://.import/cursor_shield.png-dd203fcb04aa5af310e57ec4be3ecf98.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_tool.png-5dbc00c48cce99a1c3e4194d26be5e7a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_tool.png"
dest_files=[ "res://.import/cursor_tool.png-5dbc00c48cce99a1c3e4194d26be5e7a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cursor_wait.png-39393506e3d82bbdbc20ee64bec33c18.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/cursors/originals/cursor_wait.png"
dest_files=[ "res://.import/cursor_wait.png-39393506e3d82bbdbc20ee64bec33c18.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -0,0 +1,103 @@
extends Node
"""
Implement methods to react to inputs.
- left_click_on_bg(position : Vector2)
- right_click_on_bg(position : Vector2)
- left_double_click_on_bg(position : Vector2)
- element_focused(element_id : String)
- element_unfocused()
- left_click_on_hotspot(hotspot_global_id : String, event : InputEvent)
- right_click_on_hotspot(hotspot_global_id : String, event : InputEvent)
- left_double_click_on_hotspot(hotspot_global_id : String, event : InputEvent)
- left_click_on_item(item_global_id : String, event : InputEvent)
- right_click_on_item(item_global_id : String, event : InputEvent)
- left_double_click_on_item(item_global_id : String, event : InputEvent)
"""
signal element_focused(element_global_id)
func _input(event):
if event.is_action_pressed("switch_action_verb"):
if event.button_index == BUTTON_WHEEL_UP:
$ui/verbs_layer/verbs_menu.iterate_actions_cursor(-1)
elif event.button_index == BUTTON_WHEEL_DOWN:
$ui/verbs_layer/verbs_menu.iterate_actions_cursor(1)
## BACKGROUND ##
func left_click_on_bg(position : Vector2) -> void:
escoria.do("walk", ["player", position])
func right_click_on_bg(position : Vector2) -> void:
escoria.do("walk", ["player", position])
func left_double_click_on_bg(position : Vector2) -> void:
escoria.do("walk", ["player", position, true])
## ITEM/HOTSPOT FOCUS ##
func element_focused(element_id : String) -> void:
#emit_signal("element_focused", element_id)
var target_obj = escoria.esc_runner.get_object(element_id)
if escoria.esc_runner.current_action != "use" && escoria.esc_runner.current_tool == null:
if target_obj is ESCItem or target_obj is ESCHotspot:
$ui/verbs_layer/verbs_menu.set_by_name(target_obj.default_action)
func element_unfocused() -> void:
#emit_signal("element_focused", "")
#$ui/verbs_layer/verbs_menu.set_by_name("walk")
pass
## HOTSPOTS ##
func left_click_on_hotspot(hotspot_global_id : String, event : InputEvent) -> void:
escoria.do("hotspot_left_click", [hotspot_global_id, event])
func right_click_on_hotspot(hotspot_global_id : String, event : InputEvent) -> void:
escoria.do("hotspot_right_click", [hotspot_global_id, event])
func left_double_click_on_hotspot(hotspot_global_id : String, event : InputEvent) -> void:
escoria.do("hotspot_left_click", [hotspot_global_id, event])
## ITEMS ##
func left_click_on_item(item_global_id : String, event : InputEvent) -> void:
escoria.do("item_left_click", [item_global_id, event])
func right_click_on_item(item_global_id : String, event : InputEvent) -> void:
escoria.do("item_right_click", [item_global_id, event])
func left_double_click_on_item(item_global_id : String, event : InputEvent) -> void:
escoria.do("item_left_click", [item_global_id, event])
## INVENTORY ##
func left_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
escoria.do("item_left_click", [inventory_item_global_id, event])
if escoria.esc_runner.current_action == "use":
var item = escoria.esc_runner.get_object(inventory_item_global_id)
if item.texture:
$ui/verbs_layer/verbs_menu.set_tool_texture(item.texture)
elif item.inventory_item_scene_file.instance().texture_normal:
$ui/verbs_layer/verbs_menu.set_tool_texture(item.inventory_item_scene_file.instance().texture_normal)
func right_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
escoria.do("item_right_click", [inventory_item_global_id, event])
func double_left_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
pass
func inventory_item_focused(inventory_item_global_id : String) -> void:
emit_signal("element_focused", inventory_item_global_id)
func inventory_item_unfocused() -> void:
emit_signal("element_focused", "")

View File

@@ -0,0 +1,40 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://game/ui/ui_mouse_icons/inventory/inventory_ui.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/escoria-core/game/scenes/dialogs/dialog_player.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/escoria-core/game/scenes/camera_player/camera.tscn" type="PackedScene" id=3]
[ext_resource path="res://game/ui/ui_mouse_icons/verbs_mouseicons.tscn" type="PackedScene" id=4]
[ext_resource path="res://game/ui/ui_mouse_icons/game.gd" type="Script" id=5]
[node name="game" type="Node"]
script = ExtResource( 5 )
[node name="ui" type="CanvasLayer" parent="."]
[node name="inventory_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="inventory_ui" parent="ui/inventory_layer" instance=ExtResource( 1 )]
margin_left = 1173.73
margin_top = 695.268
margin_right = 394.205
margin_bottom = 587.268
[node name="verbs_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="verbs_menu" parent="ui/verbs_layer" instance=ExtResource( 4 )]
margin_left = 2234.6
margin_top = -583.507
margin_right = 2234.6
margin_bottom = -583.507
[node name="tooltip_layer" type="CanvasLayer" parent="ui"]
layer = 2
[node name="dialog_layer" type="CanvasLayer" parent="ui"]
layer = 3
[node name="dialog_player" parent="ui/dialog_layer" instance=ExtResource( 2 )]
[node name="camera" parent="." instance=ExtResource( 3 )]

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/frame.png-3403b7d5017d3fbeca5847e9f979a068.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/images/frame.png"
dest_files=[ "res://.import/frame.png-3403b7d5017d3fbeca5847e9f979a068.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/inventory_bg.png-3ae3e242b7cdd1c340735ebe2060de6f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/images/inventory_bg.png"
dest_files=[ "res://.import/inventory_bg.png-3ae3e242b7cdd1c340735ebe2060de6f.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/inventory_icon.png-0c6ae7b696351a2bf537bb017185ddcd.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/ui_mouse_icons/images/inventory_icon.png"
dest_files=[ "res://.import/inventory_icon.png-0c6ae7b696351a2bf537bb017185ddcd.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -0,0 +1,18 @@
extends Control
var showed : bool = false
func _ready():
pass
func _on_inventory_button_pressed():
if !$AnimationPlayer.is_playing() and !showed:
$AnimationPlayer.play("show")
yield($AnimationPlayer, "animation_finished")
showed = true
elif !$AnimationPlayer.is_playing() and showed:
$AnimationPlayer.play("hide")
yield($AnimationPlayer, "animation_finished")
showed = false

View File

@@ -0,0 +1,172 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" type="Script" id=1]
[ext_resource path="res://game/ui/ui_mouse_icons/images/inventory_bg.png" type="Texture" id=2]
[ext_resource path="res://game/ui/ui_mouse_icons/inventory/inventory_ui_container.gd" type="Script" id=3]
[ext_resource path="res://game/ui/ui_mouse_icons/inventory/inventory_showhide.gd" type="Script" id=4]
[ext_resource path="res://game/ui/ui_mouse_icons/images/frame.png" type="Texture" id=5]
[ext_resource path="res://game/ui/ui_mouse_icons/images/inventory_icon.png" type="Texture" id=6]
[ext_resource path="res://game/items/all_items.tscn" type="PackedScene" id=7]
[sub_resource type="Animation" id=1]
resource_name = "hide"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath(".:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../inventory_button:rect_position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("../inventory_button/panel:rect_position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( -1682.88, -52 ), Vector2( 268, -52 ) ]
}
[sub_resource type="Animation" id=2]
resource_name = "show"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath(".:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../inventory_button:rect_position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("../inventory_button/panel:rect_position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 268, -52 ), Vector2( -1682.88, -52 ) ]
}
[node name="inventory_ui" type="Control"]
anchor_right = 0.609
anchor_bottom = 0.135
margin_right = -779.52
margin_bottom = -108.0
rect_scale = Vector2( 0.4, 0.4 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
items_container = NodePath("inventory_button/panel/MarginContainer/ScrollContainer/container")
[node name="all_items" parent="." instance=ExtResource( 7 )]
position = Vector2( 269.391, 275.003 )
[node name="inventory_button" type="TextureButton" parent="."]
margin_right = 256.0
margin_bottom = 322.0
texture_normal = ExtResource( 6 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="frame" type="TextureRect" parent="inventory_button"]
margin_right = 2643.0
margin_bottom = 2630.0
rect_scale = Vector2( 0.1, 0.1 )
texture = ExtResource( 5 )
stretch_mode = 1
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="panel" type="TextureRect" parent="inventory_button"]
margin_left = 268.0
margin_top = -52.0
margin_right = 1957.0
margin_bottom = 270.0
grow_horizontal = 0
rect_min_size = Vector2( 1689, 322 )
texture = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MarginContainer" type="MarginContainer" parent="inventory_button/panel"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 57.0
margin_top = 37.0
margin_right = -68.0
margin_bottom = -71.0
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="ScrollContainer" type="ScrollContainer" parent="inventory_button/panel/MarginContainer"]
margin_left = 20.0
margin_top = 20.0
margin_right = 1544.0
margin_bottom = 194.0
scroll_vertical_enabled = false
[node name="container" type="HBoxContainer" parent="inventory_button/panel/MarginContainer/ScrollContainer"]
margin_right = 1524.0
margin_bottom = 174.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 20
script = ExtResource( 3 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="inventory_button"]
anims/hide = SubResource( 1 )
anims/show = SubResource( 2 )
[connection signal="pressed" from="inventory_button" to="inventory_button" method="_on_inventory_button_pressed"]

View File

@@ -0,0 +1,40 @@
extends Control
"""
This script is totally user-defined. It does exactly what the user wants the
inventory to look like. It only requires 4 functions to be defined:
- is_empty() -> bool
- get_items() -> Array
- add_item(inventory_item : ESCInventoryItem)
- remove_item(inventory_item : ESCInventoryItem)
The user is free to implement these methods the way s-he likes.
"""
var current_nodes_in_container = {}
func is_empty() -> bool:
return get_child_count() > 0
func get_items() -> Array:
return current_nodes_in_container.keys()
func add_item(inventory_item : ESCInventoryItem):
var center_container = CenterContainer.new()
center_container.size_flags_horizontal = SIZE_EXPAND_FILL
center_container.connect("mouse_entered", inventory_item, "_on_inventory_item_mouse_enter")
center_container.connect("mouse_exited", inventory_item, "_on_inventory_item_mouse_exit")
center_container.add_child(inventory_item)
add_child(center_container)
current_nodes_in_container[inventory_item] = center_container
func remove_item(inventory_item : ESCInventoryItem):
var node_to_remove = current_nodes_in_container[inventory_item]
current_nodes_in_container.erase(node_to_remove)
node_to_remove.disconnect("mouse_entered", inventory_item, "_on_inventory_item_mouse_enter")
node_to_remove.disconnect("mouse_exited", inventory_item, "_on_inventory_item_mouse_exit")
remove_child(node_to_remove)
node_to_remove.queue_free()
#func _on_gui_input(event : InputEvent, inventory_item : ESCInventoryItem):
# if event is InputEventMouseButton and event.is_pressed():
# inventory_item._on_inventory_item_pressed()

View File

@@ -0,0 +1,12 @@
extends Control
func _on_new_game_pressed():
escoria.new_game()
func _on_load_game_pressed():
# Show Loading screen
pass
func _on_quit_pressed():
get_tree().quit()

View File

@@ -0,0 +1,55 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://game/ui/ui_mouse_icons/main_menu.gd" type="Script" id=1]
[node name="main_menu" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -92.0
margin_top = -34.0
margin_right = 92.0
margin_bottom = 34.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="new_game" type="Button" parent="VBoxContainer"]
margin_right = 184.0
margin_bottom = 20.0
text = "New game"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="load_game" type="Button" parent="VBoxContainer"]
margin_top = 24.0
margin_right = 184.0
margin_bottom = 44.0
text = "Load game"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="quit" type="Button" parent="VBoxContainer"]
margin_top = 48.0
margin_right = 184.0
margin_bottom = 68.0
text = "Quit"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="VBoxContainer/new_game" to="." method="_on_new_game_pressed"]
[connection signal="pressed" from="VBoxContainer/load_game" to="." method="_on_load_game_pressed"]
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_pressed"]

View File

@@ -0,0 +1,54 @@
tool
extends Control
var current_cursor_id : int = 0
onready var cursors : Array = $actions.get_children()
"""
This script is out of Escoria's scope. It controls the UI reaction to an
UI event (eg right click) to change the cursor accordingly.
"""
enum UI_ACTIONS_DIRECTION {
UP = 1,
DOWN = -1
}
func _ready():
if !Engine.is_editor_hint():
current_cursor_id = cursors.size()
iterate_actions_cursor(UI_ACTIONS_DIRECTION.UP)
func _process(delta):
$mouse_position.rect_global_position = get_global_mouse_position()
func iterate_actions_cursor(direction : int):
current_cursor_id += direction
if current_cursor_id > cursors.size() - 1:
current_cursor_id = 0
elif current_cursor_id < 0:
current_cursor_id = cursors.size() - 1
Input.set_custom_mouse_cursor(cursors[current_cursor_id].texture)
escoria.esc_runner.set_current_action(cursors[current_cursor_id].name)
if $mouse_position/tool.texture != null:
clear_tool_texture()
func set_by_name(name : String) -> void:
for i in cursors.size():
if cursors[i].name == name:
current_cursor_id = i
break
Input.set_custom_mouse_cursor(cursors[current_cursor_id].texture)
escoria.esc_runner.set_current_action(cursors[current_cursor_id].name)
func set_tool_texture(texture : Texture):
set_process(true)
$mouse_position/tool.texture = texture
func clear_tool_texture():
$mouse_position/tool.texture = null
set_process(false)

View File

@@ -0,0 +1,66 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://game/ui/ui_mouse_icons/verbs_mouseicons.gd" type="Script" id=1]
[ext_resource path="res://game/ui/ui_mouse_icons/cursors/cursor_examine.png" type="Texture" id=2]
[ext_resource path="res://game/ui/ui_mouse_icons/cursors/cursor_tool.png" type="Texture" id=3]
[ext_resource path="res://game/ui/ui_mouse_icons/cursors/cursor_pen.png" type="Texture" id=4]
[ext_resource path="res://game/ui/ui_mouse_icons/cursors/cursor_foot.png" type="Texture" id=5]
[ext_resource path="res://game/ui/ui_mouse_icons/cursors/cursor_hand.png" type="Texture" id=6]
[node name="verbs_menu" type="Control"]
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="actions" type="GridContainer" parent="."]
visible = false
margin_right = 333.0
margin_bottom = 175.0
columns = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="walk" type="TextureRect" parent="actions"]
margin_right = 64.0
margin_bottom = 64.0
texture = ExtResource( 5 )
[node name="look" type="TextureRect" parent="actions"]
margin_left = 68.0
margin_right = 132.0
margin_bottom = 64.0
texture = ExtResource( 2 )
[node name="pickup" type="TextureRect" parent="actions"]
margin_left = 136.0
margin_right = 200.0
margin_bottom = 64.0
texture = ExtResource( 6 )
[node name="use" type="TextureRect" parent="actions"]
margin_top = 68.0
margin_right = 64.0
margin_bottom = 132.0
texture = ExtResource( 3 )
[node name="talk" type="TextureRect" parent="actions"]
margin_left = 68.0
margin_top = 68.0
margin_right = 132.0
margin_bottom = 132.0
texture = ExtResource( 4 )
[node name="mouse_position" type="Control" parent="."]
mouse_filter = 2
[node name="tool" type="TextureRect" parent="mouse_position"]
margin_left = 46.4475
margin_top = 45.6984
margin_right = 86.4475
margin_bottom = 85.6984
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}