Added hover stack to manage overlapping Area2Ds
Added room selector in demo scenes Modified dialogues in room 1, fixed bug in room 8 and 9
This commit is contained in:
@@ -375,7 +375,7 @@ func change_scene(params, context, run_events=true):
|
||||
# Finally we add the setup on to of the events stack so that it is ran first
|
||||
run_event(events["setup"])
|
||||
|
||||
escoria.inputs_manager.is_hotspot_focused = false
|
||||
escoria.inputs_manager.hotspot_focused = ""
|
||||
if !scenes_cache_list.has(params[0]):
|
||||
scenes_cache_list.push_back(params[0])
|
||||
scenes_cache[room_scene.global_id] = params[0]
|
||||
@@ -431,7 +431,7 @@ func superpose_scene(params, context, run_events=true):
|
||||
get_node("/root").add_child(room_scene)
|
||||
|
||||
|
||||
escoria.inputs_manager.is_hotspot_focused = false
|
||||
escoria.inputs_manager.hotspot_focused = false
|
||||
if !scenes_cache_list.has(params[0]):
|
||||
scenes_cache_list.push_back(params[0])
|
||||
if room_scene.get("global_id"):
|
||||
|
||||
@@ -9,8 +9,8 @@ func get_class():
|
||||
ESCItem is a Sprite that defines an item, potentially interactive
|
||||
"""
|
||||
|
||||
signal mouse_entered_item(global_id)
|
||||
signal mouse_exited_item
|
||||
signal mouse_entered_item(item)
|
||||
signal mouse_exited_item(item)
|
||||
signal mouse_left_clicked_item(global_id)
|
||||
signal mouse_double_left_clicked_item(global_id)
|
||||
signal mouse_right_clicked_item(global_id)
|
||||
@@ -183,10 +183,10 @@ func manage_input(viewport : Viewport, event : InputEvent, shape_idx : int):
|
||||
|
||||
|
||||
func _on_mouse_entered():
|
||||
emit_signal("mouse_entered_item", global_id)
|
||||
emit_signal("mouse_entered_item", self)
|
||||
|
||||
func _on_mouse_exited():
|
||||
emit_signal("mouse_exited_item")
|
||||
emit_signal("mouse_exited_item", self)
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user