Add dialogic

This commit is contained in:
snider committed 2022-08-13 19:33:12 -07:00
1 parent 89d4d3a29c
commit 2c47b309ae
603 files changed
+34501

No files matched your search

@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Templates/EventTemplate.tscn" type="PackedScene" id=1]
[node name="ExampleCustomEvent" instance=ExtResource( 1 )]
[node name="OptionsControl" parent="PanelContainer/MarginContainer/VBoxContainer/Header" index="7"]
items = [ "Move Up", null, 0, false, false, 0, 0, null, "", false, "Move Down", null, 0, false, false, 1, 0, null, "", false, "", null, 0, false, false, 2, 0, null, "", false, "Remove", null, 0, false, false, 3, 0, null, "", false ]
@@ -0,0 +1,33 @@
tool
extends "res://addons/dialogic/Editor/Events/Parts/EventPart.gd"
# has an event_data variable that stores the current data!!!
## node references
# e.g.
onready var input_field = $InputField
# used to connect the signals
func _ready():
# e.g.
input_field.connect("text_changed", self, "_on_InputField_text_changed")
pass
# called by the event block
func load_data(data:Dictionary):
# First set the event_data
.load_data(data)
# Now update the ui nodes to display the data.
# e.g.
input_field.text = event_data['my_text_key']
# has to return the wanted preview, only useful for body parts
func get_preview():
return ''
## EXAMPLE CHANGE IN ONE OF THE NODES
func _on_InputField_text_changed(text):
event_data['my_text_key'] = text
# informs the parent about the changes!
data_changed()
@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Text/CustomLineEdit.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/dialogic/Example Assets/CustomEvents/EventPart_Example.gd" type="Script" id=2]
[node name="EventPart_Example" type="HBoxContainer"]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="InputField" parent="." instance=ExtResource( 1 )]
margin_top = 6.0
margin_bottom = 33.0
@@ -0,0 +1,17 @@
extends Node
func handle_event(event_data, dialog_node):
"""
If this event should wait for dialog advance to occur, uncomment the WAITING line
If this event should block the dialog from continuing, uncomment the WAITINT_INPUT line
While other states exist, they generally are not neccesary, but include IDLE, TYPING, and ANIMATING
"""
#dialog_node.set_state(dialog_node.state.WAITING)
#dialog_node.set_state(dialog_node.state.WAITING_INPUT)
pass # fill with event action
# once you want to continue with the next event
dialog_node._load_next_event()
dialog_node.set_state(dialog_node.state.READY)