Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many Event Logic and Visual improvements #1060

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
48 changes: 19 additions & 29 deletions addons/dialogic/Editor/Events/BranchEnd.gd
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
@tool
extends Control

var resource
var parent_node

var end_control :Control

### the indent size
var indent_size = 45
var indent_size = 15
var current_indent_level = 1

func _ready():
$Icon.icon = get_theme_icon("GuiSpinboxUpdown", "EditorIcons")
parent_node_changed()
$ConditionButtons/Elif.pressed.connect(add_elif)
$ConditionButtons/Else.pressed.connect(add_else)
$Spacer.custom_minimum_size.x = 300*DialogicUtil.get_editor_scale()


func visual_select():
modulate = get_theme_color("accent_color", "Editor")
modulate = get_theme_color("warning_color", "Editor")


func visual_deselect():
modulate = Color(1,1,1,1)


func highlight():
modulate = get_theme_color("warning_color", "Editor")
modulate = parent_node.resource.event_color.lightened(0.5)


func unhighlight():
Expand All @@ -36,27 +39,14 @@ func set_indent(indent: int):

func parent_node_changed():
if parent_node:
if parent_node.resource is DialogicChoiceEvent:
$Label.text = "End of choice '"+parent_node.resource.Text+"'"
$ConditionButtons.hide()
elif parent_node.resource is DialogicConditionEvent:
if parent_node.resource.ConditionType != DialogicConditionEvent.ConditionTypes.ELSE:
$ConditionButtons.show()
$Label.text = "End of condition '"+parent_node.resource.Condition+"'"
else:
$ConditionButtons.hide()
$Label.text = "End of else"


func add_elif():
var timeline = find_parent('TimelineEditor')
if timeline:
timeline.add_condition_pressed(get_index()+1, DialogicConditionEvent.ConditionTypes.ELIF)
timeline.indent_events()

func add_else():
var timeline = find_parent('TimelineEditor')
if timeline:
timeline.add_condition_pressed(get_index()+1, DialogicConditionEvent.ConditionTypes.ELSE)
timeline.indent_events()
if end_control and end_control.has_method('refresh'):
end_control.refresh()

func add_end_control(control:Control):
add_child(control)
if "parent_resource" in control:
control.parent_resource = parent_node.resource
if control.has_method('refresh'):
control.refresh()
end_control = control

99 changes: 33 additions & 66 deletions addons/dialogic/Editor/Events/BranchEnd.tscn
Original file line number Diff line number Diff line change
@@ -1,75 +1,42 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=3 uid="uid://de13fdeebrkcb"]

[ext_resource path="res://addons/dialogic/Editor/Events/BranchEnd.gd" type="Script" id=1]
[ext_resource type="Script" path="res://addons/dialogic/Editor/Events/BranchEnd.gd" id="1"]

[sub_resource type="StyleBoxLine" id=1]
content_margin_left = 0.0
content_margin_right = 0.0
content_margin_top = 0.0
content_margin_bottom = 0.0
color = Color( 1, 1, 1, 1 )
grow_begin = -5.0
grow_end = -5.0
thickness = 2
[sub_resource type="Image" id="Image_cje5s"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 93, 93, 55, 255, 97, 97, 58, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 98, 98, 47, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 94, 94, 46, 255, 93, 93, 236, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}

[sub_resource type="ImageTexture" id="ImageTexture_sojvl"]
image = SubResource("Image_cje5s")

[node name="EndBranch" type="HBoxContainer"]
anchor_right = 1.0
margin_bottom = 40.0
rect_min_size = Vector2( 0, 40 )
offset_bottom = 48.0
mouse_filter = 0
script = ExtResource( 1 )
script = ExtResource("1")

[node name="Indent" type="Control" parent="."]
margin_bottom = 40.0

[node name="Space" type="Control" parent="."]
margin_left = 4.0
margin_right = 34.0
margin_bottom = 40.0
rect_min_size = Vector2( 30, 0 )

[node name="PanelContainer2" type="PanelContainer" parent="."]
margin_left = 38.0
margin_top = 20.0
margin_right = 212.0
margin_bottom = 20.0
size_flags_horizontal = 7
size_flags_vertical = 4
size_flags_stretch_ratio = 0.3
custom_styles/panel = SubResource( 1 )

