Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scenes/globals/mouse_manager/mouse_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func _ready() -> void:
Input.set_custom_mouse_cursor(MOUSE_CURSOR_CROSS, Input.CURSOR_CROSS, Vector2(32, 32))
Input.set_default_cursor_shape(Input.CURSOR_CROSS)

DialogueManager.dialogue_started.connect(_on_dialogue_started)
DialogueManager.dialogue_ended.connect(_on_dialogue_ended)


func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
Expand All @@ -22,3 +25,11 @@ func _input(event: InputEvent) -> void:

func _on_hide_timer_timeout() -> void:
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN


func _on_dialogue_started(_resource: DialogueResource) -> void:
Input.set_default_cursor_shape(Input.CURSOR_ARROW)


func _on_dialogue_ended(_resource: DialogueResource) -> void:
Input.set_default_cursor_shape(Input.CURSOR_CROSS)
6 changes: 0 additions & 6 deletions scenes/ui_elements/dialogue/components/balloon.gd
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ var _player_name: String = ""
func _ready() -> void:
balloon.hide()
Engine.get_singleton("DialogueManager").mutated.connect(_on_mutated)
Engine.get_singleton("DialogueManager").dialogue_ended.connect(_on_dialogue_ended)

# If the responses menu doesn't have a next action set, use this one
if responses_menu.next_action.is_empty():
Expand Down Expand Up @@ -113,7 +112,6 @@ func start(
resource = dialogue_resource
self.dialogue_line = await resource.get_next_dialogue_line(title, temporary_game_states)
talk_sound_player.play()
Input.set_default_cursor_shape(Input.CURSOR_ARROW)


## Apply any changes to the balloon given a new [DialogueLine].
Expand Down Expand Up @@ -190,10 +188,6 @@ func _on_mutated(_mutation: Dictionary) -> void:
mutation_cooldown.start(0.1)


func _on_dialogue_ended(_resource: DialogueResource) -> void:
Input.set_default_cursor_shape(Input.CURSOR_CROSS)


func _on_balloon_gui_input(event: InputEvent) -> void:
# See if we need to skip typing of the dialogue
if dialogue_label.is_typing:
Expand Down
Loading