mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-22 03:53:48 +00:00
Updated dialogic
This commit is contained in:
parent
1d11462073
commit
cbb82512ee
483 changed files with 5743 additions and 2177 deletions
|
|
@ -19,7 +19,7 @@ var label_name := ""
|
|||
var timeline_identifier := "":
|
||||
get:
|
||||
if timeline:
|
||||
var identifier := DialogicResourceUtil.get_unique_identifier(timeline.resource_path)
|
||||
var identifier := timeline.get_identifier()
|
||||
if not identifier.is_empty():
|
||||
return identifier
|
||||
return timeline_identifier
|
||||
|
|
@ -95,7 +95,7 @@ func get_shortcode_parameters() -> Dictionary:
|
|||
return {
|
||||
#param_name : property_info
|
||||
"timeline" : {"property": "timeline_identifier", "default": null,
|
||||
"suggestions": get_timeline_suggestions},
|
||||
"suggestions": get_timeline_suggestions, "ext_file":true},
|
||||
"label" : {"property": "label_name", "default": ""},
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ func build_event_editor() -> void:
|
|||
'file_extension': '.dtl',
|
||||
'mode' : 2,
|
||||
'suggestions_func': get_timeline_suggestions,
|
||||
'editor_icon' : ["TripleBar", "EditorIcons"],
|
||||
'icon' : load("res://addons/dialogic/Editor/Images/Resources/timeline.svg"),
|
||||
'empty_text' : '(this timeline)',
|
||||
'autofocus' : true,
|
||||
})
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue