Updated escoria-demo-game
This commit is contained in:
@@ -81,6 +81,13 @@ func _on_inventory_item_gui_input(event: InputEvent):
|
||||
global_id,
|
||||
event
|
||||
)
|
||||
# Make sure fast right clicks in the inventory aren't ignored
|
||||
elif event.button_index == BUTTON_RIGHT:
|
||||
emit_signal(
|
||||
"mouse_right_inventory_item",
|
||||
global_id,
|
||||
event
|
||||
)
|
||||
else:
|
||||
if event.is_pressed():
|
||||
if event.button_index == BUTTON_LEFT:
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
slot_ui_scene = ExtResource( 2 )
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
@@ -29,7 +32,7 @@ __meta__ = {
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
|
||||
margin_right = 623.0
|
||||
margin_bottom = 276.0
|
||||
margin_bottom = 336.0
|
||||
size_flags_vertical = 3
|
||||
scroll_horizontal_enabled = false
|
||||
__meta__ = {
|
||||
@@ -38,7 +41,7 @@ __meta__ = {
|
||||
|
||||
[node name="slots" type="VBoxContainer" parent="VBoxContainer/ScrollContainer"]
|
||||
margin_right = 623.0
|
||||
margin_bottom = 276.0
|
||||
margin_bottom = 336.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
@@ -46,9 +49,9 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="back" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 280.0
|
||||
margin_top = 340.0
|
||||
margin_right = 623.0
|
||||
margin_bottom = 300.0
|
||||
margin_bottom = 360.0
|
||||
text = "OPTIONS_BACK"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
||||
@@ -14,7 +14,7 @@ func _on_load_game_pressed():
|
||||
$load_game.show()
|
||||
|
||||
|
||||
# Show the optiset_gui_visible trueons panel
|
||||
# Show the options panel
|
||||
func _on_options_pressed():
|
||||
$main.hide()
|
||||
$options.show()
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="load_game" parent="." instance=ExtResource( 5 )]
|
||||
visible = false
|
||||
@@ -41,18 +44,18 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="main/main"]
|
||||
margin_top = 92.0
|
||||
margin_top = 162.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 318.0
|
||||
margin_bottom = 398.0
|
||||
texture = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="buttons" type="VBoxContainer" parent="main/main"]
|
||||
margin_top = 418.0
|
||||
margin_top = 498.0
|
||||
margin_right = 616.0
|
||||
margin_bottom = 658.0
|
||||
margin_bottom = 738.0
|
||||
custom_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
||||
@@ -25,9 +25,9 @@ __meta__ = {
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
margin_left = 391.0
|
||||
margin_top = 265.0
|
||||
margin_top = 340.0
|
||||
margin_right = 888.0
|
||||
margin_bottom = 460.0
|
||||
margin_bottom = 535.0
|
||||
size_flags_horizontal = 6
|
||||
custom_constants/margin_right = 20
|
||||
custom_constants/margin_top = 20
|
||||
@@ -144,9 +144,9 @@ margin_right = 457.0
|
||||
margin_bottom = 155.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 464.0
|
||||
margin_top = 539.0
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 404.0
|
||||
margin_bottom = 500
|
||||
custom_constants/separation = 20
|
||||
alignment = 1
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
extends CanvasLayer
|
||||
|
||||
onready var list = $VBoxContainer/hover_stack
|
||||
|
||||
func update() -> void:
|
||||
for e in list.get_children():
|
||||
list.remove_child(e)
|
||||
e.queue_free()
|
||||
if escoria.inputs_manager.hover_stack.empty():
|
||||
return
|
||||
for e in escoria.inputs_manager.hover_stack.get_all():
|
||||
var l = Label.new()
|
||||
l.text = e.global_id
|
||||
list.add_child(l)
|
||||
@@ -0,0 +1,27 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/ui_library/tools/hover_stack/hover_stack.gd" type="Script" id=1]
|
||||
|
||||
[node name="hover_stack_layer" type="CanvasLayer"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_top = 32.0
|
||||
margin_right = 99.0
|
||||
margin_bottom = 72.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="title" type="RichTextLabel" parent="VBoxContainer"]
|
||||
margin_right = 99.0
|
||||
margin_bottom = 18.0
|
||||
size_flags_vertical = 3
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "[u]Hover stack[/u]"
|
||||
text = "Hover stack"
|
||||
|
||||
[node name="hover_stack" type="VBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 22.0
|
||||
margin_right = 99.0
|
||||
margin_bottom = 40.0
|
||||
size_flags_vertical = 3
|
||||
Reference in New Issue
Block a user