diff --git a/scene/dialog/balloon.gd b/scene/dialog/balloon.gd index 2c5f5b15..1bb906e1 100755 --- a/scene/dialog/balloon.gd +++ b/scene/dialog/balloon.gd @@ -271,11 +271,18 @@ func _on_mutated(_mutation: Dictionary) -> void: func _on_balloon_gui_input(event: InputEvent) -> void: # 根据全局配置,是否允许忽略输入 + # ignore 的情况下不需要 block input if temporary_game_states.has(GlobalConfig.DIALOG_IGNORE_INPUT): - if event.is_action_pressed("interact") or event.is_action_pressed("cancel"): - get_viewport().set_input_as_handled() - return + if not GlobalConfig.DEBUG: + return + SceneManager.pop_debug_dialog_info("程序", "调试模式 DIALOG_IGNORE_INPUT 不生效") + if current_line_ban_skip: + # debug 模式下不禁用 + if not GlobalConfig.DEBUG: + return + SceneManager.pop_debug_dialog_info("程序", "调试模式当前行 #ban_skip 不生效") + if dialogue_line.responses.size() > 0: return @@ -302,12 +309,6 @@ func _on_balloon_gui_input(event: InputEvent) -> void: # elif event.is_action_pressed(next_action) and get_viewport().gui_get_focus_owner() == balloon: if event.is_action_pressed("interact") or event.is_action_pressed("cancel"): get_viewport().set_input_as_handled() - if current_line_ban_skip: - # debug 模式下不禁用 - if not GlobalConfig.DEBUG: - return - print("debug mode, #ban_skip is disabled") - SceneManager.pop_debug_dialog_info("程序", "调试模式 #ban_skip 不生效") manually_skipped_line.emit(dialogue_line.next_id) next(dialogue_line.next_id)