[node name="Label" type="Label" parent="."]
margin_left = 216.0
margin_top = 13.0
margin_right = 303.0
margin_bottom = 27.0
text = "End of Branch"

[node name="ConditionButtons" type="HBoxContainer" parent="."]
margin_left = 307.0
margin_right = 438.0
margin_bottom = 40.0

[node name="Elif" type="Button" parent="ConditionButtons"]
margin_top = 10.0
margin_right = 60.0
margin_bottom = 30.0
size_flags_vertical = 4
text = "Add Elif"

[node name="Else" type="Button" parent="ConditionButtons"]
margin_left = 64.0
margin_top = 10.0
margin_right = 131.0
margin_bottom = 30.0
size_flags_vertical = 4
text = "Add Else"

[node name="PanelContainer" type="PanelContainer" parent="."]
margin_left = 442.0
margin_top = 20.0
margin_right = 1024.0
margin_bottom = 20.0
size_flags_horizontal = 7
offset_bottom = 48.0

[node name="Spacer" type="Control" parent="."]
custom_minimum_size = Vector2(300, 0)
offset_left = 4.0
offset_right = 304.0
offset_bottom = 48.0

[node name="Icon" type="Button" parent="."]
unique_name_in_owner = true
custom_minimum_size = Vector2(31, 0)
offset_left = 308.0
offset_top = 12.0
offset_right = 339.0
offset_bottom = 36.0
size_flags_vertical = 4
custom_styles/panel = SubResource( 1 )
mouse_filter = 1
icon = SubResource("ImageTexture_sojvl")
flat = true
15 changes: 10 additions & 5 deletions addons/dialogic/Editor/Events/EventNode/EventNode.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var collapsed = false
var editor_reference

### the indent size
var indent_size = 45
var indent_size = 15
var current_indent_level = 1

# Setting this to true will ignore the event while saving
Expand All @@ -52,10 +52,12 @@ func visual_select():


func visual_deselect():
if selected_style:
selected_style.hide()
selected_style.hide()


func is_selected() -> bool:
return selected_style.visible

# called by the timeline before adding it to the tree
func load_data(data):
resource = data
Expand Down Expand Up @@ -147,6 +149,7 @@ func focus():

func toggle_collapse(toggled):
collapsed = toggled
%CollapsedBody.visible = toggled
var timeline_editor = find_parent('TimelineEditor')
if (timeline_editor != null):
# @todo select item and clear selection is marked as "private" in TimelineEditor.gd
Expand Down Expand Up @@ -304,7 +307,7 @@ func _ready():
_set_event_icon(resource.get_icon())

%IconPanel.self_modulate = resource.event_color
%ExpandButton.button_pressed = resource.expand_by_default

_on_ExpandButton_toggled(resource.expand_by_default)
set_focus_mode(1) # Allowing this node to grab focus

Expand All @@ -320,8 +323,10 @@ func _ready():


func _on_ExpandButton_toggled(button_pressed):
%ExpandButton.button_pressed = button_pressed
expanded = button_pressed
body_container.visible = button_pressed
get_parent().get_parent().update()


func _on_EventNode_gui_input(event):
Expand All @@ -330,7 +335,7 @@ func _on_EventNode_gui_input(event):
if event is InputEventMouseButton and event.is_pressed() and event.button_index == 1:
grab_focus() # Grab focus to avoid copy pasting text or events
if event.double_click:
expanded = !expanded
_on_ExpandButton_toggled(!expanded)
# For opening the context menu
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
Expand Down
42 changes: 29 additions & 13 deletions addons/dialogic/Editor/Events/EventNode/EventNode.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5

[sub_resource type="Image" id="Image_xrgmo"]
[sub_resource type="Image" id="Image_vgcnl"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 93, 93, 55, 255, 97, 97, 58, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 98, 98, 47, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 94, 94, 46, 255, 93, 93, 236, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
Expand All @@ -22,14 +22,14 @@ data = {
"width": 16
}

[sub_resource type="ImageTexture" id="ImageTexture_axbsf"]
image = SubResource("Image_xrgmo")
[sub_resource type="ImageTexture" id="ImageTexture_mjdnk"]
image = SubResource("Image_vgcnl")

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_04k4j"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_qdmxb"]

