@@ -34,28 +34,29 @@ var shortcode_param_color : Color
3434var shortcode_value_color : Color
3535
3636func _init ():
37- # Load colors from editor settings
38- var editor_settings = DialogicUtil .get_dialogic_plugin ().editor_interface .get_editor_settings ()
39- normal_color = editor_settings .get ('text_editor/theme/highlighting/text_color' )
40- comment_color = editor_settings .get ('text_editor/theme/highlighting/comment_color' )
41- text_effect_color = normal_color .darkened (0.5 )
42- choice_color = editor_settings .get ('text_editor/theme/highlighting/function_color' )
43-
44- code_flow_color = editor_settings .get ("text_editor/theme/highlighting/control_flow_keyword_color" )
45- boolean_operator_color = code_flow_color .lightened (0.5 )
46- variable_color = editor_settings .get ('text_editor/theme/highlighting/engine_type_color' )
47- string_color = editor_settings .get ('text_editor/theme/highlighting/string_color' )
48-
49-
50- shortcode_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/annotation_color' )
51- shortcode_param_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/node_path_color' )
52- shortcode_value_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/node_reference_color' )
53-
54- keyword_VAR_color = editor_settings .get ('text_editor/theme/highlighting/keyword_color' )
55-
56- character_event_color = editor_settings .get ('text_editor/theme/highlighting/symbol_color' )
57- character_name_color = editor_settings .get ('text_editor/theme/highlighting/executing_line_color' )
58- character_portrait_color = character_name_color .lightened (0.6 )
37+ # Load colors from editor settings
38+ if DialogicUtil .get_dialogic_plugin ():
39+ var editor_settings = DialogicUtil .get_dialogic_plugin ().editor_interface .get_editor_settings ()
40+ normal_color = editor_settings .get ('text_editor/theme/highlighting/text_color' )
41+ comment_color = editor_settings .get ('text_editor/theme/highlighting/comment_color' )
42+ text_effect_color = normal_color .darkened (0.5 )
43+ choice_color = editor_settings .get ('text_editor/theme/highlighting/function_color' )
44+
45+ code_flow_color = editor_settings .get ("text_editor/theme/highlighting/control_flow_keyword_color" )
46+ boolean_operator_color = code_flow_color .lightened (0.5 )
47+ variable_color = editor_settings .get ('text_editor/theme/highlighting/engine_type_color' )
48+ string_color = editor_settings .get ('text_editor/theme/highlighting/string_color' )
49+
50+
51+ shortcode_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/annotation_color' )
52+ shortcode_param_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/node_path_color' )
53+ shortcode_value_color = editor_settings .get ('text_editor/theme/highlighting/gdscript/node_reference_color' )
54+
55+ keyword_VAR_color = editor_settings .get ('text_editor/theme/highlighting/keyword_color' )
56+
57+ character_event_color = editor_settings .get ('text_editor/theme/highlighting/symbol_color' )
58+ character_name_color = editor_settings .get ('text_editor/theme/highlighting/executing_line_color' )
59+ character_portrait_color = character_name_color .lightened (0.6 )
5960
6061 shortcode_regex .compile ("\\ W*\\ [(?<id>\\ w*)(?<args>[^\\ ]]*)?" )
6162 shortcode_param_regex .compile ('((?<parameter>[^\\ s=]*)\\ s*=\\ s*"(?<value>([^=]|\\\\ =)*)(?<!\\\\ )")' )
0 commit comments