Skip to content

Commit

Permalink
Updated event_jump so visual editor works
Browse files Browse the repository at this point in the history
  • Loading branch information
kirbynator committed Jan 11, 2025
1 parent b754bad commit d1c7a60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/dialogic/Modules/Jump/event_jump.gd
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func get_label_suggestions(_filter:String="") -> Dictionary:
if timeline_identifier in DialogicResourceUtil.get_label_cache().keys():
for label in DialogicResourceUtil.get_label_cache()[timeline_identifier]:
suggestions[label] = {'value': label, 'tooltip':label, 'editor_icon': ["ArrowRight", "EditorIcons"]}
if _filter.begins_with("{"):
for var_path in DialogicUtil.list_variables(DialogicUtil.get_default_variables()):
suggestions["{"+var_path+"}"] = {'value':"{"+var_path+"}", 'icon':load("res://addons/dialogic/Editor/Images/Pieces/variable.svg")}
return suggestions


Expand All @@ -144,6 +147,8 @@ func _get_code_completion(CodeCompletionHelper:Node, TextNode:TextEdit, line:Str
if symbol == ' ' and line.count(' ') == 1:
CodeCompletionHelper.suggest_labels(TextNode, '', '\n', event_color.lerp(TextNode.syntax_highlighter.normal_color, 0.6))
CodeCompletionHelper.suggest_timelines(TextNode, CodeEdit.KIND_MEMBER, event_color.lerp(TextNode.syntax_highlighter.normal_color, 0.6))
if symbol == "{":
CodeCompletionHelper.suggest_variables(TextNode)
if symbol == '/':
CodeCompletionHelper.suggest_labels(TextNode, line.strip_edges().trim_prefix('jump ').trim_suffix('/'+String.chr(0xFFFF)).strip_edges(), '\n', event_color.lerp(TextNode.syntax_highlighter.normal_color, 0.6))

Expand Down

0 comments on commit d1c7a60

Please sign in to comment.