[sub_resource type="Theme" id="Theme_g6f7f"]
PopupMenu/colors/font_color_hover = Color(0.44, 0.73, 0.98, 1)
PopupMenu/styles/hover = SubResource("StyleBoxEmpty_04k4j")
PopupMenu/styles/hover = SubResource("StyleBoxEmpty_qdmxb")
PopupMenu/styles/panel = ExtResource("5_wntx6")

[node name="EventNode" type="HBoxContainer"]
Expand Down Expand Up @@ -114,7 +114,7 @@ and [End branch] events.
[Choice]
[...]
[End branch]"
texture = SubResource("ImageTexture_axbsf")
texture = SubResource("ImageTexture_mjdnk")
stretch_mode = 5

[node name="TitleLabel" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer/Header"]
Expand Down Expand Up @@ -145,16 +145,30 @@ offset_left = 993.0
offset_right = 1017.0
offset_bottom = 24.0
toggle_mode = true
icon = SubResource("ImageTexture_axbsf")
icon = SubResource("ImageTexture_mjdnk")
flat = true

[node name="CollapseButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer/Header"]
unique_name_in_owner = true
visible = false
toggle_mode = true
icon = SubResource("ImageTexture_axbsf")
icon = SubResource("ImageTexture_mjdnk")
flat = true

[node name="CollapsedBody" type="HBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
offset_top = 28.0
offset_right = 1017.0
offset_bottom = 54.0

[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer/CollapsedBody"]
offset_right = 1017.0
offset_bottom = 26.0
size_flags_horizontal = 3
text = "Contains Events (currently hidden)"
horizontal_alignment = 1

[node name="Body" type="HBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
offset_top = 28.0
Expand All @@ -164,10 +178,12 @@ size_flags_horizontal = 3

[node name="BodySpacing" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer/Body"]
unique_name_in_owner = true
custom_minimum_size = Vector2(10, 0)
offset_right = 10.0

[node name="BodyContent" type="HFlowContainer" parent="PanelContainer/MarginContainer/VBoxContainer/Body"]
unique_name_in_owner = true
offset_left = 4.0
offset_left = 14.0
offset_right = 1017.0
size_flags_horizontal = 3
size_flags_vertical = 3
Expand All @@ -177,22 +193,22 @@ mouse_filter = 2
theme = SubResource("Theme_g6f7f")
item_count = 6
item_0/text = "Documentation"
item_0/icon = SubResource("ImageTexture_axbsf")
item_0/icon = SubResource("ImageTexture_mjdnk")
item_0/id = 0
item_1/text = ""
item_1/id = -1
item_1/separator = true
item_2/text = "Move up"
item_2/icon = SubResource("ImageTexture_axbsf")
item_2/icon = SubResource("ImageTexture_mjdnk")
item_2/id = 2
item_3/text = "Move down"
item_3/icon = SubResource("ImageTexture_axbsf")
item_3/icon = SubResource("ImageTexture_mjdnk")
item_3/id = 3
item_4/text = ""
item_4/id = -1
item_4/separator = true
item_5/text = "Delete"
item_5/icon = SubResource("ImageTexture_axbsf")
item_5/icon = SubResource("ImageTexture_mjdnk")
item_5/id = 5
script = ExtResource("8")

Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/Events/Fields/Array.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func set_value(value:Array):
child.queue_free()

for item in value:
var x = load(ArrayValue).instanciate()
var x = load(ArrayValue).instantiate()
%Values.add_child(x)
x.set_value(item)
x.value_changed.connect(recalculate_values)
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/Events/Fields/Array.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://btmy7ageqpyq1"]

[ext_resource type="PackedScene" path="res://addons/dialogic/Editor/Events/Fields/ArrayValue.tscn" id="1"]
[ext_resource type="PackedScene" uid="uid://ch4j2lesn1sis" path="res://addons/dialogic/Editor/Events/Fields/ArrayValue.tscn" id="1"]
[ext_resource type="Script" path="res://addons/dialogic/Editor/Events/Fields/Array.gd" id="2"]

[node name="Array" type="VBoxContainer"]
Expand Down
Loading