Hide items for dialog chooser. Fixes #59
This commit is contained in:
@@ -140,7 +140,6 @@ func _on_say_finished():
|
||||
|
||||
emit_signal("say_finished")
|
||||
|
||||
|
||||
func _on_say_visible():
|
||||
emit_signal("say_visible")
|
||||
|
||||
@@ -155,6 +154,7 @@ func _on_say_visible():
|
||||
func choose(dialog_player: Node, dialog: ESCDialog, type: String):
|
||||
_dialog_player = dialog_player
|
||||
|
||||
escoria.game_scene.close_inventory()
|
||||
state_machine.states_map["choices"].initialize(dialog_player, self, dialog, type)
|
||||
state_machine._change_state("choices")
|
||||
|
||||
@@ -166,11 +166,10 @@ func do_choose(dialog_player: Node, dialog: ESCDialog, type: String = "simple"):
|
||||
chooser = preload(\
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/chooser/simple.tscn"\
|
||||
).instance()
|
||||
|
||||
|
||||
dialog_player.add_child(chooser)
|
||||
chooser.set_dialog(dialog)
|
||||
chooser.show_chooser()
|
||||
|
||||
var option = yield(chooser, "option_chosen")
|
||||
dialog_player.remove_child(chooser)
|
||||
# MODIFIED FOR RETURN TO MONKEY UI
|
||||
|
||||
@@ -11,6 +11,8 @@ func initialize(dialog_player) -> void:
|
||||
|
||||
func enter():
|
||||
escoria.logger.trace(self, "Dialog State Machine: Entered 'finish'.")
|
||||
escoria.game_scene.open_inventory()
|
||||
|
||||
|
||||
|
||||
func update(_delta):
|
||||
|
||||
@@ -25,11 +25,9 @@ func show_inventory():
|
||||
$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,
|
||||
"visible",
|
||||
0,
|
||||
1,
|
||||
0.6
|
||||
)
|
||||
$FloatingInventory/InventoryTween.start()
|
||||
@@ -43,12 +41,10 @@ func hide_inventory():
|
||||
$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
|
||||
"visible",
|
||||
1,
|
||||
0,
|
||||
0.01
|
||||
)
|
||||
$FloatingInventory/InventoryTween.start()
|
||||
yield($FloatingInventory/InventoryTween,"tween_all_completed")
|
||||
|
||||
Reference in New Issue
Block a user