Issue 320 (#396) - Mobile fixes
Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -32,6 +32,11 @@ Implement methods to react to inputs.
|
||||
|
||||
func _ready():
|
||||
ProjectSettings.set_setting("escoria/ui/tooltip_follows_mouse", true)
|
||||
escoria.action_manager.connect(
|
||||
"action_finished",
|
||||
self,
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
|
||||
## BACKGROUND ##
|
||||
@@ -42,17 +47,11 @@ func left_click_on_bg(position: Vector2) -> void:
|
||||
[escoria.main.current_scene.player.global_id, position],
|
||||
true
|
||||
)
|
||||
$ui/verbs_layer/verbs_menu.set_by_name("walk")
|
||||
$ui/verbs_layer/verbs_menu.clear_tool_texture()
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk")
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
|
||||
|
||||
func right_click_on_bg(position: Vector2) -> void:
|
||||
escoria.do(
|
||||
"walk",
|
||||
[escoria.main.current_scene.player.global_id, position],
|
||||
true
|
||||
)
|
||||
$ui/verbs_layer/verbs_menu.set_by_name("walk")
|
||||
$ui/verbs_layer/verbs_menu.clear_tool_texture()
|
||||
mousewheel_action(1)
|
||||
|
||||
func left_double_click_on_bg(position: Vector2) -> void:
|
||||
escoria.do(
|
||||
@@ -60,22 +59,24 @@ func left_double_click_on_bg(position: Vector2) -> void:
|
||||
[escoria.main.current_scene.player.global_id, position, true],
|
||||
true
|
||||
)
|
||||
$ui/verbs_layer/verbs_menu.set_by_name("walk")
|
||||
$ui/verbs_layer/verbs_menu.clear_tool_texture()
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk")
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
|
||||
|
||||
## ITEM/HOTSPOT FOCUS ##
|
||||
|
||||
func element_focused(element_id: String) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(element_id).node
|
||||
$ui/tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
|
||||
$tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
|
||||
|
||||
if escoria.action_manager.current_action != "use" \
|
||||
and escoria.action_manager.current_tool == null:
|
||||
if target_obj is ESCItem:
|
||||
$ui/verbs_layer/verbs_menu.set_by_name(target_obj.default_action)
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name(
|
||||
target_obj.default_action
|
||||
)
|
||||
|
||||
func element_unfocused() -> void:
|
||||
$ui/tooltip_layer/tooltip.set_target("")
|
||||
$tooltip_layer/tooltip.set_target("")
|
||||
|
||||
|
||||
## ITEMS ##
|
||||
@@ -84,7 +85,7 @@ func left_click_on_item(item_global_id: String, event: InputEvent) -> void:
|
||||
escoria.do("item_left_click", [item_global_id, event], true)
|
||||
|
||||
func right_click_on_item(item_global_id: String, event: InputEvent) -> void:
|
||||
escoria.do("item_right_click", [item_global_id, event], true)
|
||||
mousewheel_action(1)
|
||||
|
||||
func left_double_click_on_item(item_global_id: String, event: InputEvent) -> void:
|
||||
escoria.do("item_left_click", [item_global_id, event], true)
|
||||
@@ -98,17 +99,17 @@ func left_click_on_inventory_item(inventory_item_global_id: String, event: Input
|
||||
inventory_item_global_id
|
||||
).node
|
||||
if item.has_method("get_sprite") and item.get_sprite().texture:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_tool_texture(
|
||||
item.get_sprite().texture
|
||||
)
|
||||
elif item.inventory_item.texture_normal:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_tool_texture(
|
||||
item.inventory_item.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], true)
|
||||
mousewheel_action(1)
|
||||
|
||||
|
||||
func left_double_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
||||
@@ -116,7 +117,7 @@ func left_double_click_on_inventory_item(inventory_item_global_id: String, event
|
||||
|
||||
|
||||
func inventory_item_focused(inventory_item_global_id: String) -> void:
|
||||
$ui/tooltip_layer/tooltip.set_target(
|
||||
$tooltip_layer/tooltip.set_target(
|
||||
escoria.object_manager.get_object(
|
||||
inventory_item_global_id
|
||||
).node.tooltip_name
|
||||
@@ -124,43 +125,53 @@ func inventory_item_focused(inventory_item_global_id: String) -> void:
|
||||
|
||||
|
||||
func inventory_item_unfocused() -> void:
|
||||
$ui/tooltip_layer/tooltip.set_target("")
|
||||
$tooltip_layer/tooltip.set_target("")
|
||||
|
||||
|
||||
func open_inventory():
|
||||
$ui/inventory_layer/inventory_ui/inventory_button.show_inventory()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show_inventory()
|
||||
|
||||
|
||||
func close_inventory():
|
||||
$ui/inventory_layer/inventory_ui/inventory_button.close_inventory()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.hide_inventory()
|
||||
|
||||
|
||||
func mousewheel_action(direction: int):
|
||||
$ui/verbs_layer/verbs_menu.iterate_actions_cursor(direction)
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.iterate_actions_cursor(direction)
|
||||
|
||||
|
||||
func hide_ui():
|
||||
$ui/inventory_layer/inventory_ui.hide()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.hide()
|
||||
|
||||
|
||||
func show_ui():
|
||||
$ui/inventory_layer/inventory_ui.show()
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show()
|
||||
|
||||
|
||||
func _on_event_done(event_name: String):
|
||||
escoria.action_manager.clear_current_action()
|
||||
$ui/verbs_layer/verbs_menu.clear_tool_texture()
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
|
||||
|
||||
|
||||
func pause_game():
|
||||
if $ui/pause_menu.visible:
|
||||
$ui/pause_menu.hide()
|
||||
if $CanvasLayer/pause_menu.visible:
|
||||
$CanvasLayer/pause_menu.hide()
|
||||
escoria.main.current_scene.game.get_node("camera").current = true
|
||||
escoria.main.current_scene.game.show_ui()
|
||||
escoria.main.current_scene.show()
|
||||
else:
|
||||
$ui/pause_menu.set_save_enabled(escoria.save_manager.save_enabled)
|
||||
$ui/pause_menu.show()
|
||||
$CanvasLayer/pause_menu.set_save_enabled(
|
||||
escoria.save_manager.save_enabled
|
||||
)
|
||||
$CanvasLayer/pause_menu.show()
|
||||
escoria.main.current_scene.game.get_node("camera").current = false
|
||||
escoria.main.current_scene.game.hide_ui()
|
||||
escoria.main.current_scene.hide()
|
||||
|
||||
|
||||
func _on_action_finished():
|
||||
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
|
||||
|
||||
|
||||
func _on_MenuButton_pressed() -> void:
|
||||
pause_game()
|
||||
|
||||
@@ -13,46 +13,80 @@
|
||||
script = ExtResource( 5 )
|
||||
editor_debug_mode = 1
|
||||
|
||||
[node name="ui" type="CanvasLayer" parent="."]
|
||||
[node name="camera" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="inventory_layer" type="CanvasLayer" parent="ui"]
|
||||
layer = 2
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[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="ui" type="Control" parent="CanvasLayer"]
|
||||
anchor_top = 0.9
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="verbs_layer" type="CanvasLayer" parent="ui"]
|
||||
layer = 2
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/ui"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[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="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/ui/HBoxContainer"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 90.0
|
||||
|
||||
[node name="tooltip_layer" type="CanvasLayer" parent="ui"]
|
||||
layer = 2
|
||||
[node name="MenuButton" type="Button" parent="CanvasLayer/ui/HBoxContainer/VBoxContainer"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 20.0
|
||||
text = "Menu"
|
||||
|
||||
[node name="tooltip" parent="ui/tooltip_layer" instance=ExtResource( 6 )]
|
||||
mouse_filter = 2
|
||||
bbcode_text = "[center][color=#000000][/color][/center]"
|
||||
offset_from_cursor = Vector2( 75, 10 )
|
||||
[node name="room_select" parent="CanvasLayer/ui/HBoxContainer/VBoxContainer" instance=ExtResource( 7 )]
|
||||
margin_top = 47.0
|
||||
margin_right = 200.0
|
||||
margin_bottom = 67.0
|
||||
rect_min_size = Vector2( 200, 0 )
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 6
|
||||
|
||||
[node name="dialog_layer" type="CanvasLayer" parent="ui"]
|
||||
layer = 3
|
||||
[node name="verbs_menu" parent="CanvasLayer/ui/HBoxContainer" instance=ExtResource( 4 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 204.0
|
||||
margin_right = 204.0
|
||||
margin_bottom = 90.0
|
||||
grow_horizontal = 0
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
|
||||
[node name="dialog_player" parent="ui/dialog_layer" instance=ExtResource( 2 )]
|
||||
[node name="inventory_ui" parent="CanvasLayer/ui/HBoxContainer" instance=ExtResource( 1 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 1190.0
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 90.0
|
||||
rect_scale = Vector2( 1, 1 )
|
||||
|
||||
[node name="room_select" parent="ui" instance=ExtResource( 7 )]
|
||||
margin_left = 75.5099
|
||||
margin_top = 751.323
|
||||
margin_right = 138.51
|
||||
margin_bottom = 791.324
|
||||
|
||||
[node name="pause_menu" parent="ui" instance=ExtResource( 8 )]
|
||||
[node name="pause_menu" parent="CanvasLayer" instance=ExtResource( 8 )]
|
||||
visible = false
|
||||
|
||||
[node name="camera" parent="." instance=ExtResource( 3 )]
|
||||
[node name="dialog_layer" type="CanvasLayer" parent="."]
|
||||
layer = 3
|
||||
|
||||
[node name="dialog_player" parent="dialog_layer" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="tooltip_layer" type="CanvasLayer" parent="."]
|
||||
layer = 2
|
||||
|
||||
[node name="tooltip" parent="tooltip_layer" instance=ExtResource( 6 )]
|
||||
mouse_filter = 2
|
||||
bbcode_text = "[center][color=#000000][/color][/center]"
|
||||
fit_content_height = true
|
||||
offset_from_cursor = Vector2( 75, 10 )
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/ui/HBoxContainer/VBoxContainer/MenuButton" to="." method="_on_MenuButton_pressed"]
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
extends Control
|
||||
|
||||
var showed: bool = false
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
|
||||
func _on_inventory_button_pressed():
|
||||
if !$AnimationPlayer.is_playing() and !showed:
|
||||
show_inventory()
|
||||
elif !$AnimationPlayer.is_playing() and showed:
|
||||
close_inventory()
|
||||
|
||||
|
||||
func show_inventory():
|
||||
$AnimationPlayer.play("show")
|
||||
yield($AnimationPlayer, "animation_finished")
|
||||
showed = true
|
||||
|
||||
|
||||
func close_inventory():
|
||||
$AnimationPlayer.play("hide")
|
||||
yield($AnimationPlayer, "animation_finished")
|
||||
showed = false
|
||||
55
addons/escoria-ui-simplemouse/inventory/inventory_ui.gd
Normal file
55
addons/escoria-ui-simplemouse/inventory/inventory_ui.gd
Normal file
@@ -0,0 +1,55 @@
|
||||
extends ESCInventory
|
||||
|
||||
|
||||
# Wether the inventory is visible currently
|
||||
var inventory_visible: bool = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Hide inventory by default
|
||||
$FloatingInventory/panel.rect_position.x = \
|
||||
ProjectSettings.get_setting("display/window/size/width")
|
||||
|
||||
func _on_inventory_button_pressed():
|
||||
if $FloatingInventory/InventoryTween.is_active():
|
||||
return
|
||||
if inventory_visible:
|
||||
hide_inventory()
|
||||
else:
|
||||
show_inventory()
|
||||
|
||||
|
||||
func show_inventory():
|
||||
$FloatingInventory/InventoryTween.stop_all()
|
||||
$FloatingInventory/InventoryTween.remove_all()
|
||||
$FloatingInventory/InventoryTween.interpolate_property(
|
||||
$FloatingInventory/panel,
|
||||
"rect_position:x",
|
||||
$FloatingInventory/panel.rect_position.x,
|
||||
$FloatingInventory/panel.rect_position.x - \
|
||||
$FloatingInventory/panel.rect_size.x - \
|
||||
$HBoxContainer/inventory_button.rect_size.x,
|
||||
0.6
|
||||
)
|
||||
$FloatingInventory/InventoryTween.start()
|
||||
yield($FloatingInventory/InventoryTween,"tween_all_completed")
|
||||
$FloatingInventory/InventoryTween.stop_all()
|
||||
inventory_visible = true
|
||||
|
||||
|
||||
func hide_inventory():
|
||||
$FloatingInventory/InventoryTween.stop_all()
|
||||
$FloatingInventory/InventoryTween.remove_all()
|
||||
$FloatingInventory/InventoryTween.interpolate_property(
|
||||
$FloatingInventory/panel,
|
||||
"rect_position:x",
|
||||
$FloatingInventory/panel.rect_position.x,
|
||||
$FloatingInventory/panel.rect_position.x + \
|
||||
$FloatingInventory/panel.rect_size.x + \
|
||||
$HBoxContainer/inventory_button.rect_size.x,
|
||||
0.6
|
||||
)
|
||||
$FloatingInventory/InventoryTween.start()
|
||||
yield($FloatingInventory/InventoryTween,"tween_all_completed")
|
||||
$FloatingInventory/InventoryTween.stop_all()
|
||||
inventory_visible = false
|
||||
@@ -1,143 +1,79 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/inventory/inventory_ui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/images/inventory_bg.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/inventory/inventory_ui_container.gd" type="Script" id=3]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/inventory/inventory_showhide.gd" type="Script" id=4]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/images/frame.png" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/images/inventory_icon.png" type="Texture" id=6]
|
||||
|
||||
[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
|
||||
anchor_right = 0.4
|
||||
anchor_bottom = 0.4
|
||||
margin_right = 768.0
|
||||
margin_bottom = 540.0
|
||||
rect_min_size = Vector2( 90, 90 )
|
||||
rect_scale = Vector2( 0.4, 0.4 )
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
inventory_ui_container = NodePath("inventory_button/panel/MarginContainer/ScrollContainer/container")
|
||||
inventory_ui_container = NodePath("FloatingInventory/panel/MarginContainer/ScrollContainer/container")
|
||||
|
||||
[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"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 57.0
|
||||
margin_top = 37.0
|
||||
margin_right = -68.0
|
||||
margin_bottom = -71.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="inventory_button" type="TextureButton" parent="HBoxContainer"]
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 900.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture_normal = ExtResource( 6 )
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="frame" type="TextureRect" parent="HBoxContainer/inventory_button"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource( 5 )
|
||||
expand = true
|
||||
stretch_mode = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="FloatingInventory" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="panel" type="TextureRect" parent="FloatingInventory"]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -516.0
|
||||
margin_top = -160.0
|
||||
rect_min_size = Vector2( 0, 160 )
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource( 2 )
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="FloatingInventory/panel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/margin_right = 20
|
||||
custom_constants/margin_top = 20
|
||||
custom_constants/margin_left = 20
|
||||
@@ -146,23 +82,22 @@ __meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="inventory_button/panel/MarginContainer"]
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="FloatingInventory/panel/MarginContainer"]
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 1544.0
|
||||
margin_bottom = 194.0
|
||||
margin_top = 80.0
|
||||
margin_right = 496.0
|
||||
margin_bottom = 80.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 6
|
||||
scroll_vertical_enabled = false
|
||||
|
||||
[node name="container" type="HBoxContainer" parent="inventory_button/panel/MarginContainer/ScrollContainer"]
|
||||
margin_right = 1524.0
|
||||
margin_bottom = 174.0
|
||||
[node name="container" type="HBoxContainer" parent="FloatingInventory/panel/MarginContainer/ScrollContainer"]
|
||||
margin_right = 476.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 )
|
||||
[node name="InventoryTween" type="Tween" parent="FloatingInventory"]
|
||||
|
||||
[connection signal="pressed" from="inventory_button" to="inventory_button" method="_on_inventory_button_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/inventory_button" to="." method="_on_inventory_button_pressed"]
|
||||
|
||||
@@ -8,48 +8,66 @@
|
||||
[ext_resource path="res://addons/escoria-ui-simplemouse/cursors/cursor_hand.png" type="Texture" id=6]
|
||||
|
||||
[node name="verbs_menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="actions" type="GridContainer" parent="."]
|
||||
[node name="actions" type="HBoxContainer" parent="."]
|
||||
visible = false
|
||||
margin_right = 333.0
|
||||
margin_bottom = 175.0
|
||||
columns = 3
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="walk" type="TextureRect" parent="actions"]
|
||||
margin_right = 64.0
|
||||
margin_bottom = 64.0
|
||||
margin_left = 94.0
|
||||
margin_top = 418.0
|
||||
margin_right = 158.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
texture = ExtResource( 5 )
|
||||
|
||||
[node name="look" type="TextureRect" parent="actions"]
|
||||
margin_left = 68.0
|
||||
margin_right = 132.0
|
||||
margin_bottom = 64.0
|
||||
margin_left = 350.0
|
||||
margin_top = 418.0
|
||||
margin_right = 414.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="pickup" type="TextureRect" parent="actions"]
|
||||
margin_left = 136.0
|
||||
margin_right = 200.0
|
||||
margin_bottom = 64.0
|
||||
margin_left = 607.0
|
||||
margin_top = 418.0
|
||||
margin_right = 671.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
texture = ExtResource( 6 )
|
||||
|
||||
[node name="use" type="TextureRect" parent="actions"]
|
||||
margin_top = 68.0
|
||||
margin_right = 64.0
|
||||
margin_bottom = 132.0
|
||||
margin_left = 864.0
|
||||
margin_top = 418.0
|
||||
margin_right = 928.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
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
|
||||
margin_left = 1121.0
|
||||
margin_top = 418.0
|
||||
margin_right = 1185.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="mouse_position" type="Control" parent="."]
|
||||
|
||||
Reference in New Issue
Block a user