Skip to content

Commit 251fbc8

Browse files
committed
fixed change timeline event
1 parent 57c5747 commit 251fbc8

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

addons/dialogic/Editor/Events/Parts/ResourcePickers/Timelines/EventPart_TimelinePicker.gd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ onready var picker_menu = $MenuButton
99
# used to connect the signals
1010
func _ready():
1111
picker_menu.connect("about_to_show", self, "_on_PickerMenu_about_to_show")
12-
13-
12+
1413

1514
# called by the event block
1615
func load_data(data:Dictionary):
@@ -25,30 +24,35 @@ func load_data(data:Dictionary):
2524
else:
2625
picker_menu.text = 'Select Timeline'
2726

27+
2828
# has to return the wanted preview, only useful for body parts
2929
func get_preview():
3030
return ''
3131

32+
3233
# when an index is selected on one of the menus.
3334
func _on_PickerMenu_selected(index, menu):
3435
var text = menu.get_item_text(index)
3536
var metadata = menu.get_item_metadata(index)
3637
picker_menu.text = text
37-
3838
event_data['change_timeline'] = metadata['file']
39+
3940
# informs the parent about the changes!
4041
data_changed()
4142

43+
4244
func _on_PickerMenu_about_to_show():
4345
build_PickerMenu()
4446

47+
4548
func build_PickerMenu():
4649
picker_menu.get_popup().clear()
4750
var folder_structure = DialogicUtil.get_timelines_folder_structure()
4851

4952
## building the root level
5053
build_PickerMenuFolder(picker_menu.get_popup(), folder_structure, "MenuButton")
5154

55+
5256
# is called recursively to build all levels of the folder structure
5357
func build_PickerMenuFolder(menu:PopupMenu, folder_structure:Dictionary, current_folder_name:String):
5458
var index = 0

addons/dialogic/Nodes/dialog_node.gd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ func resize_main():
141141
func set_current_dialog(dialog_path: String):
142142
current_timeline = dialog_path
143143
dialog_script = DialogicResources.get_timeline_json(dialog_path)
144-
load_dialog()
144+
return load_dialog()
145+
145146

146147
func load_dialog():
147148
# All this parse events should be happening in the same loop ideally
@@ -155,6 +156,7 @@ func load_dialog():
155156

156157
dialog_script = parse_text_lines(dialog_script)
157158
dialog_script = parse_branches(dialog_script)
159+
return dialog_script
158160

159161
func parse_characters(dialog_script):
160162
var names = DialogicUtil.get_character_list()

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- You can now specify for how long to wait in `[nw]` events. `[nw=3]` or whatever number of seconds you want it to wait
33
- Fixed some issues with the CanvasLayer
44
- Fixed some issues when creating dialogs using GDScript
5+
- Fixed an issue when changing the current timeline
56
- Improved the internals of `MasterTree.gd` [[Jowan-Spooner](https://github.com/Jowan-Spooner)]
67
- Fixed some issues with the `[nw]` command [[Jowan-Spooner](https://github.com/Jowan-Spooner)]
78
- Improved the Timeline Editor performance when loading timelines

0 commit comments

Comments
 (0)