mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-15 08:43:47 +00:00
Updated dialogic
This commit is contained in:
parent
1d11462073
commit
cbb82512ee
483 changed files with 5743 additions and 2177 deletions
|
|
@ -17,3 +17,5 @@ func _apply_export_overrides() -> void:
|
|||
# apply layer
|
||||
set(&'layer', canvas_layer)
|
||||
set(&'follow_viewport_enabled', follow_viewport)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bcowue6w1sdxs
|
||||
uid://yivwmkfwrvfr
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cqpb3ie51rwl5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bcowue6w1sdxs" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_Default/default_layout_base.gd" id="1_ifsho"]
|
||||
[ext_resource type="Script" uid="uid://yivwmkfwrvfr" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_Default/default_layout_base.gd" id="1_ifsho"]
|
||||
|
||||
[node name="DefaultLayoutBase" type="CanvasLayer"]
|
||||
script = ExtResource("1_ifsho")
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ func _on_dialogic_text_event(info:Dictionary):
|
|||
|
||||
bubble_to_use.current_character = info.character
|
||||
bubble_to_use.node_to_point_at = node_to_point_at
|
||||
bubble_to_use.reset()
|
||||
if not bubble_to_use.visible:
|
||||
bubble_to_use.reset()
|
||||
if has_node('TextBubbleLayer'):
|
||||
get_node("TextBubbleLayer").bubble_apply_overrides(bubble_to_use)
|
||||
bubble_to_use.open()
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://dr53w8p0iwcn2
|
||||
uid://v8guu7n6gv8a
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://syki6k0e6aac"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dr53w8p0iwcn2" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd" id="1_urqwc"]
|
||||
[ext_resource type="Script" uid="uid://v8guu7n6gv8a" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd" id="1_urqwc"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_70ljh"]
|
||||
content_margin_left = 5.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://c7frh5xu7x34r
|
||||
uid://bqdylb4maacf0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c1k5m0w3r40xf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7frh5xu7x34r" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_FullBackground/full_background_layer.gd" id="1_tu40u"]
|
||||
[ext_resource type="Script" uid="uid://bisx1nk1bjyjc" path="res://addons/dialogic/Modules/Background/node_background_holder.gd" id="2_ghan2"]
|
||||
[ext_resource type="Script" uid="uid://bqdylb4maacf0" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_FullBackground/full_background_layer.gd" id="1_tu40u"]
|
||||
[ext_resource type="Script" uid="uid://oxcjhq2817c7" path="res://addons/dialogic/Modules/Background/node_background_holder.gd" id="2_ghan2"]
|
||||
|
||||
[node name="BackgroundLayer" type="Control"]
|
||||
layout_direction = 2
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ func _on_dialogic_display_dialog_text_meta_hover_ended(_meta:String) -> void:
|
|||
|
||||
func _apply_export_overrides() -> void:
|
||||
# Apply fonts
|
||||
var font: FontFile
|
||||
var font: Font
|
||||
var global_font_setting: String = get_global_setting(&"font", '')
|
||||
if font_use_global and ResourceLoader.exists(global_font_setting):
|
||||
font = load(global_font_setting)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://dbbd73i5odrjs
|
||||
uid://o2cnjam8bomr
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dsbwnp5hegnu3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dbbd73i5odrjs" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Glossary/glossary_popup_layer.gd" id="1_3nmfj"]
|
||||
[ext_resource type="Script" uid="uid://o2cnjam8bomr" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Glossary/glossary_popup_layer.gd" id="1_3nmfj"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a3cyk"]
|
||||
bg_color = Color(0.12549, 0.12549, 0.12549, 1)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://2amxe6fvddmu
|
||||
uid://67t6pr2eatac
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cuoywrmvda1yg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2amxe6fvddmu" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd" id="1_dgoja"]
|
||||
[ext_resource type="Script" uid="uid://67t6pr2eatac" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.gd" id="1_dgoja"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_upgjp"]
|
||||
content_margin_left = 5.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://jlhgg7cs1iap
|
||||
uid://gv8mqbjor5nu
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://lx24i8fl6uo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jlhgg7cs1iap" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.gd" id="1_4mqm3"]
|
||||
[ext_resource type="Script" uid="uid://gv8mqbjor5nu" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.gd" id="1_4mqm3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cuoywrmvda1yg" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/example_history_item.tscn" id="2_x1xgk"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1hdvb"]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bqc33k65j5ioy
|
||||
uid://dwml743wmb7mn
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cn674foxwedqu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bqc33k65j5ioy" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Input/full_advance_input_layer.gd" id="1_3cmha"]
|
||||
[ext_resource type="Script" uid="uid://do47nn7beuhn5" path="res://addons/dialogic/Modules/Text/node_input.gd" id="2_dxpjw"]
|
||||
[ext_resource type="Script" uid="uid://dwml743wmb7mn" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Input/full_advance_input_layer.gd" id="1_3cmha"]
|
||||
[ext_resource type="Script" uid="uid://ctog34kdg222q" path="res://addons/dialogic/Modules/Text/node_input.gd" id="2_dxpjw"]
|
||||
|
||||
[node name="FullAdvanceInputLayer" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bqfhagiyjgkf6"]
|
||||
[gd_resource type="StyleBoxFlat" load_steps=0 format=3 uid="uid://chjt73i3hjh1e"]
|
||||
|
||||
[resource]
|
||||
content_margin_left = 10.0
|
||||
|
|
@ -1 +1 @@
|
|||
uid://dmxeo7lm8ftsi
|
||||
uid://bk84r61kckpxa
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://by6waso0mjpjp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cfcx0of1aekhk" path="res://addons/dialogic/Modules/Character/node_portrait_container.gd" id="1_4jxq7"]
|
||||
[ext_resource type="Script" uid="uid://dmxeo7lm8ftsi" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/speaker_portrait_textbox_layer.gd" id="1_7jt4d"]
|
||||
[ext_resource type="Script" uid="uid://be3h8wr0w68dx" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="2_y0h34"]
|
||||
[ext_resource type="Script" uid="uid://ddkvkdb6nxtyi" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_11puy"]
|
||||
[ext_resource type="Script" uid="uid://bkfrnlul8c6cv" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="5_sr2qw"]
|
||||
[ext_resource type="Script" uid="uid://d0ptqnbudhkyj" path="res://addons/dialogic/Modules/Character/node_portrait_container.gd" id="1_4jxq7"]
|
||||
[ext_resource type="Script" uid="uid://bk84r61kckpxa" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/speaker_portrait_textbox_layer.gd" id="1_7jt4d"]
|
||||
[ext_resource type="Script" uid="uid://bak74s0kcr0ao" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="2_y0h34"]
|
||||
[ext_resource type="Script" uid="uid://drhfq6rmdeuri" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_11puy"]
|
||||
[ext_resource type="Script" uid="uid://dpv2dfiv5dhmr" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="5_sr2qw"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dmg1w"]
|
||||
bg_color = Color(0.254902, 0.254902, 0.254902, 1)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://i5l4pdftho0h
|
||||
uid://cjdvjwjrj86sj
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cvgf4c6gg0tsy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://i5l4pdftho0h" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_TextInput/text_input_layer.gd" id="1_7ahrn"]
|
||||
[ext_resource type="Script" uid="uid://rlnfypr752xa" path="res://addons/dialogic/Modules/TextInput/node_text_input.gd" id="1_mxdep"]
|
||||
[ext_resource type="Script" uid="uid://cjdvjwjrj86sj" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_TextInput/text_input_layer.gd" id="1_7ahrn"]
|
||||
[ext_resource type="Script" uid="uid://biqpjv0qyefvf" path="res://addons/dialogic/Modules/TextInput/node_text_input.gd" id="1_mxdep"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3dpjm"]
|
||||
content_margin_left = 15.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://0uxoslmpurip
|
||||
uid://cs2o12y1i6cti
|
||||
|
|
|
|||
|
|
@ -9,7 +9,12 @@ extends Control
|
|||
@onready var name_label_box: PanelContainer = (%NameLabelPanel as PanelContainer)
|
||||
@onready var name_label_holder: HBoxContainer = $DialogText/NameLabelPositioner
|
||||
|
||||
var node_to_point_at: Node = null
|
||||
var node_to_point_at: Node = null:
|
||||
set(val):
|
||||
node_to_point_at = val
|
||||
base_position = get_speaker_canvas_position() + base_direction * safe_zone
|
||||
position = base_position
|
||||
|
||||
var current_character: DialogicCharacter = null
|
||||
|
||||
var max_width := 300
|
||||
|
|
@ -36,13 +41,14 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func reset() -> void:
|
||||
set_process(false)
|
||||
scale = Vector2.ZERO
|
||||
modulate.a = 0.0
|
||||
|
||||
tail.points = []
|
||||
bubble_rect = Rect2(0,0,2,2)
|
||||
|
||||
base_position = get_speaker_canvas_position()
|
||||
base_position = get_speaker_canvas_position() + base_direction * safe_zone
|
||||
position = base_position
|
||||
|
||||
|
||||
|
|
@ -106,7 +112,7 @@ func close() -> void:
|
|||
|
||||
|
||||
func _on_dialog_text_started_revealing_text() -> void:
|
||||
_resize_bubble(get_base_content_size(), true)
|
||||
_resize_bubble(await get_base_content_size(), true)
|
||||
|
||||
|
||||
func _resize_bubble(content_size:Vector2, popup:=false) -> void:
|
||||
|
|
@ -137,25 +143,43 @@ func _on_question_shown(info:Dictionary) -> void:
|
|||
if !is_visible_in_tree():
|
||||
return
|
||||
|
||||
await get_tree().process_frame
|
||||
# Avoid choice_container's flickering(because some ticks will happen in
|
||||
# `await get_base_content_size()` which will make choice_container exist
|
||||
# at its old position for several tens of milliseconds).
|
||||
choice_container.modulate.a = 0
|
||||
|
||||
var content_size := get_base_content_size()
|
||||
var content_size := await get_base_content_size()
|
||||
content_size.y += choice_container.size.y
|
||||
content_size.x = max(content_size.x, choice_container.size.x)
|
||||
_resize_bubble(content_size)
|
||||
|
||||
# Now, choice_container has changed to its new position, so we can make it
|
||||
# actually show up.
|
||||
choice_container.modulate.a = 1
|
||||
|
||||
|
||||
func get_base_content_size() -> Vector2:
|
||||
var font: Font = text.get_theme_font(&"normal_font")
|
||||
return font.get_multiline_string_size(
|
||||
var text_width = font.get_multiline_string_size(
|
||||
text.get_parsed_text(),
|
||||
HORIZONTAL_ALIGNMENT_LEFT,
|
||||
max_width,
|
||||
text.get_theme_font_size(&"normal_font_size")
|
||||
)
|
||||
).x
|
||||
|
||||
# Let text use content's width, and let text auto shrink height to its content.
|
||||
text.size = Vector2(text_width, 0)
|
||||
await get_tree().process_frame
|
||||
|
||||
# Don't know why text.size.y != content's height,
|
||||
# so we re-set text.size.y to 0 to let text shrink to its content again.
|
||||
# Finally works this time.
|
||||
text.size.y = 0
|
||||
await get_tree().process_frame
|
||||
return text.size
|
||||
|
||||
|
||||
func add_choice_container(node:Container, alignment:=FlowContainer.ALIGNMENT_BEGIN) -> void:
|
||||
func add_choice_container(node:Container, alignment:=FlowContainer.ALIGNMENT_BEGIN, choices_button_path:="", maximum_choices:=5) -> void:
|
||||
if choice_container:
|
||||
choice_container.get_parent().remove_child(choice_container)
|
||||
choice_container.queue_free()
|
||||
|
|
@ -168,9 +192,21 @@ func add_choice_container(node:Container, alignment:=FlowContainer.ALIGNMENT_BEG
|
|||
|
||||
if node is HFlowContainer:
|
||||
(node as HFlowContainer).alignment = alignment
|
||||
|
||||
var choices_button: PackedScene = null
|
||||
if not choices_button_path.is_empty():
|
||||
if ResourceLoader.exists(choices_button_path):
|
||||
choices_button = (load(choices_button_path) as PackedScene)
|
||||
else:
|
||||
printerr("[Dialogic] Unable to load custom choice button from ", choices_button_path)
|
||||
|
||||
for i:int in range(5):
|
||||
choice_container.add_child(DialogicNode_ChoiceButton.new())
|
||||
for i:int in range(maximum_choices):
|
||||
var new_button : DialogicNode_ChoiceButton
|
||||
if choices_button == null:
|
||||
new_button = DialogicNode_ChoiceButton.new()
|
||||
else:
|
||||
new_button = (choices_button.instantiate() as DialogicNode_ChoiceButton)
|
||||
choice_container.add_child(new_button)
|
||||
if node is HFlowContainer:
|
||||
continue
|
||||
match alignment:
|
||||
|
|
@ -200,3 +236,11 @@ func get_speaker_canvas_position() -> Vector2:
|
|||
if node_to_point_at is CanvasItem:
|
||||
base_position = (node_to_point_at as CanvasItem).get_global_transform_with_canvas().origin
|
||||
return base_position
|
||||
|
||||
|
||||
## Changes the property of mouse filter of the bubble and its children (text and label).
|
||||
func change_mouse_filter(mouse_filter: Control.MouseFilter) -> void:
|
||||
mouse_filter = mouse_filter
|
||||
text.mouse_filter = mouse_filter
|
||||
name_label_box.mouse_filter = mouse_filter
|
||||
name_label_holder.mouse_filter = mouse_filter
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cgs1ywlncs4t8
|
||||
uid://bminl7x3r40vc
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cdw3feu6lc4yp
|
||||
uid://byskpb7ypvuab
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://dlx7jcvm52tyw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cgs1ywlncs4t8" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd" id="1_jdhpk"]
|
||||
[ext_resource type="Shader" uid="uid://cdw3feu6lc4yp" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gdshader" id="2_1mhvf"]
|
||||
[ext_resource type="Script" uid="uid://ddkvkdb6nxtyi" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_syv35"]
|
||||
[ext_resource type="Script" uid="uid://bkfrnlul8c6cv" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="4_7bm4b"]
|
||||
[ext_resource type="Script" uid="uid://be3h8wr0w68dx" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="6_5gd03"]
|
||||
[ext_resource type="Script" uid="uid://bminl7x3r40vc" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd" id="1_jdhpk"]
|
||||
[ext_resource type="Shader" uid="uid://byskpb7ypvuab" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gdshader" id="2_1mhvf"]
|
||||
[ext_resource type="Script" uid="uid://drhfq6rmdeuri" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_syv35"]
|
||||
[ext_resource type="Script" uid="uid://dpv2dfiv5dhmr" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="4_7bm4b"]
|
||||
[ext_resource type="Script" uid="uid://bak74s0kcr0ao" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="6_5gd03"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_0j8nu"]
|
||||
_data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), -1.0, 0.0, 1, 0]
|
||||
|
|
@ -79,6 +79,7 @@ offset_bottom = 12.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_colors/default_color = Color(0, 0, 0, 1)
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
visible_characters_behavior = 1
|
||||
script = ExtResource("3_syv35")
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ extends DialogicLayoutLayer
|
|||
@export_subgroup('Behaviour')
|
||||
@export var behaviour_distance: int = 50
|
||||
@export var behaviour_direction: Vector2 = Vector2(1, -1)
|
||||
@export var behaviour_mouse_filter: Control.MouseFilter
|
||||
|
||||
@export_group('Name Label')
|
||||
@export_subgroup("Name Label")
|
||||
|
|
@ -55,6 +56,10 @@ extends DialogicLayoutLayer
|
|||
@export var choices_layout_force_lines: bool = false
|
||||
@export_file('*.tres', "*.res") var choices_base_theme: String = ""
|
||||
|
||||
@export_subgroup('Behavior')
|
||||
@export var maximum_choices: int = 5
|
||||
@export_file('*.tscn') var choices_custom_button: String = ""
|
||||
|
||||
const TextBubble := preload("res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd")
|
||||
|
||||
var bubbles: Array[TextBubble] = []
|
||||
|
|
@ -93,7 +98,7 @@ func bubble_apply_overrides(bubble:TextBubble) -> void:
|
|||
if !bold_font.is_empty():
|
||||
rtl.add_theme_font_override(&"bold_font", load(bold_font) as Font)
|
||||
if !italic_font.is_empty():
|
||||
rtl.add_theme_font_override(&"italitc_font", load(italic_font) as Font)
|
||||
rtl.add_theme_font_override(&"italics_font", load(italic_font) as Font)
|
||||
if !bold_italic_font.is_empty():
|
||||
rtl.add_theme_font_override(&"bold_italics_font", load(bold_italic_font) as Font)
|
||||
bubble.set(&'max_width', text_max_width)
|
||||
|
|
@ -118,6 +123,7 @@ func bubble_apply_overrides(bubble:TextBubble) -> void:
|
|||
## BEHAVIOUR
|
||||
bubble.safe_zone = behaviour_distance
|
||||
bubble.base_direction = behaviour_direction
|
||||
bubble.change_mouse_filter(behaviour_mouse_filter)
|
||||
|
||||
|
||||
## NAME LABEL SETTINGS
|
||||
|
|
@ -148,9 +154,9 @@ func bubble_apply_overrides(bubble:TextBubble) -> void:
|
|||
|
||||
## CHOICE SETTINGS
|
||||
if choices_layout_force_lines:
|
||||
bubble.add_choice_container(VBoxContainer.new(), choices_layout_alignment)
|
||||
bubble.add_choice_container(VBoxContainer.new(), choices_layout_alignment, choices_custom_button, maximum_choices)
|
||||
else:
|
||||
bubble.add_choice_container(HFlowContainer.new(), choices_layout_alignment)
|
||||
bubble.add_choice_container(HFlowContainer.new(), choices_layout_alignment, choices_custom_button, maximum_choices)
|
||||
|
||||
var choice_theme: Theme = null
|
||||
if choices_base_theme.is_empty() or not ResourceLoader.exists(choices_base_theme):
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b0npb8ibpyhbx
|
||||
uid://dcae6nsh8fgtp
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d2it0xiap3gnt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0npb8ibpyhbx" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble_layer.gd" id="1_b37je"]
|
||||
[ext_resource type="Script" uid="uid://dcae6nsh8fgtp" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble_layer.gd" id="1_b37je"]
|
||||
|
||||
[node name="TextBubbleLayer" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ extends DialogicLayoutLayer
|
|||
@export_file("*.wav", "*.ogg", "*.mp3") var sounds_hover: String = "res://addons/dialogic/Example Assets/sound-effects/typing2.wav"
|
||||
@export_file("*.wav", "*.ogg", "*.mp3") var sounds_focus: String = "res://addons/dialogic/Example Assets/sound-effects/typing4.wav"
|
||||
|
||||
@export_group('Choices')
|
||||
@export_subgroup('Behavior')
|
||||
@export var maximum_choices: int = 10
|
||||
@export_file('*.tscn') var choices_custom_button: String = ""
|
||||
|
||||
func get_choices() -> VBoxContainer:
|
||||
return $Choices
|
||||
|
||||
|
|
@ -96,20 +101,36 @@ func _apply_export_overrides() -> void:
|
|||
if ResourceLoader.exists(boxes_stylebox_focused):
|
||||
layer_theme.set_stylebox(&'focus', &'Button', load(boxes_stylebox_focused) as StyleBox)
|
||||
|
||||
get_choices().add_theme_constant_override(&"separation", boxes_v_separation)
|
||||
var choices : Control = get_choices()
|
||||
choices.add_theme_constant_override(&"separation", boxes_v_separation)
|
||||
self.position = boxes_offset
|
||||
|
||||
for child: Node in get_choices().get_children():
|
||||
if not child is DialogicNode_ChoiceButton:
|
||||
continue
|
||||
var choice: DialogicNode_ChoiceButton = child as DialogicNode_ChoiceButton
|
||||
# replace choice buttons and apply settings
|
||||
for child: Node in choices.get_children():
|
||||
if child is DialogicNode_ChoiceButton:
|
||||
child.queue_free()
|
||||
|
||||
var choices_button: PackedScene = null
|
||||
if not choices_custom_button.is_empty():
|
||||
if ResourceLoader.exists(choices_custom_button):
|
||||
choices_button = (load(choices_custom_button) as PackedScene)
|
||||
else:
|
||||
printerr("[Dialogic] Unable to load custom choice button from ", choices_custom_button)
|
||||
|
||||
for i in range(0, maximum_choices):
|
||||
var new_choice : DialogicNode_ChoiceButton
|
||||
if choices_button != null:
|
||||
new_choice = (choices_button.instantiate() as DialogicNode_ChoiceButton)
|
||||
else:
|
||||
new_choice = DialogicNode_ChoiceButton.new()
|
||||
choices.add_child(new_choice)
|
||||
|
||||
if boxes_fill_width:
|
||||
choice.size_flags_horizontal = Control.SIZE_FILL
|
||||
new_choice.size_flags_horizontal = Control.SIZE_FILL
|
||||
else:
|
||||
choice.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
new_choice.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
|
||||
choice.custom_minimum_size = boxes_min_size
|
||||
new_choice.custom_minimum_size = boxes_min_size
|
||||
|
||||
|
||||
set(&'theme', layer_theme)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://c8we4ppbftu0e
|
||||
uid://ij0qm2ew6plv
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dhk6j6eb6e3q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c8we4ppbftu0e" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/vn_choice_layer.gd" id="1_kurgw"]
|
||||
[ext_resource type="Script" uid="uid://bcirqrep7rvr4" path="res://addons/dialogic/Modules/Choice/node_choice_button.gd" id="1_w632k"]
|
||||
[ext_resource type="Script" uid="uid://bijk2aslmrx2r" path="res://addons/dialogic/Modules/Choice/node_button_sound.gd" id="2_mgko6"]
|
||||
[ext_resource type="Script" uid="uid://ij0qm2ew6plv" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/vn_choice_layer.gd" id="1_kurgw"]
|
||||
[ext_resource type="Script" uid="uid://bldt7xlfum7ov" path="res://addons/dialogic/Modules/Choice/node_choice_button.gd" id="1_w632k"]
|
||||
[ext_resource type="Script" uid="uid://b1stj4ljd2vo7" path="res://addons/dialogic/Modules/Choice/node_button_sound.gd" id="2_mgko6"]
|
||||
[ext_resource type="AudioStream" uid="uid://b6c1p14bc20p1" path="res://addons/dialogic/Example Assets/sound-effects/typing1.wav" id="3_mql8i"]
|
||||
[ext_resource type="AudioStream" uid="uid://c2viukvbub6v6" path="res://addons/dialogic/Example Assets/sound-effects/typing4.wav" id="4_420fr"]
|
||||
|
||||
|
|
@ -35,61 +35,6 @@ mouse_filter = 2
|
|||
alignment = 1
|
||||
metadata/_edit_layout_mode = 1
|
||||
|
||||
[node name="DialogicNode_ChoiceButton1" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton2" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton3" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton4" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton5" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton6" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton7" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton8" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton9" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton10" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ChoiceButton11" type="Button" parent="Choices"]
|
||||
layout_mode = 2
|
||||
text = "Some text"
|
||||
script = ExtResource("1_w632k")
|
||||
|
||||
[node name="DialogicNode_ButtonSound" type="AudioStreamPlayer" parent="Choices"]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("2_mgko6")
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cy6akeag2vjh4
|
||||
uid://cx1i44s2olq2d
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cy1y14inwkplb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cy6akeag2vjh4" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.gd" id="1_1i7em"]
|
||||
[ext_resource type="Script" uid="uid://cfcx0of1aekhk" path="res://addons/dialogic/Modules/Character/node_portrait_container.gd" id="1_rxdcc"]
|
||||
[ext_resource type="Script" uid="uid://cx1i44s2olq2d" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.gd" id="1_1i7em"]
|
||||
[ext_resource type="Script" uid="uid://d0ptqnbudhkyj" path="res://addons/dialogic/Modules/Character/node_portrait_container.gd" id="1_rxdcc"]
|
||||
|
||||
[node name="VN_PortraitLayer" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b1nyasc86bvlp
|
||||
uid://bfc03rn8slceu
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cd42pehtw2oq5
|
||||
uid://bklme8oymw6h7
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cyho51h8hmlrh
|
||||
uid://bl43m5qw8pso3
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
[gd_scene load_steps=17 format=3 uid="uid://bquja8jyk8kbr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cyho51h8hmlrh" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.gd" id="1_bpydr"]
|
||||
[ext_resource type="Script" uid="uid://b1nyasc86bvlp" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/animations.gd" id="2_xy7a2"]
|
||||
[ext_resource type="Script" uid="uid://ddkvkdb6nxtyi" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_4634k"]
|
||||
[ext_resource type="Script" uid="uid://bl43m5qw8pso3" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.gd" id="1_bpydr"]
|
||||
[ext_resource type="Script" uid="uid://bfc03rn8slceu" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/animations.gd" id="2_xy7a2"]
|
||||
[ext_resource type="Script" uid="uid://drhfq6rmdeuri" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="3_4634k"]
|
||||
[ext_resource type="Script" uid="uid://dpv2dfiv5dhmr" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="4_ma5mw"]
|
||||
[ext_resource type="Script" uid="uid://dve1vwse2peji" path="res://addons/dialogic/Modules/Text/node_next_indicator.gd" id="5_40a50"]
|
||||
[ext_resource type="Script" uid="uid://bklme8oymw6h7" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/autoadvance_indicator.gd" id="6_07xym"]
|
||||
[ext_resource type="StyleBox" uid="uid://dkv1pl1c1dq6" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_default_panel.tres" id="3_ssa84"]
|
||||
[ext_resource type="Script" uid="uid://bkfrnlul8c6cv" path="res://addons/dialogic/Modules/Text/node_type_sound.gd" id="4_ma5mw"]
|
||||
[ext_resource type="Script" uid="uid://dk0xy5qppo033" path="res://addons/dialogic/Modules/Text/node_next_indicator.gd" id="5_40a50"]
|
||||
[ext_resource type="Script" uid="uid://cd42pehtw2oq5" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/autoadvance_indicator.gd" id="6_07xym"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0rpqfg4fhebk" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/next.svg" id="6_uch03"]
|
||||
[ext_resource type="Script" uid="uid://be3h8wr0w68dx" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="7_bi7sh"]
|
||||
[ext_resource type="Script" uid="uid://bak74s0kcr0ao" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="7_bi7sh"]
|
||||
[ext_resource type="StyleBox" uid="uid://m7gyepkysu83" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_name_label_panel.tres" id="9_yg8ig"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_au0a2"]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
[gd_resource type="Resource" script_class="DialogicStyle" load_steps=18 format=3 uid="uid://dgkmuyvy5qc35"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c1k5m0w3r40xf" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_FullBackground/full_background_layer.tscn" id="1_sde84"]
|
||||
[ext_resource type="Script" uid="uid://dh4po8pgey4yv" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_i34tx"]
|
||||
[ext_resource type="Script" uid="uid://bwg6yncmh2cml" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_i34tx"]
|
||||
[ext_resource type="PackedScene" uid="uid://by6waso0mjpjp" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/textbox_with_speaker_portrait.tscn" id="3_epko4"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn674foxwedqu" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Input/full_advance_input_layer.tscn" id="4_8y2vo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsbwnp5hegnu3" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Glossary/glossary_popup_layer.tscn" id="5_ll78j"]
|
||||
[ext_resource type="PackedScene" uid="uid://dhk6j6eb6e3q" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/vn_choice_layer.tscn" id="6_36eid"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvgf4c6gg0tsy" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_TextInput/text_input_layer.tscn" id="7_hx5el"]
|
||||
[ext_resource type="PackedScene" uid="uid://lx24i8fl6uo" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_History/history_layer.tscn" id="8_00chv"]
|
||||
[ext_resource type="Script" uid="uid://dfja8ptqdlfix" path="res://addons/dialogic/Resources/dialogic_style.gd" id="9_sdr6x"]
|
||||
[ext_resource type="Script" uid="uid://dv08k6ljua6fm" path="res://addons/dialogic/Resources/dialogic_style.gd" id="9_sdr6x"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1cyj6"]
|
||||
script = ExtResource("2_i34tx")
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="DialogicStyle" load_steps=9 format=3 uid="uid://b0sbwssin2kuk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://syki6k0e6aac" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.tscn" id="1_a7s28"]
|
||||
[ext_resource type="Script" uid="uid://dfja8ptqdlfix" path="res://addons/dialogic/Resources/dialogic_style.gd" id="1_q3xp1"]
|
||||
[ext_resource type="Script" uid="uid://dv08k6ljua6fm" path="res://addons/dialogic/Resources/dialogic_style.gd" id="1_q3xp1"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2it0xiap3gnt" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble_layer.tscn" id="2_ctkoo"]
|
||||
[ext_resource type="Script" uid="uid://dh4po8pgey4yv" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="3_3a5cc"]
|
||||
[ext_resource type="Script" uid="uid://bwg6yncmh2cml" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="3_3a5cc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn674foxwedqu" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_Input/full_advance_input_layer.tscn" id="4_rr4hm"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_u2jf8"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="DialogicStyle" load_steps=20 format=3 uid="uid://8t1mr302tmqs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dfja8ptqdlfix" path="res://addons/dialogic/Resources/dialogic_style.gd" id="1_mvpc0"]
|
||||
[ext_resource type="Script" uid="uid://dh4po8pgey4yv" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_3b8ue"]
|
||||
[ext_resource type="Script" uid="uid://dv08k6ljua6fm" path="res://addons/dialogic/Resources/dialogic_style.gd" id="1_mvpc0"]
|
||||
[ext_resource type="Script" uid="uid://bwg6yncmh2cml" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_3b8ue"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1k5m0w3r40xf" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_FullBackground/full_background_layer.tscn" id="2_dtgi6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cy1y14inwkplb" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Portraits/vn_portrait_layer.tscn" id="4_q1t5h"]
|
||||
[ext_resource type="PackedScene" uid="uid://bquja8jyk8kbr" path="res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_layer.tscn" id="5_o6sv8"]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@tool
|
||||
extends DialogicIndexer
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bic8b0imerwgk
|
||||
uid://c1dc5xk6urgfg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue