Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.9645 2.62927L12.8459 5.22444C12.6271 5.04546 12.3835 4.89134 12.1151 4.76208C11.8565 4.62287 11.5881 4.55327 11.3097 4.55327C11.0909 4.55327 10.8821 4.59802 10.6832 4.68751C10.4943 4.77699 10.3203 4.89631 10.1612 5.04546C10.0021 5.19461 9.86293 5.36364 9.74361 5.55256C9.6243 5.73154 9.52486 5.91052 9.44532 6.08949L9.14702 6.93964C9.35583 7.37714 9.55966 7.79475 9.75853 8.19248C9.92756 8.53055 10.1016 8.87359 10.2805 9.2216C10.4595 9.55966 10.6087 9.82813 10.728 10.027C10.9169 10.3153 11.1058 10.6136 11.2948 10.9219C11.4837 11.2202 11.6925 11.4936 11.9212 11.7422C12.0206 11.8516 12.1399 11.9261 12.2791 11.9659C12.4283 11.9957 12.5625 12.0107 12.6818 12.0107C12.8707 12.0107 13.0497 11.9858 13.2188 11.9361C13.3878 11.8864 13.5469 11.8217 13.696 11.7422L14.0689 12.2195C13.9297 12.4382 13.7607 12.657 13.5618 12.8757C13.3629 13.0945 13.1442 13.2933 12.9055 13.4723C12.6769 13.6513 12.4283 13.7955 12.1598 13.9048C11.9013 14.0242 11.6378 14.0838 11.3693 14.0838C11.1307 14.0838 10.9169 14.044 10.728 13.9645C10.549 13.8949 10.3849 13.8004 10.2358 13.6811C10.0867 13.5519 9.94745 13.4027 9.81819 13.2337C9.68893 13.0646 9.55469 12.8906 9.41549 12.7117C9.30611 12.5426 9.1868 12.3388 9.05753 12.1001C8.93822 11.8516 8.81393 11.598 8.68466 11.3395C8.5554 11.081 8.42614 10.8324 8.29688 10.5938C8.16762 10.3452 8.04333 10.1364 7.92401 9.96734C7.8743 10.1364 7.82955 10.3054 7.78978 10.4744C7.75001 10.6136 7.70526 10.7578 7.65555 10.907C7.60583 11.0561 7.56109 11.1705 7.52131 11.25C7.37216 11.5682 7.18324 11.8963 6.95455 12.2344C6.72586 12.5724 6.46236 12.8807 6.16407 13.1591C5.87572 13.4276 5.55753 13.6513 5.20952 13.8303C4.86151 13.9993 4.49361 14.0838 4.10583 14.0838C3.75782 14.0838 3.41975 14.0142 3.09162 13.875C2.7635 13.7457 2.46023 13.5717 2.18182 13.353L3.12145 10.8771C3.43964 11.076 3.78765 11.255 4.16549 11.4141C4.54333 11.5632 4.92117 11.6378 5.29901 11.6378C5.41833 11.6378 5.54262 11.6278 5.67188 11.608C5.80114 11.5781 5.92543 11.5384 6.04475 11.4886C6.17401 11.429 6.28836 11.3594 6.38779 11.2798C6.48722 11.1903 6.5618 11.0859 6.61151 10.9666C6.68111 10.8374 6.75569 10.6683 6.83523 10.4595C6.91478 10.2507 6.99432 10.0419 7.07387 9.8331C7.16336 9.59447 7.25285 9.34091 7.34234 9.07245L4.53836 4.5831C4.4091 4.43395 4.25001 4.31464 4.06109 4.22515C3.88211 4.12572 3.69319 4.076 3.49432 4.076C3.32529 4.076 3.1662 4.1108 3.01705 4.1804C2.8679 4.24006 2.72373 4.32458 2.58452 4.43395L2.18182 3.91194C2.32103 3.70313 2.48509 3.4993 2.67401 3.30043C2.87287 3.09162 3.08665 2.90768 3.31535 2.74859C3.54404 2.57955 3.78765 2.44532 4.04617 2.34589C4.30469 2.23651 4.56819 2.18182 4.83665 2.18182C5.16478 2.18182 5.46805 2.26634 5.74645 2.43537C6.02486 2.59447 6.28339 2.79333 6.52202 3.03197C6.76066 3.2706 6.97941 3.52912 7.17827 3.80753C7.37714 4.08594 7.55611 4.34447 7.7152 4.5831C7.79475 4.69248 7.87927 4.83168 7.96876 5.00072C8.06819 5.15981 8.16265 5.3189 8.25214 5.47799C8.36151 5.65697 8.46591 5.85086 8.56535 6.05966C8.66478 5.82103 8.76918 5.58239 8.87856 5.34376C8.96805 5.14489 9.05753 4.94106 9.14702 4.73225C9.24645 4.5135 9.33594 4.32458 9.41549 4.16549C9.56464 3.88708 9.73367 3.62856 9.92259 3.38992C10.1115 3.15128 10.3203 2.94248 10.549 2.7635C10.7876 2.58452 11.0462 2.44532 11.3246 2.34589C11.603 2.23651 11.9063 2.18182 12.2344 2.18182C12.5426 2.18182 12.8409 2.2216 13.1293 2.30114C13.4176 2.38069 13.696 2.49006 13.9645 2.62927Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ckilxvwc34s84"
path="res://.godot/imported/definition.svg-6038fa05034518bb2a507ec3819f9288.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Events/Variable/definition.svg"
dest_files=["res://.godot/imported/definition.svg-6038fa05034518bb2a507ec3819f9288.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,204 @@
@tool
class_name DialogicVariableEvent
extends DialogicEvent
## Event that allows changing a dialogic variable or a property of an autoload.
enum Operations {Set, Add, Substract, Multiply, Divide}
## Settings
## Name/Path of the variable that should be changed.
var name: String = ""
## The operation to perform.
var operation: int = Operations.Set
## The value that is used. Can be a variable as well.
var value: String = ""
## If true, a random number between [random_min] and [random_max] is used instead of [value].
var random_enabled: bool = false
var random_min: int = 0
var random_max: int = 100
################################################################################
## EXECUTE
################################################################################
func _execute() -> void:
if name:
var orig = dialogic.VAR.get_variable(name)
var the_value = value
if value.begins_with("{"):
the_value = dialogic.VAR.get_variable(value)
if random_enabled:
the_value = randi()%(random_max-random_min)+random_min
if orig != null:
if Dialogic.has_subsystem('History'):
if Dialogic.History.full_history_enabled:
Dialogic.History.full_history[0]['previous_value'] = orig
if operation != Operations.Set and orig.is_valid_float() and value.is_valid_float():
orig = orig.to_float()
the_value = value.to_float()
match operation:
Operations.Add:
dialogic.VAR.set_variable(name, str(orig+the_value))
Operations.Substract:
dialogic.VAR.set_variable(name, str(orig-the_value))
Operations.Multiply:
dialogic.VAR.set_variable(name, str(orig*the_value))
Operations.Divide:
dialogic.VAR.set_variable(name, str(orig/the_value))
elif operation == Operations.Set:
dialogic.VAR.set_variable(name, str(the_value))
else:
printerr("Dialogic: Set Variable event failed because one value wasn't a float!")
finish()
################################################################################
## INITIALIZE
################################################################################
func _init() -> void:
event_name = "Set Variable"
set_default_color('Color1')
event_category = Category.Godot
event_sorting_index = 0
expand_by_default = false
################################################################################
## SAVING/LOADING
################################################################################
func to_text() -> String:
var string = "VAR "
if name:
string += "{" + name + "}"
match operation:
Operations.Set:
string+= " = "
Operations.Add:
string+= " += "
Operations.Substract:
string+= " -= "
Operations.Multiply:
string+= " *= "
Operations.Divide:
string+= " /= "
string += value
if random_enabled:
string += ' [random="True"'
if random_min != 0:
string += ' min="'+str(random_min)+'"'
if random_max != 100:
string += ' max="'+str(random_max)+'"'
string += "]"
return string
func from_text(string:String) -> void:
var reg = RegEx.new()
reg.compile("VAR (?<name>[^=+\\-*\\/]*)(?<operation>=|\\+=|-=|\\*=|\\/=)(?<value>[^\\[\\n]*)(?<shortcode>\\[.*)?")
var result = reg.search(string)
name = result.get_string('name').strip_edges().replace("{", "").replace("}", "")
match result.get_string('operation').strip_edges():
'=':
operation = Operations.Set
'-=':
operation = Operations.Substract
'+=':
operation = Operations.Add
'*=':
operation = Operations.Multiply
'/=':
operation = Operations.Divide
value = result.get_string('value').strip_edges()
if !result.get_string('shortcode').is_empty():
var shortcodeparams = parse_shortcode_parameters(result.get_string('shortcode'))
random_enabled = true if shortcodeparams.get('random', "True") == "True" else false
random_min = DialogicUtil.logical_convert(shortcodeparams.get('min', 0))
random_max = DialogicUtil.logical_convert(shortcodeparams.get('max', 100))
func is_valid_event(string:String) -> bool:
return string.begins_with('VAR ')
################################################################################
## EDITOR REPRESENTATION
################################################################################
func build_event_editor():
add_header_edit('name', ValueType.ComplexPicker, '', '',
{'suggestions_func' : get_var_suggestions,
'editor_icon' : ["ClassList", "EditorIcons"]})
add_header_edit('operation', ValueType.FixedOptionSelector, '', '', {
'selector_options': [
{
'label': 'to be',
'icon': load("res://addons/dialogic/Editor/Images/Dropdown/set.svg"),
'value': Operations.Set
},
{
'label': 'to itself plus',
'icon': load("res://addons/dialogic/Editor/Images/Dropdown/plus.svg"),
'value': Operations.Add
},
{
'label': 'to itself minus',
'icon': load("res://addons/dialogic/Editor/Images/Dropdown/minus.svg"),
'value': Operations.Substract
},
{
'label': 'to itself multiplied by',
'icon': load("res://addons/dialogic/Editor/Images/Dropdown/multiply.svg"),
'value': Operations.Multiply
},
{
'label': 'to itself divided by',
'icon': load("res://addons/dialogic/Editor/Images/Dropdown/divide.svg"),
'value': Operations.Divide
}
]
}, '!name.is_empty()')
add_header_edit('value', ValueType.ComplexPicker, '', '',
{'suggestions_func' : get_value_suggestions,
'editor_icon' : ["Variant", "EditorIcons"], },
'!name.is_empty() and not random_enabled')
add_header_label('a random integer', 'random_enabled')
add_header_button('', _on_variable_editor_pressed, 'Variable Editor', ["EditAddRemove", "EditorIcons"])
add_body_edit('random_enabled', ValueType.Bool, 'Use Random Integer:', '', {}, '!name.is_empty()')
add_body_edit('random_min', ValueType.Integer, 'Min:', '', {}, '!name.is_empty() and random_enabled')
add_body_edit('random_max', ValueType.Integer, 'Max:', '', {}, '!name.is_empty() and random_enabled')
func get_var_suggestions(filter:String) -> Dictionary:
var suggestions := {}
if filter:
suggestions[filter] = {'value':filter, 'editor_icon':["GuiScrollArrowRight", "EditorIcons"]}
var vars: Dictionary = DialogicUtil.get_project_setting('dialogic/variables', {})
for var_path in DialogicUtil.list_variables(vars):
suggestions[var_path] = {'value':var_path, 'editor_icon':["ClassList", "EditorIcons"]}
return suggestions
func get_value_suggestions(filter:String) -> Dictionary:
var suggestions := {}
if filter:
suggestions[filter] = {'value':filter, 'editor_icon':["GuiScrollArrowRight", "EditorIcons"]}
var vars: Dictionary = DialogicUtil.get_project_setting('dialogic/variables', {})
for var_path in DialogicUtil.list_variables(vars):
suggestions[var_path] = {'value':var_path, 'editor_icon':["ClassList", "EditorIcons"]}
return suggestions
func _on_variable_editor_pressed():
var editor_manager := _editor_node.find_parent('EditorsManager')
if editor_manager:
editor_manager.open_editor(editor_manager.editors['Settings']['node'], true, 'VariablesEditor')

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://xt46jy62513i"
path="res://.godot/imported/icon.png-64496f025b1c58e852f9d6608cd94429.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Events/Variable/icon.png"
dest_files=["res://.godot/imported/icon.png-64496f025b1c58e852f9d6608cd94429.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,14 @@
@tool
extends DialogicIndexer
func _get_events() -> Array:
return [this_folder.path_join('event_variable.gd')]
func _get_subsystems() -> Array:
return [{'name':'VAR', 'script':this_folder.path_join('subsystem_variables.gd')}]
func _get_settings_pages() -> Array:
return [this_folder.path_join('variables_editor/settings_variables.tscn')]

View file

@ -0,0 +1,190 @@
extends DialogicSubsystem
####################################################################################################
## STATE
####################################################################################################
func clear_game_state():
# loading default variables
dialogic.current_state_info['variables'] = DialogicUtil.get_project_setting('dialogic/variables', {})
func load_game_state():
dialogic.current_state_info['variables'] = merge_folder(dialogic.current_state_info['variables'], DialogicUtil.get_project_setting('dialogic/variables', {}))
func merge_folder(new, defs) -> Dictionary:
# also go through all groups in this folder
for x in new.keys():
if x in defs and typeof(new[x]) == TYPE_DICTIONARY:
new[x] = merge_folder(new[x], defs[x])
# add all new variables
for x in defs.keys():
if not x in new:
new[x] = defs[x]
return new
####################################################################################################
## MAIN METHODS
####################################################################################################
func parse_variables(text:String) -> String:
# This function will try to get the value of variables provided inside curly brackets
# and replace them with their values.
# It will:
# - look for the strings to replace
# - search all tree nodes (autoloads)
# - try to get the value from context
#
# So if you provide a string like `Hello, how are you doing {Game.player_name}
# it will try to search for an autoload with the name `Game` and get the value
# of `player_name` to replace it.
if '{' in text: # Otherwise, why bother?
# Trying to extract the curly brackets from the text
var regex = RegEx.new()
regex.compile("\\{(?<variable>[^{}]*)\\}")
var parsed = text
for result in regex.search_all(text):
var value = get_variable(result.get_string('variable'), "<NOT FOUND>")
parsed = parsed.replace("{"+result.get_string('variable')+"}", str(value))
return parsed
return text
func set_variable(variable_name: String, value: String) -> bool:
if variable_name.left(1) == "{" and variable_name.right(1) == "}":
variable_name = variable_name.substr(1,variable_name.length()-2)
# Getting all the autoloads
var autoloads = get_autoloads()
if '.' in variable_name:
var query = variable_name.split('.')
var from = query[0]
var variable = query[1]
for a in autoloads:
if a.name == from:
a.set(variable, value)
return true
# if none is found, try getting it from the dialogic variables
_set_value_in_dictionary(variable_name, dialogic.current_state_info['variables'], value)
if variable_name in dialogic.current_state_info['variables'].keys():
if typeof(dialogic.current_state_info['variables'][variable_name]) == TYPE_STRING:
dialogic.current_state_info['variables'][variable_name] = value
return true
else:
printerr("Dialogic: Tried accessing non-existant variable '"+variable_name+"'.")
return false
func get_variable(variable_path:String, default = null) -> Variant:
if variable_path.left(1) == "{" and variable_path.right(1) == "}":
variable_path = variable_path.substr(1,variable_path.length()-2)
# Getting all the autoloads
var autoloads = get_autoloads()
if variable_path in dialogic.current_state_info['variables'].keys():
return dialogic.current_state_info['variables'][variable_path]
if '.' in variable_path:
var query = variable_path.split('.')
var from = query[0]
var variable = query[1]
for a in autoloads:
if a.name == from:
var myvar = a.get(variable)
if myvar != null:
return myvar
else:
printerr("Dialogic: Tried accessing non-existant variable '"+variable_path+"'.")
return default
# if none is found, try getting it from the dialogic variables
var value = _get_value_in_dictionary(variable_path, dialogic.current_state_info['variables'])
if value != null:
return value
else:
printerr("Dialogic: Tried accessing non-existant variable '"+variable_path+"'.")
return default
else:
printerr("Dialogic: Tried accessing non-existant variable '"+variable_path+"'.")
return default
# this will set a value in a dictionary (or a sub-dictionary based on the path)
# e.g. it could set "Something.Something.Something" in {'Something':{'Something':{'Someting':"value"}}}
func _set_value_in_dictionary(path:String, dictionary:Dictionary, value):
if '.' in path:
var from = path.split('.')[0]
if from in dictionary.keys():
dictionary[from] = _set_value_in_dictionary(path.trim_prefix(from+"."), dictionary[from], value)
else:
if path in dictionary.keys():
dictionary[path] = value
return dictionary
# this will get a value in a dictionary (or a sub-dictionary based on the path)
# e.g. it could get "Something.Something.Something" in {'Something':{'Something':{'Someting':"value"}}}
func _get_value_in_dictionary(path:String, dictionary:Dictionary, default= null):
if '.' in path:
var from = path.split('.')[0]
if from in dictionary.keys():
return _get_value_in_dictionary(path.trim_prefix(from+"."), dictionary[from], default)
else:
if path in dictionary.keys():
return dictionary[path]
return default
func get_autoloads() -> Array:
var autoloads = []
for c in get_tree().root.get_children():
autoloads.append(c)
return autoloads
# allows to set dialogic built-in variables
func _set(property, value):
property = str(property)
var variables = dialogic.current_state_info['variables']
if property in variables.keys():
if typeof(variables[property]) != TYPE_DICTIONARY:
variables[property] = value
return true
if value is VariableFolder:
return true
# allows to get dialogic built-in variables
func _get(property):
property = str(property)
if property in dialogic.current_state_info['variables'].keys():
if typeof(dialogic.current_state_info['variables'][property]) == TYPE_DICTIONARY:
return VariableFolder.new(dialogic.current_state_info['variables'][property], property, self)
else:
return DialogicUtil.logical_convert(dialogic.current_state_info['variables'][property])
class VariableFolder:
var data = {}
var path = ""
var outside
func _init(_data, _path, _outside):
data = _data
path = _path
outside = _outside
func _get(property):
property = str(property)
if property in data:
if typeof(data[property]) == TYPE_DICTIONARY:
return VariableFolder.new(data[property], path+"."+property, outside)
else:
return DialogicUtil.logical_convert(data[property])
func _set(property, value):
property = str(property)
if not value is VariableFolder:
outside._set_value_in_dictionary(path+"."+property, outside.dialogic.current_state_info['variables'], value)
return true
elif VariableFolder:
return true

View file

@ -0,0 +1,10 @@
@tool
extends HBoxContainer
func refresh():
%MainVariableGroup.update()
%MainVariableGroup.load_data('Variables', DialogicUtil.get_project_setting('dialogic/variables', {}))
func _about_to_close():
ProjectSettings.set_setting('dialogic/variables', %MainVariableGroup.get_data())
ProjectSettings.save()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,11 @@
@tool
extends Control
# This preview is used in the variables editor (Settings)
func set_text(text):
$Panel/HBox/Label.text = text
func _ready():
$Panel/HBox/TextureRect.texture = get_theme_icon("TripleBar", "EditorIcons")
$Panel.self_modulate = get_theme_color("prop_subGroup", "Editor")

View file

@ -0,0 +1,42 @@
[gd_scene load_steps=4 format=3 uid="uid://c6clf8lgj5ta0"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Variable/variables_editor/variable_drag_preview.gd" id="1_uphub"]
[sub_resource type="Image" id="Image_uxwa0"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 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, 93, 93, 131, 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, 93, 93, 131, 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, 93, 93, 131, 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, 252, 255, 93, 93, 252, 255, 93, 93, 252, 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, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 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, 93, 93, 55, 255, 97, 97, 58, 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, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 98, 98, 47, 255, 97, 97, 42, 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, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 94, 94, 46, 255, 93, 93, 236, 255, 93, 93, 233, 255, 97, 97, 42, 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, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 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),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_iae3h"]
image = SubResource("Image_uxwa0")
[node name="Preview" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_uphub")
[node name="Panel" type="PanelContainer" parent="."]
self_modulate = Color(0, 0, 0, 1)
layout_mode = 0
[node name="HBox" type="HBoxContainer" parent="Panel"]
layout_mode = 2
offset_right = 54.0
offset_bottom = 26.0
[node name="TextureRect" type="TextureRect" parent="Panel/HBox"]
layout_mode = 2
offset_right = 16.0
offset_bottom = 26.0
texture = SubResource("ImageTexture_iae3h")
[node name="Label" type="Label" parent="Panel/HBox"]
layout_mode = 2
offset_left = 20.0
offset_right = 54.0
offset_bottom = 26.0
text = "Text"

View file

@ -0,0 +1,93 @@
@tool
extends PanelContainer
var parent_Group = null
var preview_scene = get_script().resource_path.get_base_dir().path_join("variable_drag_preview.tscn")
################################################################################
## FUNCTIONALITY
################################################################################
func get_item_name():
return %NameEdit.text.strip_edges()
func get_data() -> String:
return %ValueEdit.text
func load_data(var_name:String, var_value:String, _Group:Control) -> void:
parent_Group = _Group
%NameEdit.text = var_name
%ValueEdit.text = var_value
################################################################################
## DRAGGING
################################################################################
func _get_drag_data(position):
var data = {
'data':{},
'node':self
}
data.data[get_item_name()] = get_data()
var prev = load(preview_scene).instantiate()
prev.set_text(get_item_name())
set_drag_preview(prev)
return data
func is_variable():
return true
func _can_drop_data(position, data):
if typeof(data) == TYPE_DICTIONARY and data.has('data') and data.has('node'):
return true
return false
func _drop_data(position, data):
parent_Group.add_data(data.data)
data.node.queue_free()
################################################################################
## UI
################################################################################
func _ready():
%DeleteButton.icon = get_theme_icon("Remove", "EditorIcons")
%Dragger.texture = get_theme_icon("TripleBar", "EditorIcons")
func _on_DeleteButton_pressed():
queue_free()
func _on_NameEdit_gui_input(event):
if event is InputEventMouseButton and event.pressed and event.double_click:
%NameEdit.editable = true
if event is InputEventKey and event.pressed and event.keycode == KEY_ENTER and !%NameEdit.editable:
print('hey')
%NameEdit.editable = true
get_viewport().set_input_as_handled()
func _on_NameEdit_focus_exited():
disable_name_edit()
func _on_name_edit_text_submitted(new_text:String) -> void:
%NameEdit.text = new_text.replace(' ', '_')
disable_name_edit()
func disable_name_edit():
%NameEdit.editable = false
parent_Group.check_data()
func warning():
modulate = get_theme_color("warning_color", "Editor")
func no_warning():
modulate = Color(1,1,1,1)

View file

@ -0,0 +1,57 @@
[gd_scene load_steps=4 format=3 uid="uid://dbo8jol41ed83"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Variable/variables_editor/variable_field.gd" id="1"]
[sub_resource type="Image" id="Image_yxhfa"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 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, 93, 93, 131, 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, 93, 93, 131, 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, 93, 93, 131, 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, 252, 255, 93, 93, 252, 255, 93, 93, 252, 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, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 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, 93, 93, 55, 255, 97, 97, 58, 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, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 98, 98, 47, 255, 97, 97, 42, 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, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 94, 94, 46, 255, 93, 93, 236, 255, 93, 93, 233, 255, 97, 97, 42, 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, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 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),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_3qnqh"]
image = SubResource("Image_yxhfa")
[node name="VariableField" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_bottom = -569.0
script = ExtResource("1")
[node name="HBox" type="HBoxContainer" parent="."]
layout_mode = 2
mouse_filter = 2
[node name="Dragger" type="TextureRect" parent="HBox"]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 13
texture = SubResource("ImageTexture_3qnqh")
[node name="NameEdit" type="LineEdit" parent="HBox"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "NewVariable"
editable = false
select_all_on_focus = true
[node name="ValueEdit" type="LineEdit" parent="HBox"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
select_all_on_focus = true
[node name="DeleteButton" type="Button" parent="HBox"]
unique_name_in_owner = true
layout_mode = 2
icon = SubResource("ImageTexture_3qnqh")
flat = true
[connection signal="focus_exited" from="HBox/NameEdit" to="." method="_on_NameEdit_focus_exited"]
[connection signal="gui_input" from="HBox/NameEdit" to="." method="_on_NameEdit_gui_input"]
[connection signal="text_submitted" from="HBox/NameEdit" to="." method="_on_name_edit_text_submitted"]
[connection signal="pressed" from="HBox/DeleteButton" to="." method="_on_DeleteButton_pressed"]

View file

@ -0,0 +1,217 @@
@tool
extends PanelContainer
@export var MainGroup: bool = false
var Group_scene = get_script().resource_path.get_base_dir().path_join("variable_group.tscn")
var field_scene = get_script().resource_path.get_base_dir().path_join("variable_field.tscn")
var preview_scene = get_script().resource_path.get_base_dir().path_join("variable_drag_preview.tscn")
var drag_preview = null
var parent_Group = null
################################################################################
## FUNCTIONALITY
################################################################################
func get_item_name():
return %NameEdit.text
func get_data() -> Dictionary:
var data = {}
for child in %Content.get_children():
data[child.get_item_name()] = child.get_data()
return data
func load_data(Group_name, data:Dictionary, _parent_Group:Control = null) -> void:
if not MainGroup:
%NameEdit.text = Group_name
parent_Group = _parent_Group
else:
clear()
add_data(data)
func add_data(data) -> void:
for key in data.keys():
if typeof(data[key]) == TYPE_DICTIONARY:
var Group = load(Group_scene).instantiate()
%Content.add_child(Group)
Group.update()
Group.load_data(key, data[key], self)
else:
var field = load(field_scene).instantiate()
%Content.add_child(field)
field.load_data(key, data[key], self)
func check_data():
var names = []
for child in %Content.get_children():
if child.has_method('warning') and not child.is_queued_for_deletion():
if child.get_item_name() in names:
child.warning()
else:
child.no_warning()
names.append(child.get_item_name())
func search(term:String) -> bool:
var found_anything = false
for child in %Content.get_children():
if child.has_method('search'):
var res = child.search(term)
if not found_anything:
found_anything = res
elif term.is_empty():
child.show()
elif child.has_method('get_item_name'):
child.visible = term in str(child.get_item_name()).to_lower() or term in child.get_data().to_lower()
if not found_anything:
found_anything = child.visible
if not term.is_empty() and not found_anything and not MainGroup:
hide()
else:
show()
return found_anything
func _get_drag_data(position):
if MainGroup:
return null
var data = {
'data':{},
'node':self
}
data.data[get_item_name()] = get_data()
var prev = load(preview_scene).instantiate()
prev.set_text(get_item_name())
set_drag_preview(prev)
return data
func _can_drop_data(position, data):
if typeof(data) == TYPE_DICTIONARY and data.has('data') and data.has('node'):
return true
return false
func _drop_data(position, data):
# safety that should prevent dragging a Group into itself
var fold = self
while fold != null:
if fold == data.node:
return
fold = fold.parent_Group
# if everything is good, then add new data and delete old one
add_data(data.data)
data.node.queue_free()
check_data()
func _on_VariableGroup_gui_input(event):
if get_viewport().gui_is_dragging():
if get_global_rect().has_point(get_global_mouse_position()):
if not drag_preview:
drag_preview = Control.new()
drag_preview.custom_minimum_size.y = 30
%Content.add_child(drag_preview)
%Content.move_child(drag_preview, %Content.get_child_count())
self_modulate = get_theme_color("accent_color", "Editor")
else:
undrag()
func _on_VariableGroup_mouse_exited():
undrag()
func undrag():
if drag_preview != null:
drag_preview.queue_free()
drag_preview = null
self_modulate = Color(1,1,1,1)
################################################################################
## UI
################################################################################
func _ready():
update()
func update():
if MainGroup:
%DeleteButton.hide()
%DuplicateButton.hide()
%FoldButton.hide()
%NameEdit.text = "VAR"
%NameEdit.editable = false
%SearchBar.show()
%Dragger.hide()
%SearchBar.right_icon = get_theme_icon("Search", "EditorIcons")
%Dragger.texture = get_theme_icon("TripleBar", "EditorIcons")
%NameEdit.add_theme_color_override("font_color_uneditable", get_theme_color('font_color', 'Label'))
%DeleteButton.icon = get_theme_icon("Remove", "EditorIcons")
%DeleteButton.tooltip_text = "Delete Group"
%DuplicateButton.icon = get_theme_icon("Duplicate", "EditorIcons")
%DuplicateButton.tooltip_text = "Duplicate Group"
%NewGroup.icon = get_theme_icon("Folder", "EditorIcons")
%NewGroup.tooltip_text = "Add new Group"
%NewVariable.icon = get_theme_icon("Add", "EditorIcons")
%NewVariable.tooltip_text = "Add new variable"
%FoldButton.icon = get_theme_icon("GuiVisibilityVisible", "EditorIcons")
%FoldButton.tooltip_text = "Hide/Show content"
func clear():
for child in %Content.get_children():
child.queue_free()
func warning():
modulate = get_theme_color("warning_color", "Editor")
func no_warning():
modulate = Color(1,1,1,1)
func _on_DeleteButton_pressed():
queue_free()
func _on_DuplicateButton_pressed():
parent_Group.add_data({get_item_name()+'_duplicate':get_data()})
func _on_NewGroup_pressed():
add_data({'New Group':{}})
func _on_NewVariable_pressed():
add_data({'New Variable':""})
func _on_FoldButton_toggled(button_pressed):
%Content.visible = button_pressed
if button_pressed:
%FoldButton.icon = get_theme_icon("GuiVisibilityVisible", "EditorIcons")
else:
%FoldButton.icon = get_theme_icon("GuiVisibilityHidden", "EditorIcons")
func _on_NameEdit_gui_input(event):
if event is InputEventMouseButton and event.pressed and event.double_click:
if not MainGroup:
%NameEdit.editable = true
func _on_name_edit_text_submitted(new_text):
disable_name_edit()
func _on_NameEdit_focus_exited():
disable_name_edit()
func disable_name_edit():
%NameEdit.editable = false
check_data()
func _on_SearchBar_text_changed(new_text):
search(new_text.to_lower())

View file

@ -0,0 +1,181 @@
[gd_scene load_steps=8 format=3]
[ext_resource type="Script" path="res://addons/dialogic/Events/Variable/variables_editor/variable_group.gd" id="1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7k4ja"]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0.466667, 0.466667, 0.466667, 0.137255)
border_width_left = 2
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="Image" id="Image_t2vcq"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="6"]
image = SubResource("Image_t2vcq")
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rhdj5"]
[sub_resource type="Image" id="Image_wxcgx"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="9"]
image = SubResource("Image_wxcgx")
[node name="VariableGroup" type="PanelContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_7k4ja")
script = ExtResource("1")
[node name="VBox" type="VBoxContainer" parent="."]
offset_left = 5.0
offset_top = 5.0
offset_right = 1019.0
offset_bottom = 595.0
[node name="MainBar" type="HBoxContainer" parent="VBox"]
offset_right = 1014.0
offset_bottom = 31.0
[node name="Dragger" type="TextureRect" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_right = 16.0
offset_bottom = 31.0
mouse_default_cursor_shape = 13
texture = SubResource("6")
[node name="NameEdit" type="LineEdit" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 20.0
offset_right = 874.0
offset_bottom = 31.0
size_flags_horizontal = 3
theme_override_styles/read_only = SubResource("StyleBoxEmpty_rhdj5")
text = "NewFolder"
editable = false
[node name="SearchBar" type="LineEdit" parent="VBox/MainBar"]
unique_name_in_owner = true
visible = false
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.5
placeholder_text = "search"
[node name="NewVariable" type="Button" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 878.0
offset_right = 902.0
offset_bottom = 31.0
hint_tooltip = "Add new variable"
icon = SubResource("9")
flat = true
[node name="NewGroup" type="Button" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 906.0
offset_right = 930.0
offset_bottom = 31.0
hint_tooltip = "Add new folder"
icon = SubResource("9")
flat = true
[node name="DuplicateButton" type="Button" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 934.0
offset_right = 958.0
offset_bottom = 31.0
hint_tooltip = "Duplicate Group"
icon = SubResource("6")
flat = true
[node name="DeleteButton" type="Button" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 962.0
offset_right = 986.0
offset_bottom = 31.0
hint_tooltip = "Delete Group"
icon = SubResource("6")
flat = true
[node name="FoldButton" type="Button" parent="VBox/MainBar"]
unique_name_in_owner = true
offset_left = 990.0
offset_right = 1014.0
offset_bottom = 31.0
hint_tooltip = "Hide/Show content"
toggle_mode = true
icon = SubResource("9")
flat = true
[node name="ContentKeeper" type="HBoxContainer" parent="VBox"]
offset_top = 35.0
offset_right = 1014.0
offset_bottom = 35.0
[node name="Space" type="Control" parent="VBox/ContentKeeper"]
custom_minimum_size = Vector2(20, 0)
offset_right = 20.0
size_flags_vertical = 3
mouse_filter = 2
[node name="VBoxContainer" type="VBoxContainer" parent="VBox/ContentKeeper"]
offset_left = 24.0
offset_right = 1014.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Labels" type="HBoxContainer" parent="VBox/ContentKeeper/VBoxContainer"]
visible = false
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="VBox/ContentKeeper/VBoxContainer/Labels"]
size_flags_horizontal = 3
size_flags_vertical = 5
text = "Name"
[node name="Label2" type="Label" parent="VBox/ContentKeeper/VBoxContainer/Labels"]
size_flags_horizontal = 3
size_flags_vertical = 5
text = "Default value"
[node name="Space2" type="Control" parent="VBox/ContentKeeper/VBoxContainer/Labels"]
[node name="Content" type="VBoxContainer" parent="VBox/ContentKeeper/VBoxContainer"]
unique_name_in_owner = true
offset_right = 990.0
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 0
[connection signal="gui_input" from="." to="." method="_on_VariableGroup_gui_input"]
[connection signal="mouse_exited" from="." to="." method="_on_VariableGroup_mouse_exited"]
[connection signal="focus_exited" from="VBox/MainBar/NameEdit" to="." method="_on_NameEdit_focus_exited"]
[connection signal="gui_input" from="VBox/MainBar/NameEdit" to="." method="_on_NameEdit_gui_input"]
[connection signal="text_submitted" from="VBox/MainBar/NameEdit" to="." method="_on_name_edit_text_submitted"]
[connection signal="text_changed" from="VBox/MainBar/SearchBar" to="." method="_on_SearchBar_text_changed"]
[connection signal="pressed" from="VBox/MainBar/NewVariable" to="." method="_on_NewVariable_pressed"]
[connection signal="pressed" from="VBox/MainBar/NewGroup" to="." method="_on_NewGroup_pressed"]
[connection signal="pressed" from="VBox/MainBar/DuplicateButton" to="." method="_on_DuplicateButton_pressed"]
[connection signal="pressed" from="VBox/MainBar/DeleteButton" to="." method="_on_DeleteButton_pressed"]
[connection signal="toggled" from="VBox/MainBar/FoldButton" to="." method="_on_FoldButton_toggled"]