Add dialogic
This commit is contained in:
1 parent
89d4d3a29c
commit
2c47b309ae
603 files changed
+34501
No files matched your search
@@ -0,0 +1,374 @@
|
||||
tool
|
||||
extends Control
|
||||
|
||||
####################################################################################################
|
||||
## VARIABLES
|
||||
####################################################################################################
|
||||
# references
|
||||
var editor_reference
|
||||
onready var master_tree = get_node('../MasterTreeContainer/MasterTree')
|
||||
var portrait_entry = load("res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.tscn")
|
||||
onready var nodes = {
|
||||
'editor': $Split/EditorScroll/Editor,
|
||||
'name': $Split/EditorScroll/Editor/NameAndColor/NameLineEdit,
|
||||
'color': $Split/EditorScroll/Editor/NameAndColor/ColorPickerButton,
|
||||
'display_name_checkbox': $Split/EditorScroll/Editor/DisplayName/CheckBox,
|
||||
'display_name': $Split/EditorScroll/Editor/DisplayName/LineEdit,
|
||||
'nickname_checkbox': $Split/EditorScroll/Editor/DisplayNickname/CheckBox,
|
||||
'nickname': $Split/EditorScroll/Editor/DisplayNickname/LineEdit,
|
||||
'description': $Split/EditorScroll/Editor/Description/TextEdit,
|
||||
'theme':$Split/EditorScroll/Editor/Theme/ThemeButton,
|
||||
|
||||
'file': $Split/EditorScroll/Editor/FileName/LineEdit,
|
||||
|
||||
'mirror_portraits_checkbox' : $Split/EditorScroll/Editor/HBoxContainer/MirrorOption/MirrorPortraitsCheckBox,
|
||||
'scale': $Split/EditorScroll/Editor/HBoxContainer/Scale,
|
||||
'offset_x': $Split/EditorScroll/Editor/HBoxContainer/OffsetX,
|
||||
'offset_y': $Split/EditorScroll/Editor/HBoxContainer/OffsetY,
|
||||
|
||||
'portrait_search':$Split/EditorScroll/Editor/Portraits/Search,
|
||||
'portrait_list': $Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/ScrollContainer/VBoxContainer/PortraitList,
|
||||
'new_portrait_button': $Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels/HBoxContainer/NewPortrait,
|
||||
'import_from_folder_button': $Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels/HBoxContainer/ImportFromFolder,
|
||||
|
||||
'portrait_preview_full': $Split/Preview/Background/FullTextureRect,
|
||||
'portrait_preview_real': $Split/Preview/Background/Positioner/RealSizedRect,
|
||||
'image_label': $Split/Preview/Background/TLabel10,
|
||||
}
|
||||
|
||||
# data
|
||||
var opened_character_data
|
||||
var selected_theme_file = ''
|
||||
|
||||
####################################################################################################
|
||||
## SCRIPT
|
||||
####################################################################################################
|
||||
|
||||
# connect functions; translate buttons; update styles, etc...
|
||||
func _ready():
|
||||
editor_reference = find_parent('EditorView')
|
||||
|
||||
nodes['new_portrait_button'].text = " "+editor_reference.dialogicTranslator.translate("New portrait")
|
||||
nodes['import_from_folder_button'].text = " "+editor_reference.dialogicTranslator.translate("Import folder")
|
||||
|
||||
# connecting signals
|
||||
nodes['name'].connect('text_changed', self, '_on_name_changed')
|
||||
nodes['name'].connect('focus_exited', self, '_update_name_on_tree')
|
||||
nodes['color'].connect('color_changed', self, '_on_color_changed')
|
||||
nodes['display_name_checkbox'].connect('toggled', self, '_on_display_name_toggled')
|
||||
nodes['nickname_checkbox'].connect('toggled', self, '_on_nickname_toggled')
|
||||
nodes['theme'].connect("about_to_show", self, "build_ThemePickerMenu")
|
||||
|
||||
nodes['portrait_search'].connect('text_changed', self, '_on_PortraitSearch_text_changed')
|
||||
nodes['portrait_search'].right_icon = get_icon("Search", "EditorIcons")
|
||||
nodes['import_from_folder_button'].connect('pressed', self, '_on_Import_Portrait_Folder_Button_pressed')
|
||||
nodes['new_portrait_button'].connect('pressed', self, '_on_New_Portrait_Button_pressed')
|
||||
|
||||
# updating styles
|
||||
var style = $Split/EditorScroll.get('custom_styles/bg')
|
||||
style.set('bg_color', get_color("base_color", "Editor"))
|
||||
nodes['new_portrait_button'].icon = get_icon("Add", "EditorIcons")
|
||||
nodes['import_from_folder_button'].icon = get_icon("Folder", "EditorIcons")
|
||||
$Split/EditorScroll/Editor/Portraits/Title.set('custom_fonts/font', get_font("doc_title", "EditorFonts"))
|
||||
$Split/EditorScroll/Editor/PortraitPanel.set('custom_styles/panel', get_stylebox("Background", "EditorStyles"))
|
||||
|
||||
# loading default setup
|
||||
_on_PreviewMode_item_selected(DialogicResources.get_settings_value('editor', 'character_preview_mode', 1))
|
||||
$Split/Preview/Background/PreviewMode.select(DialogicResources.get_settings_value('editor', 'character_preview_mode', 1))
|
||||
$Split/Preview/Background/PreviewMode.set_item_text(0, editor_reference.dialogicTranslator.translate("Full View"))
|
||||
$Split/Preview/Background/PreviewMode.set_item_text(1, editor_reference.dialogicTranslator.translate("Actual Size"))
|
||||
|
||||
# removes all input for a new character
|
||||
func clear_character_editor():
|
||||
nodes['file'].text = ''
|
||||
nodes['name'].text = ''
|
||||
nodes['color'].color = Color('#ffffff')
|
||||
nodes['display_name_checkbox'].pressed = false
|
||||
nodes['display_name'].text = ''
|
||||
nodes['nickname_checkbox'].pressed = false
|
||||
nodes['nickname'].text = ''
|
||||
nodes['description'].text = ''
|
||||
nodes['theme'].text = 'No custom theme'
|
||||
selected_theme_file = ''
|
||||
|
||||
nodes['portrait_search'].text = ''
|
||||
nodes['portraits'] = []
|
||||
nodes['scale'].value = 100
|
||||
nodes['mirror_portraits_checkbox'].pressed = false
|
||||
nodes['offset_x'].value = 0
|
||||
nodes['offset_y'].value = 0
|
||||
|
||||
# Clearing portraits
|
||||
for p in nodes['portrait_list'].get_children():
|
||||
p.queue_free()
|
||||
nodes['portrait_preview_full'].texture = null
|
||||
nodes['portrait_preview_real'].texture = null
|
||||
nodes['portrait_preview_real'].rect_scale = Vector2(1, 1)
|
||||
|
||||
# creates new character data
|
||||
func create_character():
|
||||
var character_file = 'character-' + str(OS.get_unix_time()) + '.json'
|
||||
var character = {
|
||||
'color': '#ffffff',
|
||||
'id': character_file,
|
||||
'portraits': [],
|
||||
'mirror_portraits' :false
|
||||
}
|
||||
DialogicResources.set_character(character)
|
||||
character['metadata'] = {'file': character_file}
|
||||
return character
|
||||
|
||||
####################################################################################################
|
||||
## SAVING AND LOADING
|
||||
####################################################################################################
|
||||
|
||||
# returns all of the current data in the format it's saved as
|
||||
func generate_character_data_to_save():
|
||||
var portraits = []
|
||||
for p in nodes['portrait_list'].get_children():
|
||||
var entry = {}
|
||||
entry['name'] = p.get_node("NameEdit").text
|
||||
entry['path'] = p.get_node("PathEdit").text
|
||||
portraits.append(entry)
|
||||
var info_to_save = {
|
||||
'id': nodes['file'].text,
|
||||
'color': '#' + nodes['color'].color.to_html(),
|
||||
'display_name_bool': nodes['display_name_checkbox'].pressed,
|
||||
'display_name': nodes['display_name'].text,
|
||||
'nickname_bool': nodes['nickname_checkbox'].pressed,
|
||||
'nickname': nodes['nickname'].text,
|
||||
'description': nodes['description'].text,
|
||||
'theme': selected_theme_file,
|
||||
|
||||
'portraits': portraits,
|
||||
'scale': nodes['scale'].value,
|
||||
'mirror_portraits': nodes["mirror_portraits_checkbox"].pressed,
|
||||
'offset_x': nodes['offset_x'].value,
|
||||
'offset_y': nodes['offset_y'].value,
|
||||
}
|
||||
# Adding name later for cases when no name is provided
|
||||
if nodes['name'].text != '':
|
||||
info_to_save['name'] = nodes['name'].text
|
||||
|
||||
return info_to_save
|
||||
|
||||
# save the currently opened data
|
||||
func save_character():
|
||||
var info_to_save = generate_character_data_to_save()
|
||||
if info_to_save['id']:
|
||||
DialogicResources.set_character(info_to_save)
|
||||
opened_character_data = info_to_save
|
||||
|
||||
# load data in
|
||||
func load_character(filename: String):
|
||||
clear_character_editor()
|
||||
var data = DialogicResources.get_character_json(filename)
|
||||
opened_character_data = data
|
||||
nodes['file'].text = data['id']
|
||||
nodes['name'].text = data.get('name', '')
|
||||
nodes['color'].color = Color(data.get('color','#ffffffff'))
|
||||
nodes['display_name_checkbox'].pressed = data.get('display_name_bool', false)
|
||||
nodes['display_name'].text = data.get('display_name', '')
|
||||
nodes['nickname_checkbox'].pressed = data.get('nickname_bool', false)
|
||||
nodes['nickname'].text = data.get('nickname', '')
|
||||
nodes['description'].text = data.get('description', '')
|
||||
refresh_themes_and_select(data.get('theme', ''))
|
||||
|
||||
nodes['scale'].value = float(data.get('scale', 100))
|
||||
#nodes['nickname'].visible
|
||||
nodes['offset_x'].value = data.get('offset_x', 0)
|
||||
nodes['offset_y'].value = data.get('offset_y', 0)
|
||||
nodes['mirror_portraits_checkbox'].pressed = data.get('mirror_portraits', false)
|
||||
nodes['portrait_preview_full'].flip_h = data.get('mirror_portraits', false)
|
||||
nodes['portrait_preview_real'].flip_h = data.get('mirror_portraits', false)
|
||||
nodes['portrait_preview_real'].rect_scale = Vector2(
|
||||
float(data.get('scale', 100))/100, float(data.get('scale', 100))/100)
|
||||
|
||||
# Portraits
|
||||
var default_portrait = create_portrait_entry()
|
||||
default_portrait.get_node('NameEdit').text = 'Default'
|
||||
default_portrait.get_node('NameEdit').editable = false
|
||||
if opened_character_data.has('portraits'):
|
||||
for p in opened_character_data['portraits']:
|
||||
var current_item
|
||||
if p['name'] == 'Default':
|
||||
default_portrait.get_node('PathEdit').text = p['path']
|
||||
default_portrait.update_preview(p['path'])
|
||||
current_item = default_portrait
|
||||
else:
|
||||
current_item = create_portrait_entry(p['name'], p['path'])
|
||||
|
||||
|
||||
####################################################################################################
|
||||
## UI FUNCTIONS
|
||||
####################################################################################################
|
||||
|
||||
|
||||
func _on_PortraitSearch_text_changed(text):
|
||||
for portrait_item in nodes['portrait_list'].get_children():
|
||||
if text.empty() or text.to_lower() in portrait_item.get_node("NameEdit").text.to_lower() or text.to_lower() in portrait_item.get_node("PathEdit").text.to_lower():
|
||||
portrait_item.show()
|
||||
else:
|
||||
portrait_item.hide()
|
||||
|
||||
func refresh_themes_and_select(file):
|
||||
selected_theme_file = file
|
||||
|
||||
if file == '' or file == 'No custom theme':
|
||||
nodes['theme'].text = "No custom theme"
|
||||
nodes['theme'].custom_icon = get_icon("GuiRadioUnchecked", "EditorIcons")
|
||||
else:
|
||||
nodes['theme'].text = DialogicUtil.get_theme_dict()[file]['name']
|
||||
nodes['theme'].custom_icon = editor_reference.get_node("MainPanel/MasterTreeContainer/MasterTree").theme_icon
|
||||
|
||||
func build_ThemePickerMenu():
|
||||
nodes['theme'].get_popup().clear()
|
||||
var folder_structure = DialogicUtil.get_theme_folder_structure()
|
||||
|
||||
## building the root level
|
||||
build_PickerMenuFolder(nodes['theme'].get_popup(), folder_structure, "MenuButton")
|
||||
|
||||
# is called recursively to build all levels of the folder structure
|
||||
func build_PickerMenuFolder(menu:PopupMenu, folder_structure:Dictionary, current_folder_name:String):
|
||||
var index = 0
|
||||
|
||||
if menu == nodes["theme"].get_popup():
|
||||
menu.add_item('No custom theme')
|
||||
menu.set_item_icon(index, get_icon("GuiRadioUnchecked", "EditorIcons"))
|
||||
menu.set_item_metadata(index, {"file":""})
|
||||
index += 1
|
||||
|
||||
for folder_name in folder_structure['folders'].keys():
|
||||
var submenu = PopupMenu.new()
|
||||
var submenu_name = build_PickerMenuFolder(submenu, folder_structure['folders'][folder_name], folder_name)
|
||||
submenu.name = submenu_name
|
||||
menu.add_submenu_item(folder_name, submenu_name)
|
||||
menu.set_item_icon(index, get_icon("Folder", "EditorIcons"))
|
||||
menu.add_child(submenu)
|
||||
index += 1
|
||||
|
||||
# give it the right style
|
||||
nodes['theme'].update_submenu_style(submenu)
|
||||
|
||||
var files_info = DialogicUtil.get_theme_dict()
|
||||
for file in folder_structure['files']:
|
||||
menu.add_item(files_info[file]['name'])
|
||||
menu.set_item_icon(index, editor_reference.get_node("MainPanel/MasterTreeContainer/MasterTree").theme_icon)
|
||||
menu.set_item_metadata(index, {'file':file})
|
||||
index += 1
|
||||
|
||||
if not menu.is_connected("index_pressed", self, "_on_theme_selected"):
|
||||
menu.connect("index_pressed", self, '_on_theme_selected', [menu])
|
||||
|
||||
return current_folder_name
|
||||
|
||||
|
||||
func _on_theme_selected(index, menu):
|
||||
refresh_themes_and_select(menu.get_item_metadata(index).get('file', ''))
|
||||
|
||||
|
||||
func _on_display_name_toggled(button_pressed):
|
||||
nodes['display_name'].visible = button_pressed
|
||||
if button_pressed: nodes['display_name'].grab_focus()
|
||||
|
||||
|
||||
func _on_nickname_toggled(button_pressed):
|
||||
nodes['nickname'].visible = button_pressed
|
||||
if button_pressed: nodes['nickname'].grab_focus()
|
||||
|
||||
func is_selected(file: String):
|
||||
return nodes['file'].text == file
|
||||
|
||||
|
||||
func _on_name_changed(value):
|
||||
save_character()
|
||||
|
||||
|
||||
func _update_name_on_tree():
|
||||
var item = master_tree.get_selected()
|
||||
item.set_text(0, nodes['name'].text)
|
||||
master_tree.build_characters(nodes['file'].text)
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey and event.pressed:
|
||||
if nodes['name'].has_focus():
|
||||
if event.scancode == KEY_ENTER:
|
||||
nodes['name'].release_focus()
|
||||
|
||||
|
||||
func _on_color_changed(color):
|
||||
var item = master_tree.get_selected()
|
||||
item.set_icon_modulate(0, color)
|
||||
|
||||
|
||||
|
||||
# Portraits
|
||||
func _on_New_Portrait_Button_pressed():
|
||||
create_portrait_entry('', '', true)
|
||||
|
||||
|
||||
func create_portrait_entry(p_name = '', path = '', grab_focus = false):
|
||||
if grab_focus and nodes['portrait_list'].get_child_count() == 1 and nodes['portrait_list'].get_child(0).get_node("PathEdit").text == '':
|
||||
nodes['portrait_list'].get_child(0)._on_ButtonSelect_pressed()
|
||||
return
|
||||
|
||||
var p = portrait_entry.instance()
|
||||
p.editor_reference = editor_reference
|
||||
p.image_node = nodes['portrait_preview_full']
|
||||
p.image_node2 = nodes['portrait_preview_real']
|
||||
p.image_label = nodes['image_label']
|
||||
var p_list = nodes['portrait_list']
|
||||
p_list.add_child(p)
|
||||
if p_name != '':
|
||||
p.get_node("NameEdit").text = p_name
|
||||
if path != '':
|
||||
p.get_node("PathEdit").text = path
|
||||
if grab_focus:
|
||||
p.get_node("NameEdit").grab_focus()
|
||||
p._on_ButtonSelect_pressed()
|
||||
return p
|
||||
|
||||
|
||||
func _on_Import_Portrait_Folder_Button_pressed():
|
||||
editor_reference.godot_dialog("*", EditorFileDialog.MODE_OPEN_DIR)
|
||||
editor_reference.godot_dialog_connect(self, "_on_dir_selected", "dir_selected")
|
||||
|
||||
|
||||
func _on_dir_selected(path, target):
|
||||
var dir = Directory.new()
|
||||
if dir.open(path) == OK:
|
||||
dir.list_dir_begin()
|
||||
var file_name = dir.get_next()
|
||||
while file_name != "":
|
||||
if not dir.current_is_dir():
|
||||
var file_lower = file_name.to_lower()
|
||||
if '.svg' in file_lower or '.png' in file_lower:
|
||||
if not '.import' in file_lower:
|
||||
var final_name = path+ "/" + file_name
|
||||
create_portrait_entry(DialogicResources.get_filename_from_path(file_name), final_name)
|
||||
file_name = dir.get_next()
|
||||
else:
|
||||
print("An error occurred when trying to access the path.")
|
||||
|
||||
|
||||
func _on_MirrorPortraitsCheckBox_toggled(button_pressed):
|
||||
nodes['portrait_preview_full'].flip_h = button_pressed
|
||||
nodes['portrait_preview_real'].flip_h = button_pressed
|
||||
|
||||
|
||||
func _on_Scale_value_changed(value):
|
||||
#nodes['portrait_preview_real'].rect_position = ($Split/Preview/Background/Positioner.rect_position-nodes['portrait_preview_real'].rect_size*Vector2(0.5,1))
|
||||
nodes['portrait_preview_real'].rect_size = Vector2()
|
||||
nodes['portrait_preview_real'].rect_scale = Vector2(
|
||||
float(value)/100, float(value)/100)
|
||||
|
||||
func _on_PreviewMode_item_selected(index):
|
||||
if index == 0:
|
||||
nodes['portrait_preview_real'].hide()
|
||||
nodes['portrait_preview_full'].show()
|
||||
if index == 1:
|
||||
nodes['portrait_preview_real'].show()
|
||||
nodes['portrait_preview_full'].hide()
|
||||
DialogicResources.set_settings_value('editor', 'character_preview_mode', index)
|
||||
|
||||
@@ -0,0 +1,547 @@
|
||||
[gd_scene load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/CharacterEditor.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/dialogic/Editor/Common/TLabel.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/portraits/df-3.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/dialogic/Editor/Events/styles/InputFieldsStyle.tres" type="Theme" id=5]
|
||||
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/ResourcePickers/ResourcePickerMenu.tscn" type="PackedScene" id=6]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0.2, 0.23, 0.31, 1 )
|
||||
|
||||
[sub_resource type="Image" id=10]
|
||||
data = {
|
||||
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 26, 255, 255, 255, 254, 255, 255, 255, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 80, 255, 255, 255, 255, 255, 255, 255, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 65, 255, 255, 255, 254, 255, 255, 255, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 5, 255, 255, 255, 228, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 30, 255, 255, 255, 255, 255, 255, 255, 40, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 167, 255, 255, 255, 188, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 34, 255, 255, 255, 255, 255, 255, 255, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 72, 255, 255, 255, 205, 255, 255, 255, 249, 255, 255, 255, 218, 255, 255, 255, 73, 255, 255, 255, 92, 255, 255, 255, 218, 255, 255, 255, 246, 255, 255, 255, 199, 255, 255, 255, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 144, 255, 255, 255, 194, 255, 255, 255, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 214, 255, 255, 255, 48, 255, 255, 255, 50, 255, 255, 255, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 147, 255, 255, 255, 255, 255, 255, 255, 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Line truncated
|
||||
"format": "RGBA8",
|
||||
"height": 256,
|
||||
"mipmaps": false,
|
||||
"width": 128
|
||||
}
|
||||
|
||||
[sub_resource type="ImageTexture" id=3]
|
||||
image = SubResource( 10 )
|
||||
size = Vector2( 128, 256 )
|
||||
|
||||
[sub_resource type="BitmapFont" id=4]
|
||||
textures = [ SubResource( 3 ) ]
|
||||
chars = PoolIntArray( 32, 0, 0, 0, 0, 0, 0, 11, 4, 160, 0, 1734439808, 0, 0, 0, 0, 11, 4, 96, 0, 2, 216, 3, 2, 3, 0, 8, 192, 0, 32, 16, 11, 13, -1, -2, 9, 224, 0, 85, 180, 5, 11, 1, 0, 7, 64, 0, 72, 34, 10, 11, 1, 1, 12, 97, 0, 76, 188, 5, 8, 1, 3, 7, 65, 0, 2, 16, 11, 10, -1, 1, 9, 161, 0, 2, 222, 2, 11, 1, 3, 4, 193, 0, 17, 16, 11, 13, -1, -2, 9, 225, 0, 112, 169, 5, 11, 1, 0, 7, 33, 0, 65, 234, 2, 10, 1, 1, 4, 34, 0, 49, 187, 5, 4, 1, 1, 6, 162, 0, 12, 136, 6, 10, 1, 1, 8, 66, 0, 46, 109, 7, 10, 1, 1, 9, 194, 0, 113, 2, 11, 13, -1, -2, 9, 226, 0, 72, 143, 6, 11, 1, 0, 7, 98, 0, 102, 165, 6, 11, 1, 0, 8, 99, 0, 40, 179, 5, 8, 1, 3, 7, 67, 0, 68, 115, 7, 10, 1, 1, 8, 227, 0, 2, 155, 6, 12, 1, -1, 7, 195, 0, 53, 2, 11, 14, -1, -3, 9, 163, 0, 22, 167, 6, 10, 1, 1, 8, 35, 0, 78, 66, 8, 10, 0, 1, 9, 164, 0, 14, 79, 8, 7, 0, 3, 8, 68, 0, 90, 66, 8, 10, 1, 1, 10, 100, 0, 82, 150, 6, 11, 1, 0, 8, 36, 0, 102, 137, 6, 12, 1, 0, 8, 196, 0, 98, 2, 11, 13, -1, -2, 9, 228, 0, 121, 169, 5, 11, 1, 0, 7, 101, 0, 32, 124, 6, 8, 1, 3, 8, 197, 0, 83, 2, 11, 12, -1, -1, 9, 229, 0, 20, 196, 5, 12, 1, -1, 7, 165, 0, 79, 98, 7, 10, 0, 1, 8, 69, 0, 29, 191, 5, 10, 1, 1, 7, 37, 0, 2, 30, 10, 10, 1, 1, 12, 230, 0, 58, 34, 10, 8, 1, 3, 12, 102, 0, 2, 201, 5, 11, 0, 0, 4, 166, 0, 95, 228, 2, 14, 3, 0, 7, 198, 0, 21, 2, 12, 10, -1, 1, 12, 70, 0, 101, 105, 6, 10, 1, 1, 7, 38, 0, 67, 49, 9, 10, 1, 1, 10, 39, 0, 119, 219, 2, 4, 1, 1, 3, 167, 0, 112, 131, 6, 11, 0, 0, 7, 103, 0, 13, 107, 7, 11, 1, 3, 7, 199, 0, 57, 97, 7, 13, 1, 1, 8, 231, 0, 2, 186, 5, 11, 1, 3, 7, 71, 0, 66, 65, 8, 10, 1, 1, 10, 168, 0, 77, 217, 4, 2, 2, 0, 8, 104, 0, 72, 158, 6, 11, 1, 0, 8, 40, 0, 93, 212, 4, 12, 1, 1, 4, 200, 0, 47, 195, 5, 13, 1, -2, 7, 232, 0, 62, 143, 6, 11, 1, 0, 8, 72, 0, 54, 65, 8, 10, 1, 1, 10, 105, 0, 109, 213, 3, 11, 0, 0, 4, 41, 0, 51, 226, 3, 12, 0, 1, 4, 201, 0, 56, 197, 5, 13, 1, -2, 7, 233, 0, 52, 142, 6, 11, 1, 0, 8, 169, 0, 44, 34, 10, 10, 1, 1, 12, 73, 0, 38, 191, 5, 10, 0, 1, 5, 170, 0, 29, 205, 4, 5, 0, 1, 5, 42, 0, 108, 80, 7, 6, 0, 0, 8, 202, 0, 65, 202, 5, 13, 1, -2, 7, 74, 0, 92, 195, 5, 13, -2, 1, 3, 106, 0, 101, 213, 4, 14, -1, 0, 4, 234, 0, 12, 181, 6, 11, 1, 0, 8, 171, 0, 22, 181, 5, 6, 1, 4, 7, 43, 0, 101, 94, 7, 7, 0, 3, 8, 107, 0, 112, 92, 7, 11, 1, 0, 7, 203, 0, 83, 200, 5, 13, 1, -2, 7, 235, 0, 2, 171, 6, 11, 1, 0, 8, 75, 0, 102, 66, 8, 10, 1, 1, 8, 44, 0, 107, 231, 2, 3, 1, 9, 4, 172, 0, 2, 104, 7, 4, 0, 6, 8, 108, 0, 113, 228, 2, 11, 1, 0, 4, 204, 0, 101, 196, 5, 13, 0, -2, 5, 236, 0, 30, 214, 3, 11, 0, 0, 4, 76, 0, 22, 124, 6, 10, 1, 1, 7, 173, 0, 16, 229, 3, 2, 1, 7, 5, 45, 0, 123, 201, 3, 2, 1, 7, 5, 109, 0, 68, 2, 11, 8, 1, 3, 13, 205, 0, 11, 211, 5, 13, 0, -2, 5, 237, 0, 37, 214, 3, 11, 1, 0, 4, 77, 0, 62, 20, 10, 10, 1, 1, 12, 46, 0, 101, 231, 2, 2, 1, 9, 4, 110, 0, 111, 107, 6, 8, 1, 3, 8, 206, 0, 20, 212, 5, 13, 0, -2, 5, 238, 0, 11, 196, 5, 11, -1, 0, 4, 174, 0, 30, 33, 10, 10, 1, 1, 12, 78, 0, 2, 79, 8, 10, 1, 1, 10, 175, 0, 35, 111, 7, 1, 0, -1, 7, 111, 0, 102, 153, 6, 8, 1, 3, 8, 207, 0, 119, 184, 5, 13, 0, -2, 5, 239, 0, 69, 219, 4, 11, 0, 0, 4, 79, 0, 41, 66, 9, 10, 1, 1, 11, 47, 0, 90, 105, 7, 10, -1, 1, 5, 176, 0, 61, 219, 4, 4, 1, 1, 6, 112, 0, 32, 150, 6, 11, 1, 3, 8, 240, 0, 82, 165, 6, 11, 1, 0, 8, 208, 0, 86, 33, 9, 10, 0, 1, 10, 80, 0, 52, 128, 6, 10, 1, 1, 8, 48, 0, 42, 135, 6, 10, 1, 1, 8, 177, 0, 46, 97, 7, 8, 0, 3, 8, 113, 0, 22, 152, 6, 11, 1, 3, 8, 241, 0, 2, 112, 6, 12, 1, -1, 8, 81, 0, 15, 59, 9, 13, 1, 1, 11, 209, 0, 74, 80, 8, 14, 1, -3, 10, 49, 0, 45, 212, 4, 10, 2, 1, 8, 178, 0, 58, 187, 5, 6, 0, 1, 5, 114, 0, 85, 217, 4, 8, 1, 3, 5, 210, 0, 2, 62, 9, 13, 1, -2, 11, 242, 0, 62, 165, 6, 11, 1, 0, 8, 82, 0, 35, 97, 7, 10, 1, 1, 8, 50, 0, 57, 114, 7, 10, 1, 1, 8, 179, 0, 53, 214, 4, 6, 0, 1, 5, 115, 0, 112, 146, 6, 8, 0, 3, 7, 211, 0, 106, 49, 9, 13, 1, -2, 11, 243, 0, 52, 172, 6, 11, 1, 0, 8, 83, 0, 24, 96, 7, 10, 0, 1, 7, 51, 0, 22, 138, 6, 10, 1, 1, 8, 180, 0, 9, 228, 3, 2, 3, 0, 8, 116, 0, 67, 188, 5, 10, 0, 1, 5, 212, 0, 93, 49, 9, 13, 1, -2, 11, 244, 0, 42, 164, 6, 11, 1, 0, 8, 84, 0, 13, 93, 7, 10, 0, 1, 7, 52, 0, 24, 110, 7, 10, 1, 1, 8, 245, 0, 12, 165, 6, 12, 1, -1, 8, 181, 0, 2, 140, 6, 11, 1, 3, 8, 117, 0, 42, 123, 6, 8, 1, 3, 8, 53, 0, 92, 119, 6, 10, 1, 1, 8, 85, 0, 114, 66, 8, 10, 1, 1, 10, 213, 0, 2, 44, 9, 14, 1, -3, 11, 118, 0, 15, 47, 9, 8, -1, 3, 7, 182, 0, 68, 98, 7, 13, 1, 0, 9, 214, 0, 80, 49, 9, 13, 1, -2, 11, 246, 0, 72, 173, 6, 11, 1, 0, 8, 86, 0, 76, 18, 10, 10, -1, 1, 8, 54, 0, 82, 121, 6, 10, 1, 1, 8, 183, 0, 77, 223, 2, 2, 1, 5, 4, 215, 0, 2, 93, 7, 7, 0, 3, 8, 247, 0, 90, 94, 7, 7, 0, 3, 8, 119, 0, 37, 2, 12, 8, -1, 3, 10, 87, 0, 2, 2, 15, 10, -1, 1, 13, 55, 0, 72, 129, 6, 10, 1, 1, 8, 184, 0, 116, 212, 3, 3, 0, 11, 3, 120, 0, 119, 80, 7, 8, 0, 3, 7, 248, 0, 2, 128, 6, 8, 1, 3, 8, 216, 0, 99, 33, 9, 12, 1, 0, 11, 88, 0, 90, 19, 10, 10, -1, 1, 8, 56, 0, 62, 129, 6, 10, 1, 1, 8, 185, 0, 23, 229, 3,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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]
|
||||
flags = 4
|
||||
flags = 4
|
||||
image = SubResource( 11 )
|
||||
size = Vector2( 16, 16 )
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id=7]
|
||||
texture = SubResource( 6 )
|
||||
region_rect = Rect2( 0, 0, 16, 16 )
|
||||
margin_left = 2.0
|
||||
margin_right = 2.0
|
||||
margin_top = 2.0
|
||||
margin_bottom = 2.0
|
||||
|
||||
[sub_resource type="Image" id=12]
|
||||
data = {
|
||||
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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]
|
||||
flags = 4
|
||||
flags = 4
|
||||
image = SubResource( 12 )
|
||||
size = Vector2( 16, 16 )
|
||||
|
||||
[node name="CharacterEditor" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = -25.0
|
||||
theme = ExtResource( 5 )
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Split" type="HSplitContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="EditorScroll" type="ScrollContainer" parent="Split"]
|
||||
margin_right = 581.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_styles/bg = SubResource( 1 )
|
||||
scroll_horizontal_enabled = false
|
||||
|
||||
[node name="Editor" type="VBoxContainer" parent="Split/EditorScroll"]
|
||||
margin_right = 581.0
|
||||
margin_bottom = 600.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 11
|
||||
|
||||
[node name="NameAndColor" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_right = 581.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="TLabel" parent="Split/EditorScroll/Editor/NameAndColor" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 130, 0 )
|
||||
text = "Name: "
|
||||
text_key = "Name: "
|
||||
|
||||
[node name="ColorPickerButton" type="ColorPickerButton" parent="Split/EditorScroll/Editor/NameAndColor"]
|
||||
margin_left = 134.0
|
||||
margin_right = 164.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 30, 0 )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
edit_alpha = false
|
||||
|
||||
[node name="NameLineEdit" type="LineEdit" parent="Split/EditorScroll/Editor/NameAndColor"]
|
||||
margin_left = 168.0
|
||||
margin_right = 308.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 140, 0 )
|
||||
expand_to_text_length = true
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Spacer" type="Control" parent="Split/EditorScroll/Editor/NameAndColor"]
|
||||
margin_left = 312.0
|
||||
margin_right = 322.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 10, 0 )
|
||||
|
||||
[node name="DisplayName" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 28.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 52.0
|
||||
__meta__ = {
|
||||
"_editor_description_": "Display name is the name that will
|
||||
show up on the dialogs in game."
|
||||
}
|
||||
|
||||
[node name="TLabel2" parent="Split/EditorScroll/Editor/DisplayName" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 130, 0 )
|
||||
text = "Display Name: "
|
||||
text_key = "Display Name: "
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="Split/EditorScroll/Editor/DisplayName"]
|
||||
margin_left = 134.0
|
||||
margin_right = 164.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 30, 0 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Split/EditorScroll/Editor/DisplayName"]
|
||||
visible = false
|
||||
margin_left = 168.0
|
||||
margin_right = 308.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 140, 0 )
|
||||
expand_to_text_length = true
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="DisplayNickname" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 56.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 80.0
|
||||
__meta__ = {
|
||||
"_editor_description_": "Display name is the name that will
|
||||
show up on the dialogs in game."
|
||||
}
|
||||
|
||||
[node name="TLabel3" parent="Split/EditorScroll/Editor/DisplayNickname" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 130, 0 )
|
||||
text = "Nicknames: "
|
||||
text_key = "Nicknames: "
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="Split/EditorScroll/Editor/DisplayNickname"]
|
||||
margin_left = 134.0
|
||||
margin_right = 164.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 30, 0 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Split/EditorScroll/Editor/DisplayNickname"]
|
||||
visible = false
|
||||
margin_left = 162.0
|
||||
margin_right = 527.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 140, 0 )
|
||||
size_flags_horizontal = 3
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Description" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 84.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 134.0
|
||||
|
||||
[node name="TLabel5" parent="Split/EditorScroll/Editor/Description" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 14.0
|
||||
rect_min_size = Vector2( 130, 0 )
|
||||
size_flags_vertical = 0
|
||||
text = "Description: "
|
||||
text_key = "Description: "
|
||||
|
||||
[node name="TextEdit" type="TextEdit" parent="Split/EditorScroll/Editor/Description"]
|
||||
margin_left = 134.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 50.0
|
||||
rect_min_size = Vector2( 100, 50 )
|
||||
size_flags_horizontal = 3
|
||||
wrap_enabled = true
|
||||
|
||||
[node name="Theme" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 138.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 162.0
|
||||
|
||||
[node name="TLabel5" parent="Split/EditorScroll/Editor/Theme" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 14.0
|
||||
rect_min_size = Vector2( 130, 0 )
|
||||
size_flags_vertical = 0
|
||||
text = "Theme: "
|
||||
text_key = "Theme: "
|
||||
|
||||
[node name="ThemeButton" parent="Split/EditorScroll/Editor/Theme" instance=ExtResource( 6 )]
|
||||
margin_left = 134.0
|
||||
margin_right = 248.0
|
||||
custom_colors/font_color = Color( 0.8, 0.807843, 0.827451, 1 )
|
||||
|
||||
[node name="Separator" type="HSeparator" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 166.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 184.0
|
||||
rect_min_size = Vector2( 0, 10 )
|
||||
custom_constants/separation = 18
|
||||
|
||||
[node name="Portraits" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 188.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 212.0
|
||||
|
||||
[node name="Title" parent="Split/EditorScroll/Editor/Portraits" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 457.0
|
||||
margin_bottom = 19.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
text = "Portraits"
|
||||
valign = 1
|
||||
text_key = "Portraits"
|
||||
|
||||
[node name="Search" type="LineEdit" parent="Split/EditorScroll/Editor/Portraits"]
|
||||
margin_left = 461.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 120, 0 )
|
||||
size_flags_vertical = 4
|
||||
expand_to_text_length = true
|
||||
clear_button_enabled = true
|
||||
placeholder_text = "Search"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 216.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 240.0
|
||||
|
||||
[node name="TLabel11" parent="Split/EditorScroll/Editor/HBoxContainer" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 33.0
|
||||
margin_bottom = 19.0
|
||||
text = "Scale"
|
||||
text_key = "Scale"
|
||||
|
||||
[node name="Scale" type="SpinBox" parent="Split/EditorScroll/Editor/HBoxContainer"]
|
||||
margin_left = 37.0
|
||||
margin_right = 113.0
|
||||
margin_bottom = 24.0
|
||||
value = 100.0
|
||||
allow_greater = true
|
||||
align = 2
|
||||
suffix = "%"
|
||||
|
||||
[node name="TLabel12" parent="Split/EditorScroll/Editor/HBoxContainer" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 117.0
|
||||
margin_top = 5.0
|
||||
margin_right = 156.0
|
||||
margin_bottom = 19.0
|
||||
text = "Offset"
|
||||
text_key = "Offset"
|
||||
|
||||
[node name="OffsetX" type="SpinBox" parent="Split/EditorScroll/Editor/HBoxContainer"]
|
||||
margin_left = 160.0
|
||||
margin_right = 236.0
|
||||
margin_bottom = 24.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
suffix = "X"
|
||||
|
||||
[node name="OffsetY" type="SpinBox" parent="Split/EditorScroll/Editor/HBoxContainer"]
|
||||
margin_left = 240.0
|
||||
margin_right = 316.0
|
||||
margin_bottom = 24.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
suffix = "Y"
|
||||
|
||||
[node name="MirrorOption" type="HBoxContainer" parent="Split/EditorScroll/Editor/HBoxContainer"]
|
||||
margin_left = 320.0
|
||||
margin_right = 445.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="TLabel11" parent="Split/EditorScroll/Editor/HBoxContainer/MirrorOption" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 97.0
|
||||
margin_bottom = 19.0
|
||||
text = "Mirror portraits"
|
||||
text_key = "Mirror portraits"
|
||||
|
||||
[node name="MirrorPortraitsCheckBox" type="CheckBox" parent="Split/EditorScroll/Editor/HBoxContainer/MirrorOption"]
|
||||
margin_left = 101.0
|
||||
margin_right = 125.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="PortraitPanel" type="PanelContainer" parent="Split/EditorScroll/Editor"]
|
||||
margin_top = 244.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_vertical = 3
|
||||
custom_styles/panel = SubResource( 7 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Split/EditorScroll/Editor/PortraitPanel"]
|
||||
margin_left = 2.0
|
||||
margin_top = 2.0
|
||||
margin_right = 579.0
|
||||
margin_bottom = 354.0
|
||||
|
||||
[node name="Labels" type="HBoxContainer" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer"]
|
||||
margin_right = 577.0
|
||||
margin_bottom = 22.0
|
||||
|
||||
[node name="TLabel7" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 4.0
|
||||
margin_right = 160.0
|
||||
margin_bottom = 18.0
|
||||
rect_min_size = Vector2( 160, 0 )
|
||||
text = "Name"
|
||||
text_key = "Name"
|
||||
|
||||
[node name="TLabel8" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 164.0
|
||||
margin_top = 4.0
|
||||
margin_right = 329.0
|
||||
margin_bottom = 18.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Path"
|
||||
text_key = "Path"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels"]
|
||||
margin_left = 333.0
|
||||
margin_right = 577.0
|
||||
margin_bottom = 22.0
|
||||
|
||||
[node name="NewPortrait" type="Button" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels/HBoxContainer"]
|
||||
margin_right = 117.0
|
||||
margin_bottom = 22.0
|
||||
text = " New portrait"
|
||||
icon = SubResource( 9 )
|
||||
|
||||
[node name="ImportFromFolder" type="Button" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/Labels/HBoxContainer"]
|
||||
margin_left = 121.0
|
||||
margin_right = 244.0
|
||||
margin_bottom = 22.0
|
||||
text = " Import folder"
|
||||
icon = SubResource( 9 )
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer"]
|
||||
margin_top = 26.0
|
||||
margin_right = 577.0
|
||||
margin_bottom = 352.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/ScrollContainer"]
|
||||
margin_right = 577.0
|
||||
margin_bottom = 326.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="PortraitList" type="VBoxContainer" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_right = 577.0
|
||||
margin_bottom = 24.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="PortraitEntry" parent="Split/EditorScroll/Editor/PortraitPanel/VBoxContainer/ScrollContainer/VBoxContainer/PortraitList" instance=ExtResource( 1 )]
|
||||
margin_right = 577.0
|
||||
|
||||
[node name="FileName" type="HBoxContainer" parent="Split/EditorScroll/Editor"]
|
||||
visible = false
|
||||
margin_top = 625.0
|
||||
margin_right = 527.0
|
||||
margin_bottom = 649.0
|
||||
|
||||
[node name="TLabel9" parent="Split/EditorScroll/Editor/FileName" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 27.0
|
||||
margin_bottom = 19.0
|
||||
text = "File:"
|
||||
text_key = "File:"
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Split/EditorScroll/Editor/FileName"]
|
||||
margin_left = 31.0
|
||||
margin_right = 527.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 140, 0 )
|
||||
size_flags_horizontal = 3
|
||||
editable = false
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Preview" type="VBoxContainer" parent="Split"]
|
||||
margin_left = 593.0
|
||||
margin_right = 999.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 0.7
|
||||
|
||||
[node name="Background" type="Panel" parent="Split/Preview"]
|
||||
margin_right = 406.0
|
||||
margin_bottom = 600.0
|
||||
rect_clip_content = true
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="FullTextureRect" type="TextureRect" parent="Split/Preview/Background"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 30.0
|
||||
margin_top = 30.0
|
||||
margin_right = -30.0
|
||||
margin_bottom = -30.0
|
||||
rect_min_size = Vector2( 100, 100 )
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
expand = true
|
||||
stretch_mode = 6
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Positioner" type="Control" parent="Split/Preview/Background"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 11.0
|
||||
margin_top = 50.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -15.0
|
||||
rect_clip_content = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="RealSizedRect" type="TextureRect" parent="Split/Preview/Background/Positioner"]
|
||||
visible = false
|
||||
margin_left = 3.0
|
||||
margin_right = 402.0
|
||||
margin_bottom = 756.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TLabel10" parent="Split/Preview/Background" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 14.0
|
||||
text = "Preview"
|
||||
text_key = "Preview"
|
||||
|
||||
[node name="PreviewMode" type="OptionButton" parent="Split/Preview/Background"]
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
margin_left = -110.0
|
||||
margin_top = 6.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = 26.0
|
||||
grow_horizontal = 0
|
||||
text = "Full View"
|
||||
items = [ "Full View", null, false, 0, null, "Actual Size", null, false, 1, null ]
|
||||
selected = 0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="value_changed" from="Split/EditorScroll/Editor/HBoxContainer/Scale" to="." method="_on_Scale_value_changed"]
|
||||
[connection signal="toggled" from="Split/EditorScroll/Editor/HBoxContainer/MirrorOption/MirrorPortraitsCheckBox" to="." method="_on_MirrorPortraitsCheckBox_toggled"]
|
||||
[connection signal="item_selected" from="Split/Preview/Background/PreviewMode" to="." method="_on_PreviewMode_item_selected"]
|
||||
[connection signal="item_selected" from="Split/Preview/Background/PreviewMode" to="." method="_on_OptionButton_item_selected"]
|
||||
@@ -0,0 +1,55 @@
|
||||
tool
|
||||
extends HBoxContainer
|
||||
|
||||
var editor_reference
|
||||
var image_node
|
||||
var image_node2
|
||||
var image_label
|
||||
|
||||
func _ready():
|
||||
$ButtonDelete.icon = get_icon("Remove", "EditorIcons")
|
||||
|
||||
|
||||
func _on_ButtonDelete_pressed():
|
||||
if $NameEdit.text == 'Default':
|
||||
$PathEdit.text = ''
|
||||
update_preview('')
|
||||
else:
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_ButtonSelect_pressed():
|
||||
editor_reference.godot_dialog("*.png, *.svg, *.tscn")
|
||||
editor_reference.godot_dialog_connect(self, "_on_file_selected")
|
||||
|
||||
|
||||
func _on_file_selected(path, target):
|
||||
update_preview(path)
|
||||
$PathEdit.text = path
|
||||
if $NameEdit.text == '':
|
||||
$NameEdit.text = DialogicResources.get_filename_from_path(path)
|
||||
|
||||
|
||||
func _on_focus_entered():
|
||||
if $PathEdit.text == '':
|
||||
image_label.text = editor_reference.dialogicTranslator.translate('NoImagePreview')
|
||||
image_node.texture = null
|
||||
image_node2.texture = null
|
||||
else:
|
||||
update_preview($PathEdit.text)
|
||||
|
||||
|
||||
func update_preview(path):
|
||||
image_label.text = editor_reference.dialogicTranslator.translate('Preview of')+' "'+$NameEdit.text+'"'
|
||||
var l_path = path.to_lower()
|
||||
if '.png' in l_path or '.svg' in l_path:
|
||||
image_node.texture = load(path)
|
||||
image_node2.texture = load(path)
|
||||
image_label.text += ' (' + str(image_node.texture.get_width()) + 'x' + str(image_node.texture.get_height())+')'
|
||||
elif '.tscn' in l_path:
|
||||
image_node.texture = null
|
||||
image_node2.texture = null
|
||||
image_label.text = editor_reference.dialogicTranslator.translate('CustomScenePreview')
|
||||
else:
|
||||
image_node.texture = null
|
||||
image_node2.texture = null
|
||||
@@ -0,0 +1,61 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Image" id=4]
|
||||
data = {
|
||||
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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=3]
|
||||
flags = 4
|
||||
flags = 4
|
||||
image = SubResource( 4 )
|
||||
size = Vector2( 16, 16 )
|
||||
|
||||
[node name="PortraitEntry" type="HBoxContainer"]
|
||||
margin_right = 451.0
|
||||
margin_bottom = 24.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="NameEdit" type="LineEdit" parent="."]
|
||||
margin_right = 160.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 160, 0 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PathEdit" type="LineEdit" parent="."]
|
||||
margin_left = 164.0
|
||||
margin_right = 391.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 150, 0 )
|
||||
size_flags_horizontal = 3
|
||||
editable = false
|
||||
selecting_enabled = false
|
||||
|
||||
[node name="ButtonSelect" type="Button" parent="."]
|
||||
margin_left = 395.0
|
||||
margin_right = 419.0
|
||||
margin_bottom = 24.0
|
||||
text = "..."
|
||||
|
||||
[node name="ButtonDelete" type="Button" parent="."]
|
||||
margin_left = 423.0
|
||||
margin_right = 451.0
|
||||
margin_bottom = 24.0
|
||||
icon = SubResource( 3 )
|
||||
flat = true
|
||||
|
||||
[connection signal="focus_entered" from="NameEdit" to="." method="_on_focus_entered"]
|
||||
[connection signal="focus_entered" from="PathEdit" to="." method="_on_focus_entered"]
|
||||
[connection signal="pressed" from="ButtonSelect" to="." method="_on_ButtonSelect_pressed"]
|
||||
[connection signal="pressed" from="ButtonDelete" to="." method="_on_ButtonDelete_pressed"]
|
||||
Reference in new issue
Block a user