mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-22 19:43:55 +00:00
Updated dialogic
This commit is contained in:
parent
1d11462073
commit
cbb82512ee
483 changed files with 5743 additions and 2177 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue