Skip to content

Commit 64b5edb

Browse files
More small fixes (#1692)
* Make sure layout scene doesn't require script * fix home page main text * More small improvements
1 parent 827cb33 commit 64b5edb

File tree

7 files changed

+121
-112
lines changed

7 files changed

+121
-112
lines changed

addons/dialogic/Editor/HomePage/home_page.tscn

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ corner_radius_top_right = 5
102102
corner_radius_bottom_right = 5
103103
corner_radius_bottom_left = 5
104104

105-
[sub_resource type="Image" id="Image_2imc3"]
105+
[sub_resource type="Image" id="Image_se8au"]
106106
data = {
107107
"data": PackedByteArray(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, 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, 94, 94, 127, 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, 94, 94, 127, 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, 94, 94, 127, 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, 255, 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, 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, 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, 94, 94, 54, 255, 94, 94, 57, 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, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 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, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 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, 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, 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),
108108
"format": "RGBA8",
@@ -111,8 +111,8 @@ data = {
111111
"width": 16
112112
}
113113

114-
[sub_resource type="ImageTexture" id="ImageTexture_udy8i"]
115-
image = SubResource("Image_2imc3")
114+
[sub_resource type="ImageTexture" id="ImageTexture_44g6t"]
115+
image = SubResource("Image_se8au")
116116

117117
[node name="HomePage" type="TextureRect"]
118118
self_modulate = Color(0, 0, 0, 0.2)
@@ -138,13 +138,13 @@ grow_vertical = 2
138138

139139
[node name="HomePageBox" type="VBoxContainer" parent="CenterContainer"]
140140
unique_name_in_owner = true
141-
custom_minimum_size = Vector2(450, 262.5)
141+
custom_minimum_size = Vector2(600, 350)
142142
layout_mode = 2
143143
theme_override_constants/separation = 0
144144

145145
[node name="TopPanel" type="Panel" parent="CenterContainer/HomePageBox"]
146146
unique_name_in_owner = true
147-
custom_minimum_size = Vector2(0, 75)
147+
custom_minimum_size = Vector2(0, 100)
148148
layout_mode = 2
149149
theme_override_styles/panel = SubResource("StyleBoxFlat_imi2d")
150150

@@ -233,7 +233,7 @@ unique_name_in_owner = true
233233
modulate = Color(1, 1, 1, 0.501961)
234234
layout_mode = 2
235235
size_flags_vertical = 8
236-
theme_override_font_sizes/font_size = 7
236+
theme_override_font_sizes/font_size = 10
237237
text = "2.0-Alpha-8 (for Godot 4.0.2 stable)"
238238
horizontal_alignment = 2
239239

@@ -305,8 +305,10 @@ layout_mode = 2
305305
size_flags_horizontal = 3
306306
theme_override_constants/separation = 15
307307

308+
[node name="Control" type="Control" parent="CenterContainer/HomePageBox/BottomPanel/ScrollContainer/HBoxContainer/CenterContainer2"]
309+
layout_mode = 2
310+
308311
[node name="WelcomeText" type="RichTextLabel" parent="CenterContainer/HomePageBox/BottomPanel/ScrollContainer/HBoxContainer/CenterContainer2"]
309-
visible = false
310312
layout_mode = 2
311313
theme_override_styles/normal = SubResource("StyleBoxEmpty_es88k")
312314
bbcode_enabled = true
@@ -359,5 +361,5 @@ grow_vertical = 0
359361
tooltip_text = "Check it out!"
360362
theme_override_styles/normal = SubResource("StyleBoxFlat_ckyhx")
361363
theme_override_styles/hover = SubResource("StyleBoxFlat_l1doy")
362-
icon = SubResource("ImageTexture_udy8i")
364+
icon = SubResource("ImageTexture_44g6t")
363365
expand_icon = true

addons/dialogic/Editor/TimelineEditor/TextEditor/CodeCompletionHelper.gd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,12 @@ func request_code_completion(force:bool, text:CodeEdit) -> void:
173173

174174

175175
# Helper that adds all characters as options
176-
func suggest_characters(text:CodeEdit, type := CodeEdit.KIND_MEMBER) -> void:
176+
func suggest_characters(text:CodeEdit, type := CodeEdit.KIND_MEMBER, text_event_start:=false) -> void:
177177
for character in text.timeline_editor.editors_manager.resource_helper.character_directory:
178-
text.add_code_completion_option(type, character, character, text.syntax_highlighter.character_name_color, load("res://addons/dialogic/Editor/Images/Resources/character.svg"))
179-
178+
if text_event_start and text.timeline_editor.editors_manager.resource_helper.character_directory[character].resource.portraits.is_empty():
179+
text.add_code_completion_option(type, character, character+': ', text.syntax_highlighter.character_name_color, load("res://addons/dialogic/Editor/Images/Resources/character.svg"))
180+
else:
181+
text.add_code_completion_option(type, character, character, text.syntax_highlighter.character_name_color, load("res://addons/dialogic/Editor/Images/Resources/character.svg"))
180182

181183
# Helper that adds all timelines as options
182184
func suggest_timelines(text:CodeEdit, type := CodeEdit.KIND_MEMBER, color:=Color()) -> void:

addons/dialogic/Modules/DefaultLayouts/Default/DialogicDefaultLayout.tscn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ box_animation_in = 1
270270
box_animation_out = 1
271271
box_animation_new_text = 1
272272
name_label_box_modulate = Color(0.00784314, 0.00784314, 0.00784314, 0.843137)
273-
autoadvance_progressbar = null
274273

275274
[node name="DialogicNode_BackgroundHolder" type="CanvasLayer" parent="."]
276275
layer = -1

addons/dialogic/Modules/LayoutEditor/layout_editor.gd

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -339,114 +339,114 @@ func load_layout_scene_customization(custom_scene_path:String, own_overrides:Dic
339339
var pck_scn := load(custom_scene_path)
340340
if pck_scn:
341341
scene = pck_scn.instantiate()
342-
if !scene:
343-
return
344342

345-
if own_overrides.is_empty():
346-
own_overrides = style_list[current_style].get('export_overrides', {})
343+
if scene and scene.script:
344+
if own_overrides.is_empty():
345+
own_overrides = style_list[current_style].get('export_overrides', {})
347346

348-
var current_grid :GridContainer
349-
var current_hbox :HBoxContainer
347+
var current_grid :GridContainer
348+
var current_hbox :HBoxContainer
350349

351-
var label_bg_style = get_theme_stylebox("CanvasItemInfoOverlay", "EditorStyles").duplicate()
352-
label_bg_style.content_margin_left = 5
353-
label_bg_style.content_margin_right = 5
354-
label_bg_style.content_margin_top = 5
355-
356-
357-
var current_group_name := ""
358-
customization_editor_info = {}
359-
for i in scene.script.get_script_property_list():
360-
if i['usage'] & PROPERTY_USAGE_CATEGORY:
361-
continue
350+
var label_bg_style = get_theme_stylebox("CanvasItemInfoOverlay", "EditorStyles").duplicate()
351+
label_bg_style.content_margin_left = 5
352+
label_bg_style.content_margin_right = 5
353+
label_bg_style.content_margin_top = 5
362354

363-
if i['usage'] & PROPERTY_USAGE_GROUP or current_hbox == null:
364-
var main_scroll = ScrollContainer.new()
365-
main_scroll.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
366-
current_hbox = HBoxContainer.new()
367-
current_hbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL
368-
current_hbox.size_flags_vertical = Control.SIZE_EXPAND_FILL
369-
main_scroll.add_child(current_hbox, true)
370-
main_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
371-
main_scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
372-
%ExportsTabs.add_child(main_scroll, true)
373-
current_grid = null
374-
if i['usage'] & PROPERTY_USAGE_GROUP:
375-
%ExportsTabs.set_tab_title(main_scroll.get_index(), i['name'])
355+
356+
var current_group_name := ""
357+
customization_editor_info = {}
358+
for i in scene.script.get_script_property_list():
359+
if i['usage'] & PROPERTY_USAGE_CATEGORY:
376360
continue
377-
else:
378-
%ExportsTabs.set_tab_title(main_scroll.get_index(), 'General')
379-
380-
if i['usage'] & PROPERTY_USAGE_SUBGROUP:
381-
var v_scroll := ScrollContainer.new()
382-
v_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
383-
v_scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
384-
if current_hbox.get_child_count():
385-
current_hbox.add_child(VSeparator.new())
386-
current_hbox.add_child(v_scroll, true)
387-
var v_box := VBoxContainer.new()
388-
v_box.size_flags_horizontal = Control.SIZE_EXPAND_FILL
389-
v_scroll.add_child(v_box, true)
390-
var title_label := Label.new()
391-
title_label.text = i['name']
392-
title_label.theme_type_variation = "DialogicSection"
393-
title_label.size_flags_horizontal = SIZE_EXPAND_FILL
394-
v_box.add_child(title_label, true)
395-
current_grid = GridContainer.new()
396-
current_grid.columns = 3
397-
v_box.add_child(current_grid, true)
398-
current_group_name = i['name'].to_snake_case()
399-
400-
if current_grid == null:
401-
var v_scroll := ScrollContainer.new()
402-
v_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
403-
current_hbox.add_child(v_scroll, true)
404-
current_grid = GridContainer.new()
405-
current_grid.columns = 3
406-
v_scroll.add_child(current_grid, true)
407-
408-
if i['usage'] & PROPERTY_USAGE_EDITOR:
409-
var label := Label.new()
410-
label.text = str(i['name'].trim_prefix(current_group_name)).capitalize()
411-
current_grid.add_child(label, true)
412-
413-
var scene_value = scene.get(i['name'])
414-
customization_editor_info[i['name']] = {}
415-
416-
if i['name'] in inherited_overrides:
417-
customization_editor_info[i['name']]['orig'] = str_to_var(inherited_overrides.get(i['name']))
418-
else:
419-
customization_editor_info[i['name']]['orig'] = scene_value
420361

421-
var current_value :Variant
422-
if i['name'] in own_overrides:
423-
current_value = str_to_var(own_overrides.get(i['name']))
424-
else:
425-
current_value = customization_editor_info[i['name']]['orig']
426-
427-
var input :Node = DialogicUtil.setup_script_property_edit_node(
428-
i, current_value,
429-
{'bool':_on_export_bool_submitted, 'color':_on_export_color_submitted, 'enum':_on_export_int_enum_submitted,
430-
'int':_on_export_number_submitted, 'float':_on_export_number_submitted, 'file':_on_export_file_submitted,
431-
'string':_on_export_input_text_submitted, "string_enum": _on_export_string_enum_submitted, 'vector2':_on_export_vector_submitted})
432-
433-
input.size_flags_horizontal = SIZE_EXPAND_FILL
434-
customization_editor_info[i['name']]['node'] = input
435-
436-
var reset := Button.new()
437-
reset.flat = true
438-
reset.icon = get_theme_icon("Reload", "EditorIcons")
439-
reset.tooltip_text = "Remove customization"
440-
customization_editor_info[i['name']]['reset'] = reset
441-
reset.disabled = current_value == customization_editor_info[i['name']]['orig']
442-
current_grid.add_child(reset)
443-
reset.pressed.connect(_on_export_override_reset.bind(i['name']))
444-
current_grid.add_child(input)
362+
if i['usage'] & PROPERTY_USAGE_GROUP or current_hbox == null:
363+
var main_scroll = ScrollContainer.new()
364+
main_scroll.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
365+
current_hbox = HBoxContainer.new()
366+
current_hbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL
367+
current_hbox.size_flags_vertical = Control.SIZE_EXPAND_FILL
368+
main_scroll.add_child(current_hbox, true)
369+
main_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
370+
main_scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
371+
%ExportsTabs.add_child(main_scroll, true)
372+
current_grid = null
373+
if i['usage'] & PROPERTY_USAGE_GROUP:
374+
%ExportsTabs.set_tab_title(main_scroll.get_index(), i['name'])
375+
continue
376+
else:
377+
%ExportsTabs.set_tab_title(main_scroll.get_index(), 'General')
378+
379+
if i['usage'] & PROPERTY_USAGE_SUBGROUP:
380+
var v_scroll := ScrollContainer.new()
381+
v_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
382+
v_scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
383+
if current_hbox.get_child_count():
384+
current_hbox.add_child(VSeparator.new())
385+
current_hbox.add_child(v_scroll, true)
386+
var v_box := VBoxContainer.new()
387+
v_box.size_flags_horizontal = Control.SIZE_EXPAND_FILL
388+
v_scroll.add_child(v_box, true)
389+
var title_label := Label.new()
390+
title_label.text = i['name']
391+
title_label.theme_type_variation = "DialogicSection"
392+
title_label.size_flags_horizontal = SIZE_EXPAND_FILL
393+
v_box.add_child(title_label, true)
394+
current_grid = GridContainer.new()
395+
current_grid.columns = 3
396+
v_box.add_child(current_grid, true)
397+
current_group_name = i['name'].to_snake_case()
398+
399+
if current_grid == null:
400+
var v_scroll := ScrollContainer.new()
401+
v_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
402+
current_hbox.add_child(v_scroll, true)
403+
current_grid = GridContainer.new()
404+
current_grid.columns = 3
405+
v_scroll.add_child(current_grid, true)
406+
407+
if i['usage'] & PROPERTY_USAGE_EDITOR:
408+
var label := Label.new()
409+
label.text = str(i['name'].trim_prefix(current_group_name)).capitalize()
410+
current_grid.add_child(label, true)
411+
412+
var scene_value = scene.get(i['name'])
413+
customization_editor_info[i['name']] = {}
414+
415+
if i['name'] in inherited_overrides:
416+
customization_editor_info[i['name']]['orig'] = str_to_var(inherited_overrides.get(i['name']))
417+
else:
418+
customization_editor_info[i['name']]['orig'] = scene_value
419+
420+
var current_value :Variant
421+
if i['name'] in own_overrides:
422+
current_value = str_to_var(own_overrides.get(i['name']))
423+
else:
424+
current_value = customization_editor_info[i['name']]['orig']
425+
426+
var input :Node = DialogicUtil.setup_script_property_edit_node(
427+
i, current_value,
428+
{'bool':_on_export_bool_submitted, 'color':_on_export_color_submitted, 'enum':_on_export_int_enum_submitted,
429+
'int':_on_export_number_submitted, 'float':_on_export_number_submitted, 'file':_on_export_file_submitted,
430+
'string':_on_export_input_text_submitted, "string_enum": _on_export_string_enum_submitted, 'vector2':_on_export_vector_submitted})
431+
432+
input.size_flags_horizontal = SIZE_EXPAND_FILL
433+
customization_editor_info[i['name']]['node'] = input
434+
435+
var reset := Button.new()
436+
reset.flat = true
437+
reset.icon = get_theme_icon("Reload", "EditorIcons")
438+
reset.tooltip_text = "Remove customization"
439+
customization_editor_info[i['name']]['reset'] = reset
440+
reset.disabled = current_value == customization_editor_info[i['name']]['orig']
441+
current_grid.add_child(reset)
442+
reset.pressed.connect(_on_export_override_reset.bind(i['name']))
443+
current_grid.add_child(input)
444+
445445
await get_tree().process_frame
446446
if %ExportsTabs.get_child_count() == 0:
447447
var note := Label.new()
448448
note.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
449-
note.text = "This layout has no exposed settings.\n\nIf this is a custom scene make sure to have the root script in @tool mode if you want @exported variables to show up here."
449+
note.text = "This layout has no exposed settings.\n\nIf this is a custom scene and you want to add settings, make sure to have a root script in @tool mode if you want @exported variables to show up here."
450450
note.theme_type_variation = 'DialogicHintText2'
451451
%ExportsTabs.add_child(note)
452452
%ExportsTabs.set_tab_title(0, "General")

addons/dialogic/Modules/Text/event_text.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func _get_code_completion(CodeCompletionHelper:Node, TextNode:TextEdit, line:Str
305305

306306

307307
func _get_start_code_completion(CodeCompletionHelper:Node, TextNode:TextEdit) -> void:
308-
CodeCompletionHelper.suggest_characters(TextNode, CodeEdit.KIND_CLASS)
308+
CodeCompletionHelper.suggest_characters(TextNode, CodeEdit.KIND_CLASS, true)
309309

310310

311311
func suggest_bbcode(text:CodeEdit):

addons/dialogic/Other/DialogicGameHandler.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ func start(timeline:Variant, label:Variant="") -> Node:
389389
scene = get_subsystem("Styles").add_layout_style()
390390
else:
391391
scene = _add_layout_node()
392+
else:
393+
scene = get_layout_node()
392394
Dialogic.clear(ClearFlags.KEEP_VARIABLES)
393395
Dialogic.start_timeline(timeline, label)
394396
return scene

addons/dialogic/Other/DialogicUtil.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ static func get_inheritance_style_list(style_name:String) -> Array:
235235

236236
static func apply_scene_export_overrides(node:Node, export_overrides:Dictionary) -> void:
237237
var default_info := get_scene_export_defaults(node)
238+
if !node.script:
239+
return
238240
var property_info :Array[Dictionary] = node.script.get_script_property_list()
239241
for i in property_info:
240242
if i['usage'] & PROPERTY_USAGE_EDITOR:
@@ -247,13 +249,15 @@ static func apply_scene_export_overrides(node:Node, export_overrides:Dictionary)
247249

248250

249251
static func get_scene_export_defaults(node:Node) -> Dictionary:
252+
if !node.script:
253+
return {}
254+
250255
if Engine.get_main_loop().has_meta('dialogic_scene_export_defaults') and \
251256
node.script.resource_path in Engine.get_main_loop().get_meta('dialogic_scene_export_defaults'):
252257
return Engine.get_main_loop().get_meta('dialogic_scene_export_defaults')[node.script.resource_path]
253258

254259
if !Engine.get_main_loop().has_meta('dialogic_scene_export_defaults'):
255260
Engine.get_main_loop().set_meta('dialogic_scene_export_defaults', {})
256-
257261
var defaults := {}
258262
var property_info :Array[Dictionary] = node.script.get_script_property_list()
259263
for i in property_info:

0 commit comments

Comments
 (0)