mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:34:43 -04:00
Split code from PreferencesDialog.gd to HandleLanguages.gd
Also moved PreferencesDialog script & scene to src/Preferences. More Preferences code splitting will follow.
This commit is contained in:
parent
ef89c650b2
commit
379b574257
6 changed files with 66 additions and 64 deletions
59
src/Preferences/HandleLanguages.gd
Normal file
59
src/Preferences/HandleLanguages.gd
Normal file
|
@ -0,0 +1,59 @@
|
|||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
Global.loaded_locales = TranslationServer.get_loaded_locales()
|
||||
|
||||
# Make sure locales are always sorted, in the same order
|
||||
Global.loaded_locales.sort()
|
||||
|
||||
# Load language
|
||||
if Global.config_cache.has_section_key("preferences", "locale"):
|
||||
var saved_locale : String = Global.config_cache.get_value("preferences", "locale")
|
||||
TranslationServer.set_locale(saved_locale)
|
||||
|
||||
# Set the language option menu's default selected option to the loaded locale
|
||||
var locale_index: int = Global.loaded_locales.find(saved_locale)
|
||||
get_child(0).pressed = false # Unset System Language option in preferences
|
||||
get_child(locale_index + 1).pressed = true
|
||||
else: # If the user doesn't have a language preference, set it to their OS' locale
|
||||
TranslationServer.set_locale(OS.get_locale())
|
||||
|
||||
if "zh" in TranslationServer.get_locale():
|
||||
Global.control.theme.default_font = preload("res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres")
|
||||
else:
|
||||
Global.control.theme.default_font = preload("res://assets/fonts/Roboto-Regular.tres")
|
||||
|
||||
for child in get_children():
|
||||
if child is Button:
|
||||
child.connect("pressed", self, "_on_Language_pressed", [child])
|
||||
child.hint_tooltip = child.name
|
||||
|
||||
|
||||
func _on_Language_pressed(button : Button) -> void:
|
||||
var index := 0
|
||||
var i := -1
|
||||
for child in get_children():
|
||||
if child is Button:
|
||||
if child == button:
|
||||
button.pressed = true
|
||||
index = i
|
||||
else:
|
||||
child.pressed = false
|
||||
i += 1
|
||||
if index == -1:
|
||||
TranslationServer.set_locale(OS.get_locale())
|
||||
else:
|
||||
TranslationServer.set_locale(Global.loaded_locales[index])
|
||||
|
||||
if "zh" in TranslationServer.get_locale():
|
||||
Global.control.theme.default_font = preload("res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres")
|
||||
else:
|
||||
Global.control.theme.default_font = preload("res://assets/fonts/Roboto-Regular.tres")
|
||||
|
||||
Global.config_cache.set_value("preferences", "locale", TranslationServer.get_locale())
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
# Update Translations
|
||||
Global.update_hint_tooltips()
|
||||
Global.preferences_dialog._on_PreferencesDialog_popup_hide()
|
||||
Global.preferences_dialog._on_PreferencesDialog_about_to_show(true)
|
540
src/Preferences/PreferencesDialog.gd
Normal file
540
src/Preferences/PreferencesDialog.gd
Normal file
|
@ -0,0 +1,540 @@
|
|||
extends AcceptDialog
|
||||
|
||||
onready var tree : Tree = $HSplitContainer/Tree
|
||||
onready var right_side : VBoxContainer = $HSplitContainer/ScrollContainer/VBoxContainer
|
||||
onready var general = $HSplitContainer/ScrollContainer/VBoxContainer/General
|
||||
onready var languages = $HSplitContainer/ScrollContainer/VBoxContainer/Languages
|
||||
onready var themes = $HSplitContainer/ScrollContainer/VBoxContainer/Themes
|
||||
onready var canvas = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas
|
||||
onready var image = $HSplitContainer/ScrollContainer/VBoxContainer/Image
|
||||
onready var shortcuts = $HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts
|
||||
|
||||
onready var open_last_project_button = $HSplitContainer/ScrollContainer/VBoxContainer/General/OpenLastProject
|
||||
onready var smooth_zoom_button = $HSplitContainer/ScrollContainer/VBoxContainer/General/SmoothZoom
|
||||
onready var sensitivity_option = $HSplitContainer/ScrollContainer/VBoxContainer/General/PressureSentivity/PressureSensitivityOptionButton
|
||||
onready var left_tool_icon = $HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/LeftToolIconCheckbox
|
||||
onready var right_tool_icon = $HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/RightToolIconCheckbox
|
||||
|
||||
onready var default_width_value = $HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultWidth
|
||||
onready var default_height_value = $HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultHeight
|
||||
onready var default_fill_color = $HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/DefaultFillColor
|
||||
|
||||
onready var grid_width_value = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridWidthValue
|
||||
onready var grid_height_value = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridHeightValue
|
||||
onready var grid_color = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridColor
|
||||
onready var guide_color = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GuideOptions/GuideColor
|
||||
|
||||
onready var checker_size_value = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerSizeValue
|
||||
onready var checker_color_1 = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerColor1
|
||||
onready var checker_color_2 = $HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerColor2
|
||||
|
||||
# Shortcuts
|
||||
onready var theme_font_color : Color = $Popups/ShortcutSelector/EnteredShortcut.get_color("font_color")
|
||||
var default_shortcuts_preset := {}
|
||||
var custom_shortcuts_preset := {}
|
||||
var action_being_edited := ""
|
||||
var shortcut_already_assigned = false
|
||||
var old_input_event : InputEventKey
|
||||
var new_input_event : InputEventKey
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Disable input until the shortcut selector is displayed
|
||||
set_process_input(false)
|
||||
|
||||
# Replace OK with Close since preference changes are being applied immediately, not after OK confirmation
|
||||
get_ok().text = tr("Close")
|
||||
|
||||
for child in themes.get_children():
|
||||
if child is Button:
|
||||
child.connect("pressed", self, "_on_Theme_pressed", [child])
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "theme"):
|
||||
var theme_id = Global.config_cache.get_value("preferences", "theme")
|
||||
change_theme(theme_id)
|
||||
themes.get_child(theme_id).pressed = true
|
||||
else:
|
||||
change_theme(0)
|
||||
themes.get_child(0).pressed = true
|
||||
|
||||
# Set default values for General options
|
||||
if Global.config_cache.has_section_key("preferences", "open_last_project"):
|
||||
Global.open_last_project = Global.config_cache.get_value("preferences", "open_last_project")
|
||||
open_last_project_button.pressed = Global.open_last_project
|
||||
if Global.config_cache.has_section_key("preferences", "smooth_zoom"):
|
||||
Global.smooth_zoom = Global.config_cache.get_value("preferences", "smooth_zoom")
|
||||
smooth_zoom_button.pressed = Global.smooth_zoom
|
||||
if Global.config_cache.has_section_key("preferences", "pressure_sensitivity"):
|
||||
Global.pressure_sensitivity_mode = Global.config_cache.get_value("preferences", "pressure_sensitivity")
|
||||
sensitivity_option.selected = Global.pressure_sensitivity_mode
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "show_left_tool_icon"):
|
||||
Global.show_left_tool_icon = Global.config_cache.get_value("preferences", "show_left_tool_icon")
|
||||
left_tool_icon.pressed = Global.show_left_tool_icon
|
||||
if Global.config_cache.has_section_key("preferences", "show_right_tool_icon"):
|
||||
Global.show_right_tool_icon = Global.config_cache.get_value("preferences", "show_right_tool_icon")
|
||||
right_tool_icon.pressed = Global.show_right_tool_icon
|
||||
|
||||
# Get autosave settings
|
||||
if Global.config_cache.has_section_key("preferences", "autosave_interval"):
|
||||
var autosave_interval = Global.config_cache.get_value("preferences", "autosave_interval")
|
||||
OpenSave.set_autosave_interval(autosave_interval)
|
||||
general.get_node("AutosaveInterval/AutosaveInterval").value = autosave_interval
|
||||
if Global.config_cache.has_section_key("preferences", "enable_autosave"):
|
||||
var enable_autosave = Global.config_cache.get_value("preferences", "enable_autosave")
|
||||
OpenSave.toggle_autosave(enable_autosave)
|
||||
general.get_node("EnableAutosave").pressed = enable_autosave
|
||||
|
||||
# Set default values for Canvas options
|
||||
if Global.config_cache.has_section_key("preferences", "grid_size"):
|
||||
var grid_size = Global.config_cache.get_value("preferences", "grid_size")
|
||||
Global.grid_width = int(grid_size.x)
|
||||
Global.grid_height = int(grid_size.y)
|
||||
grid_width_value.value = grid_size.x
|
||||
grid_height_value.value = grid_size.y
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "grid_color"):
|
||||
Global.grid_color = Global.config_cache.get_value("preferences", "grid_color")
|
||||
grid_color.color = Global.grid_color
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "checker_size"):
|
||||
var checker_size = Global.config_cache.get_value("preferences", "checker_size")
|
||||
Global.checker_size = int(checker_size)
|
||||
checker_size_value.value = checker_size
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "checker_color_1"):
|
||||
Global.checker_color_1 = Global.config_cache.get_value("preferences", "checker_color_1")
|
||||
checker_color_1.color = Global.checker_color_1
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "checker_color_2"):
|
||||
Global.checker_color_2 = Global.config_cache.get_value("preferences", "checker_color_2")
|
||||
checker_color_2.color = Global.checker_color_2
|
||||
|
||||
Global.transparent_checker._ready()
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "guide_color"):
|
||||
Global.guide_color = Global.config_cache.get_value("preferences", "guide_color")
|
||||
for canvas in Global.canvases:
|
||||
for guide in canvas.get_children():
|
||||
if guide is Guide:
|
||||
guide.default_color = Global.guide_color
|
||||
guide_color.color = Global.guide_color
|
||||
|
||||
# Set default values for Image
|
||||
if Global.config_cache.has_section_key("preferences", "default_width"):
|
||||
var default_width = Global.config_cache.get_value("preferences", "default_width")
|
||||
Global.default_image_width = int(default_width)
|
||||
default_width_value.value = Global.default_image_width
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "default_height"):
|
||||
var default_height = Global.config_cache.get_value("preferences", "default_height")
|
||||
Global.default_image_height = int(default_height)
|
||||
default_height_value.value = Global.default_image_height
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "default_fill_color"):
|
||||
var fill_color = Global.config_cache.get_value("preferences", "default_fill_color")
|
||||
Global.default_fill_color = fill_color
|
||||
default_fill_color.color = Global.default_fill_color
|
||||
|
||||
guide_color.get_picker().presets_visible = false
|
||||
grid_color.get_picker().presets_visible = false
|
||||
checker_color_1.get_picker().presets_visible = false
|
||||
checker_color_2.get_picker().presets_visible = false
|
||||
default_fill_color.get_picker().presets_visible = false
|
||||
|
||||
# Get default preset for shortcuts from project input map
|
||||
# Buttons in shortcuts selector should be called the same as actions
|
||||
for shortcut_grid_item in shortcuts.get_node("Shortcuts").get_children():
|
||||
if shortcut_grid_item is Button:
|
||||
var input_events = InputMap.get_action_list(shortcut_grid_item.name)
|
||||
if input_events.size() > 1:
|
||||
printerr("Every shortcut action should have just one input event assigned in input map")
|
||||
shortcut_grid_item.text = (input_events[0] as InputEventKey).as_text()
|
||||
shortcut_grid_item.connect("pressed", self, "_on_Shortcut_button_pressed", [shortcut_grid_item])
|
||||
default_shortcuts_preset[shortcut_grid_item.name] = input_events[0]
|
||||
|
||||
# Load custom shortcuts from the config file
|
||||
custom_shortcuts_preset = default_shortcuts_preset.duplicate()
|
||||
for action in default_shortcuts_preset:
|
||||
var saved_input_event = Global.config_cache.get_value("shortcuts", action, 0)
|
||||
if saved_input_event is InputEventKey:
|
||||
custom_shortcuts_preset[action] = saved_input_event
|
||||
|
||||
var shortcuts_preset = Global.config_cache.get_value("shortcuts", "shortcuts_preset", 0)
|
||||
shortcuts.get_node("HBoxContainer/PresetOptionButton").select(shortcuts_preset)
|
||||
_on_PresetOptionButton_item_selected(shortcuts_preset)
|
||||
|
||||
|
||||
func _input(event : InputEvent) -> void:
|
||||
if event is InputEventKey:
|
||||
if event.pressed:
|
||||
if event.scancode == KEY_ESCAPE:
|
||||
$Popups/ShortcutSelector.hide()
|
||||
else:
|
||||
# Check if shortcut was already used
|
||||
for action in InputMap.get_actions():
|
||||
for input_event in InputMap.get_action_list(action):
|
||||
if input_event is InputEventKey:
|
||||
if OS.get_scancode_string(input_event.get_scancode_with_modifiers()) == OS.get_scancode_string(event.get_scancode_with_modifiers()):
|
||||
$Popups/ShortcutSelector/EnteredShortcut.text = tr("Already assigned")
|
||||
$Popups/ShortcutSelector/EnteredShortcut.add_color_override("font_color", Color.crimson)
|
||||
get_tree().set_input_as_handled()
|
||||
shortcut_already_assigned = true
|
||||
return
|
||||
|
||||
# Store new shortcut
|
||||
shortcut_already_assigned = false
|
||||
old_input_event = InputMap.get_action_list(action_being_edited)[0]
|
||||
new_input_event = event
|
||||
$Popups/ShortcutSelector/EnteredShortcut.text = OS.get_scancode_string(event.get_scancode_with_modifiers())
|
||||
$Popups/ShortcutSelector/EnteredShortcut.add_color_override("font_color", theme_font_color)
|
||||
get_tree().set_input_as_handled()
|
||||
|
||||
|
||||
func _on_PreferencesDialog_about_to_show(changed_language := false) -> void:
|
||||
var root := tree.create_item()
|
||||
var general_button := tree.create_item(root)
|
||||
var language_button := tree.create_item(root)
|
||||
var theme_button := tree.create_item(root)
|
||||
var canvas_button := tree.create_item(root)
|
||||
var image_button := tree.create_item(root)
|
||||
var shortcuts_button := tree.create_item(root)
|
||||
|
||||
general_button.set_text(0, " " + tr("General"))
|
||||
# We use metadata to avoid being affected by translations
|
||||
general_button.set_metadata(0, "General")
|
||||
language_button.set_text(0, " " + tr("Language"))
|
||||
language_button.set_metadata(0, "Language")
|
||||
theme_button.set_text(0, " " + tr("Themes"))
|
||||
theme_button.set_metadata(0, "Themes")
|
||||
canvas_button.set_text(0, " " + tr("Canvas"))
|
||||
canvas_button.set_metadata(0, "Canvas")
|
||||
image_button.set_text(0, " " + tr("Image"))
|
||||
image_button.set_metadata(0, "Image")
|
||||
shortcuts_button.set_text(0, " " + tr("Shortcuts"))
|
||||
shortcuts_button.set_metadata(0, "Shortcuts")
|
||||
|
||||
if changed_language:
|
||||
language_button.select(0)
|
||||
else:
|
||||
general_button.select(0)
|
||||
|
||||
general.get_node("AutosaveInterval/AutosaveInterval").suffix = tr("minute(s)")
|
||||
|
||||
|
||||
func _on_PreferencesDialog_popup_hide() -> void:
|
||||
tree.clear()
|
||||
|
||||
|
||||
func _on_Tree_item_selected() -> void:
|
||||
for child in right_side.get_children():
|
||||
child.visible = false
|
||||
var selected : String = tree.get_selected().get_metadata(0)
|
||||
if "General" in selected:
|
||||
general.visible = true
|
||||
elif "Language" in selected:
|
||||
languages.visible = true
|
||||
elif "Themes" in selected:
|
||||
themes.visible = true
|
||||
elif "Canvas" in selected:
|
||||
canvas.visible = true
|
||||
elif "Image" in selected:
|
||||
image.visible = true
|
||||
elif "Shortcuts" in selected:
|
||||
shortcuts.visible = true
|
||||
|
||||
|
||||
func _on_PressureSensitivityOptionButton_item_selected(id : int) -> void:
|
||||
Global.pressure_sensitivity_mode = id
|
||||
Global.config_cache.set_value("preferences", "pressure_sensitivity", id)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_SmoothZoom_pressed() -> void:
|
||||
Global.smooth_zoom = !Global.smooth_zoom
|
||||
Global.config_cache.set_value("preferences", "smooth_zoom", Global.smooth_zoom)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_Theme_pressed(button : Button) -> void:
|
||||
var index := 0
|
||||
var i := 0
|
||||
for child in themes.get_children():
|
||||
if child is Button:
|
||||
if child == button:
|
||||
button.pressed = true
|
||||
index = i
|
||||
else:
|
||||
child.pressed = false
|
||||
i += 1
|
||||
|
||||
change_theme(index)
|
||||
|
||||
Global.config_cache.set_value("preferences", "theme", index)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func change_theme(ID : int) -> void:
|
||||
var font = Global.control.theme.default_font
|
||||
var main_theme : Theme
|
||||
var top_menu_style
|
||||
var ruler_style
|
||||
if ID == 0: # Dark Theme
|
||||
Global.theme_type = "Dark"
|
||||
main_theme = preload("res://assets/themes/dark/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/dark/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/dark/ruler_style.tres")
|
||||
elif ID == 1: # Gray Theme
|
||||
Global.theme_type = "Dark"
|
||||
main_theme = preload("res://assets/themes/gray/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/gray/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/dark/ruler_style.tres")
|
||||
elif ID == 2: # Godot's Theme
|
||||
Global.theme_type = "Blue"
|
||||
main_theme = preload("res://assets/themes/blue/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/blue/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/blue/ruler_style.tres")
|
||||
elif ID == 3: # Caramel Theme
|
||||
Global.theme_type = "Caramel"
|
||||
main_theme = preload("res://assets/themes/caramel/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/caramel/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/caramel/ruler_style.tres")
|
||||
elif ID == 4: # Light Theme
|
||||
Global.theme_type = "Light"
|
||||
main_theme = preload("res://assets/themes/light/theme.tres")
|
||||
top_menu_style = preload("res://assets/themes/light/top_menu_style.tres")
|
||||
ruler_style = preload("res://assets/themes/light/ruler_style.tres")
|
||||
|
||||
Global.control.theme = main_theme
|
||||
Global.control.theme.default_font = font
|
||||
var default_clear_color : Color = main_theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
VisualServer.set_default_clear_color(Color(default_clear_color))
|
||||
(Global.animation_timeline.get_stylebox("panel", "Panel") as StyleBoxFlat).bg_color = main_theme.get_stylebox("panel", "Panel").bg_color
|
||||
var layer_button_panel_container : PanelContainer = Global.find_node_by_name(Global.animation_timeline, "LayerButtonPanelContainer")
|
||||
(layer_button_panel_container.get_stylebox("panel", "PanelContainer") as StyleBoxFlat).bg_color = default_clear_color
|
||||
|
||||
Global.top_menu_container.add_stylebox_override("panel", top_menu_style)
|
||||
Global.horizontal_ruler.add_stylebox_override("normal", ruler_style)
|
||||
Global.horizontal_ruler.add_stylebox_override("pressed", ruler_style)
|
||||
Global.horizontal_ruler.add_stylebox_override("hover", ruler_style)
|
||||
Global.horizontal_ruler.add_stylebox_override("focus", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("normal", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("pressed", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("hover", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
|
||||
|
||||
var fake_vsplit_grabber : TextureRect = Global.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
|
||||
|
||||
if Global.theme_type == "Dark" or Global.theme_type == "Blue":
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/dark/icons/vsplit.png")
|
||||
else:
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/light/icons/vsplit.png")
|
||||
|
||||
for button in get_tree().get_nodes_in_group("UIButtons"):
|
||||
if button is TextureButton:
|
||||
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
|
||||
var button_category = button.texture_normal.resource_path.get_base_dir().right(last_backslash + 1)
|
||||
var normal_file_name = button.texture_normal.resource_path.get_file()
|
||||
var theme_type := Global.theme_type
|
||||
if theme_type == "Blue":
|
||||
theme_type = "Dark"
|
||||
button.texture_normal = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, normal_file_name])
|
||||
if button.texture_pressed:
|
||||
var pressed_file_name = button.texture_pressed.resource_path.get_file()
|
||||
button.texture_pressed = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, pressed_file_name])
|
||||
if button.texture_hover:
|
||||
var hover_file_name = button.texture_hover.resource_path.get_file()
|
||||
button.texture_hover = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, hover_file_name])
|
||||
if button.texture_disabled:
|
||||
var disabled_file_name = button.texture_disabled.resource_path.get_file()
|
||||
button.texture_disabled = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, disabled_file_name])
|
||||
elif button is Button:
|
||||
var texture : TextureRect
|
||||
for child in button.get_children():
|
||||
if child is TextureRect:
|
||||
texture = child
|
||||
break
|
||||
|
||||
if texture:
|
||||
var last_backslash = texture.texture.resource_path.get_base_dir().find_last("/")
|
||||
var button_category = texture.texture.resource_path.get_base_dir().right(last_backslash + 1)
|
||||
var normal_file_name = texture.texture.resource_path.get_file()
|
||||
var theme_type := Global.theme_type
|
||||
if theme_type == "Caramel" or (theme_type == "Blue" and button_category != "tools"):
|
||||
theme_type = "Dark"
|
||||
|
||||
texture.texture = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, normal_file_name])
|
||||
|
||||
# Make sure the frame text gets updated
|
||||
Global.current_frame = Global.current_frame
|
||||
|
||||
$Popups/ShortcutSelector.theme = main_theme
|
||||
|
||||
|
||||
func apply_shortcuts_preset(preset) -> void:
|
||||
for action in preset:
|
||||
var old_input_event : InputEventKey = InputMap.get_action_list(action)[0]
|
||||
set_action_shortcut(action, old_input_event, preset[action])
|
||||
shortcuts.get_node("Shortcuts/" + action).text = OS.get_scancode_string(preset[action].get_scancode_with_modifiers())
|
||||
|
||||
|
||||
func toggle_shortcut_buttons(enabled : bool) -> void:
|
||||
for shortcut_grid_item in shortcuts.get_node("Shortcuts").get_children():
|
||||
if shortcut_grid_item is Button:
|
||||
shortcut_grid_item.disabled = not enabled
|
||||
if shortcut_grid_item.disabled:
|
||||
shortcut_grid_item.mouse_default_cursor_shape = Control.CURSOR_FORBIDDEN
|
||||
else:
|
||||
shortcut_grid_item.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
|
||||
|
||||
|
||||
func set_action_shortcut(action : String, old_input : InputEventKey, new_input : InputEventKey) -> void:
|
||||
InputMap.action_erase_event(action, old_input)
|
||||
InputMap.action_add_event(action, new_input)
|
||||
Global.update_hint_tooltips()
|
||||
# Set shortcut to switch colors button
|
||||
if action == "switch_colors":
|
||||
Global.color_switch_button.shortcut.shortcut = InputMap.get_action_list("switch_colors")[0]
|
||||
|
||||
|
||||
func _on_GridWidthValue_value_changed(value : float) -> void:
|
||||
Global.grid_width = value
|
||||
Global.canvas.update()
|
||||
Global.config_cache.set_value("preferences", "grid_size", Vector2(value, grid_height_value.value))
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_GridHeightValue_value_changed(value : float) -> void:
|
||||
Global.grid_height = value
|
||||
Global.canvas.update()
|
||||
Global.config_cache.set_value("preferences", "grid_size", Vector2(grid_width_value.value, value))
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_GridColor_color_changed(color : Color) -> void:
|
||||
Global.grid_color = color
|
||||
Global.canvas.update()
|
||||
Global.config_cache.set_value("preferences", "grid_color", color)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_CheckerSize_value_changed(value : float) -> void:
|
||||
Global.checker_size = value
|
||||
Global.transparent_checker._ready()
|
||||
Global.config_cache.set_value("preferences", "checker_size", value)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_CheckerColor1_color_changed(color : Color) -> void:
|
||||
Global.checker_color_1 = color
|
||||
Global.transparent_checker._ready()
|
||||
Global.config_cache.set_value("preferences", "checker_color_1", color)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_CheckerColor2_color_changed(color : Color) -> void:
|
||||
Global.checker_color_2 = color
|
||||
Global.transparent_checker._ready()
|
||||
Global.config_cache.set_value("preferences", "checker_color_2", color)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_GuideColor_color_changed(color : Color) -> void:
|
||||
Global.guide_color = color
|
||||
for canvas in Global.canvases:
|
||||
for guide in canvas.get_children():
|
||||
if guide is Guide:
|
||||
guide.default_color = color
|
||||
Global.config_cache.set_value("preferences", "guide_color", color)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_ImageDefaultWidth_value_changed(value: float) -> void:
|
||||
Global.default_image_width = value
|
||||
Global.config_cache.set_value("preferences", "default_width", value)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_ImageDefaultHeight_value_changed(value: float) -> void:
|
||||
Global.default_image_height = value
|
||||
Global.config_cache.set_value("preferences", "default_height", value)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_DefaultBackground_color_changed(color: Color) -> void:
|
||||
Global.default_fill_color = color
|
||||
Global.config_cache.set_value("preferences", "default_fill_color", color)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_LeftIndicatorCheckbox_toggled(button_pressed : bool) -> void:
|
||||
Global.left_square_indicator_visible = button_pressed
|
||||
|
||||
|
||||
func _on_RightIndicatorCheckbox_toggled(button_pressed : bool) -> void:
|
||||
Global.right_square_indicator_visible = button_pressed
|
||||
|
||||
|
||||
func _on_LeftToolIconCheckbox_toggled(button_pressed : bool) -> void:
|
||||
Global.show_left_tool_icon = button_pressed
|
||||
Global.config_cache.set_value("preferences", "show_left_tool_icon", Global.show_left_tool_icon)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_RightToolIconCheckbox_toggled(button_pressed : bool) -> void:
|
||||
Global.show_right_tool_icon = button_pressed
|
||||
Global.config_cache.set_value("preferences", "show_right_tool_icon", Global.show_right_tool_icon)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_Shortcut_button_pressed(button : Button) -> void:
|
||||
set_process_input(true)
|
||||
action_being_edited = button.name
|
||||
new_input_event = InputMap.get_action_list(button.name)[0]
|
||||
shortcut_already_assigned = true
|
||||
$Popups/ShortcutSelector.popup_centered()
|
||||
|
||||
|
||||
func _on_ShortcutSelector_popup_hide() -> void:
|
||||
set_process_input(false)
|
||||
$Popups/ShortcutSelector/EnteredShortcut.text = ""
|
||||
|
||||
|
||||
func _on_PresetOptionButton_item_selected(id : int) -> void:
|
||||
# Only custom preset which is modifiable
|
||||
toggle_shortcut_buttons(true if id == 1 else false)
|
||||
match id:
|
||||
0:
|
||||
apply_shortcuts_preset(default_shortcuts_preset)
|
||||
1:
|
||||
apply_shortcuts_preset(custom_shortcuts_preset)
|
||||
Global.config_cache.set_value("shortcuts", "shortcuts_preset", id)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_ShortcutSelector_confirmed() -> void:
|
||||
if not shortcut_already_assigned:
|
||||
set_action_shortcut(action_being_edited, old_input_event, new_input_event)
|
||||
custom_shortcuts_preset[action_being_edited] = new_input_event
|
||||
Global.config_cache.set_value("shortcuts", action_being_edited, new_input_event)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
shortcuts.get_node("Shortcuts/" + action_being_edited).text = OS.get_scancode_string(new_input_event.get_scancode_with_modifiers())
|
||||
$Popups/ShortcutSelector.hide()
|
||||
|
||||
|
||||
func _on_OpenLastProject_pressed() -> void:
|
||||
Global.open_last_project = !Global.open_last_project
|
||||
Global.config_cache.set_value("preferences", "open_last_project", Global.open_last_project)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_EnableAutosave_toggled(button_pressed : bool) -> void:
|
||||
OpenSave.toggle_autosave(button_pressed)
|
||||
Global.config_cache.set_value("preferences", "enable_autosave", button_pressed)
|
||||
Global.config_cache.save("user://cache.ini")
|
||||
|
||||
|
||||
func _on_AutosaveInterval_value_changed(value : float) -> void:
|
||||
OpenSave.set_autosave_interval(value)
|
||||
Global.config_cache.set_value("preferences", "autosave_interval", value)
|
||||
Global.config_cache.save("user://cache.ini")
|
892
src/Preferences/PreferencesDialog.tscn
Normal file
892
src/Preferences/PreferencesDialog.tscn
Normal file
|
@ -0,0 +1,892 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://src/Preferences/PreferencesDialog.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/fonts/Roboto-Regular.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://assets/fonts/CJK/NotoSansCJKtc-Regular.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://src/Preferences/HandleLanguages.gd" type="Script" id=4]
|
||||
|
||||
[node name="PreferencesDialog" type="AcceptDialog"]
|
||||
margin_left = -3.0
|
||||
margin_top = 9.0
|
||||
margin_right = 419.0
|
||||
margin_bottom = 1163.0
|
||||
rect_min_size = Vector2( 620, 450 )
|
||||
window_title = "Preferences"
|
||||
resizable = true
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_horizontal_guides_": [ ],
|
||||
"_edit_use_anchors_": false,
|
||||
"_edit_vertical_guides_": [ ]
|
||||
}
|
||||
|
||||
[node name="HSplitContainer" type="HSplitContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -36.0
|
||||
size_flags_horizontal = 3
|
||||
custom_constants/autohide = 0
|
||||
split_offset = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Tree" type="Tree" parent="HSplitContainer"]
|
||||
margin_right = 86.0
|
||||
margin_bottom = 1110.0
|
||||
rect_min_size = Vector2( 85, 0 )
|
||||
custom_constants/item_margin = -2
|
||||
hide_root = true
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="HSplitContainer"]
|
||||
margin_left = 98.0
|
||||
margin_right = 604.0
|
||||
margin_bottom = 1110.0
|
||||
rect_min_size = Vector2( 100, 0 )
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"]
|
||||
margin_right = 506.0
|
||||
margin_bottom = 1286.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="General" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 180.0
|
||||
|
||||
[node name="SmoothZoom" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Adds a smoother transition when zooming in or out"
|
||||
mouse_default_cursor_shape = 2
|
||||
pressed = true
|
||||
text = "Smooth Zoom"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 32.0
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 36.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 88.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="LeftIndicatorCheckbox" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer"]
|
||||
margin_right = 245.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Show left mouse pixel indicator or brush on the canvas when drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
pressed = true
|
||||
text = "Left pixel indicator"
|
||||
|
||||
[node name="RightIndicatorCheckbox" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer"]
|
||||
margin_left = 249.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Show right mouse pixel indicator or brush on the canvas when drawing"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Right pixel indicator"
|
||||
|
||||
[node name="LeftToolIconCheckbox" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer"]
|
||||
margin_top = 28.0
|
||||
margin_right = 245.0
|
||||
margin_bottom = 52.0
|
||||
hint_tooltip = "Displays an icon of the selected left tool next to the cursor on the canvas"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
pressed = true
|
||||
text = "Show left tool icon"
|
||||
|
||||
[node name="RightToolIconCheckbox" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer"]
|
||||
margin_left = 249.0
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 52.0
|
||||
hint_tooltip = "Displays an icon of the selected right tool next to the cursor on the canvas"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
pressed = true
|
||||
text = "Show right tool icon"
|
||||
|
||||
[node name="HSeparator3" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 92.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 96.0
|
||||
|
||||
[node name="PressureSentivity" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
visible = false
|
||||
margin_top = 116.0
|
||||
margin_right = 334.0
|
||||
margin_bottom = 136.0
|
||||
|
||||
[node name="PressureSensitivityLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/PressureSentivity"]
|
||||
margin_top = 3.0
|
||||
margin_right = 173.0
|
||||
margin_bottom = 17.0
|
||||
text = "Tablet pressure sensitivity:"
|
||||
|
||||
[node name="PressureSensitivityOptionButton" type="OptionButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/PressureSentivity"]
|
||||
margin_left = 177.0
|
||||
margin_right = 334.0
|
||||
margin_bottom = 20.0
|
||||
text = "Affect Brush's Alpha"
|
||||
items = [ "None", null, false, 0, null, "Affect Brush's Alpha", null, false, 1, null ]
|
||||
selected = 1
|
||||
|
||||
[node name="OpenLastProject" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 100.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 124.0
|
||||
hint_tooltip = "Opens last opened project on startup"
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Open last project on startup"
|
||||
|
||||
[node name="EnableAutosave" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 128.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 152.0
|
||||
mouse_default_cursor_shape = 2
|
||||
pressed = true
|
||||
text = "Enable autosave"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AutosaveInterval" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/General"]
|
||||
margin_top = 156.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 180.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AutosaveIntervalLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/AutosaveInterval"]
|
||||
margin_top = 5.0
|
||||
margin_right = 115.0
|
||||
margin_bottom = 19.0
|
||||
text = "Autosave interval:"
|
||||
|
||||
[node name="AutosaveInterval" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/General/AutosaveInterval"]
|
||||
margin_left = 119.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 0.5
|
||||
max_value = 30.0
|
||||
step = 0.5
|
||||
value = 1.0
|
||||
align = 2
|
||||
suffix = "minute(s)"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Languages" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_top = 184.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 632.0
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="System Language" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
pressed = true
|
||||
text = "System Language"
|
||||
|
||||
[node name="Czech" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 52.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Czech [cs]"
|
||||
|
||||
[node name="German" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 56.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 80.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Deutsch [de]"
|
||||
|
||||
[node name="Greek" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 84.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 108.0
|
||||
mouse_default_cursor_shape = 2
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "Ελληνικά [el]"
|
||||
|
||||
[node name="English" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 112.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 136.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "English [en]"
|
||||
|
||||
[node name="Esperanto" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 140.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 164.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Esperanto [eo]"
|
||||
|
||||
[node name="Spanish" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 168.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 192.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Español [es]"
|
||||
|
||||
[node name="French" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 196.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 220.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Français [fr]"
|
||||
|
||||
[node name="Indonesian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 224.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 248.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Indonesian [id]"
|
||||
|
||||
[node name="Italian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 252.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 276.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Italiano [it]"
|
||||
|
||||
[node name="Latvian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 280.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 304.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Latvian [lv]"
|
||||
|
||||
[node name="Polish" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 308.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 332.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Polski [pl]"
|
||||
|
||||
[node name="Brazilian Portuguese" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 336.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 360.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Português Brasileiro [pt_BR]"
|
||||
|
||||
[node name="Russian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 364.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 388.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Русский [ru]"
|
||||
|
||||
[node name="Chinese Simplified" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 392.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 418.0
|
||||
mouse_default_cursor_shape = 2
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "简体中文 [zh_CN]"
|
||||
|
||||
[node name="Chinese Traditional" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||
margin_top = 422.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 448.0
|
||||
mouse_default_cursor_shape = 2
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "繁體中文 [zh_TW]"
|
||||
|
||||
[node name="Themes" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_top = 636.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 772.0
|
||||
|
||||
[node name="Dark Theme" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Dark"
|
||||
|
||||
[node name="Gray Theme" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 52.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Gray"
|
||||
|
||||
[node name="Blue Theme" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_top = 56.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 80.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Blue"
|
||||
|
||||
[node name="Caramel Theme" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_top = 84.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 108.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Caramel"
|
||||
|
||||
[node name="Light Theme" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_top = 112.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 136.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Light"
|
||||
|
||||
[node name="Canvas" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_top = 776.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 968.0
|
||||
|
||||
[node name="GuideOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 20.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="GuideColorLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GuideOptions"]
|
||||
margin_top = 3.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 17.0
|
||||
rect_min_size = Vector2( 110, 0 )
|
||||
hint_tooltip = "A color of ruler guides displayed on the canvas"
|
||||
mouse_filter = 0
|
||||
text = "Guides color:"
|
||||
|
||||
[node name="GuideColor" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GuideOptions"]
|
||||
margin_left = 114.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 20.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
hint_tooltip = "A color of ruler guides displayed on the canvas"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
color = Color( 0.63, 0.13, 0.94, 1 )
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas"]
|
||||
margin_top = 24.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 28.0
|
||||
|
||||
[node name="GridOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas"]
|
||||
margin_top = 32.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 108.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="WidthLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_top = 5.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 110, 0 )
|
||||
hint_tooltip = "Sets how far apart are vertical lines of the grid"
|
||||
mouse_filter = 0
|
||||
text = "Grid width:"
|
||||
|
||||
[node name="GridWidthValue" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_left = 114.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Sets how far apart are vertical lines of the grid"
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 1.0
|
||||
align = 2
|
||||
suffix = "px"
|
||||
|
||||
[node name="Height" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_top = 33.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 47.0
|
||||
hint_tooltip = "Sets how far apart are horizontal lines of the grid"
|
||||
mouse_filter = 0
|
||||
text = "Grid height:"
|
||||
|
||||
[node name="GridHeightValue" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 52.0
|
||||
hint_tooltip = "Sets how far apart are horizontal lines of the grid"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 1.0
|
||||
align = 2
|
||||
suffix = "px"
|
||||
|
||||
[node name="GridColorLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_top = 59.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 73.0
|
||||
hint_tooltip = "A color of the grid"
|
||||
mouse_filter = 0
|
||||
text = "Grid color:"
|
||||
|
||||
[node name="GridColor" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 56.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 76.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
hint_tooltip = "A color of the grid"
|
||||
mouse_default_cursor_shape = 2
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas"]
|
||||
margin_top = 112.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 116.0
|
||||
|
||||
[node name="CheckerOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas"]
|
||||
margin_top = 120.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 192.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="SizeLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_top = 5.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 110, 0 )
|
||||
hint_tooltip = "Size of the transparent checker background"
|
||||
mouse_filter = 0
|
||||
text = "Checker size:"
|
||||
|
||||
[node name="CheckerSizeValue" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_left = 114.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Size of the transparent checker background"
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 10.0
|
||||
align = 2
|
||||
suffix = "px"
|
||||
|
||||
[node name="CheckerColor1Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_top = 31.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 45.0
|
||||
hint_tooltip = "First color of the transparent checker background"
|
||||
mouse_filter = 0
|
||||
text = "Checker color 1:"
|
||||
|
||||
[node name="CheckerColor1" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 28.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 48.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
hint_tooltip = "First color of the transparent checker background"
|
||||
mouse_default_cursor_shape = 2
|
||||
color = Color( 0.470588, 0.470588, 0.470588, 1 )
|
||||
|
||||
[node name="CheckerColor2Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_top = 55.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 69.0
|
||||
hint_tooltip = "Second color of the transparent checker background"
|
||||
mouse_filter = 0
|
||||
text = "Checker color 2:"
|
||||
|
||||
[node name="CheckerColor2" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 52.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 72.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
hint_tooltip = "Second color of the transparent checker background"
|
||||
mouse_default_cursor_shape = 2
|
||||
color = Color( 0.341176, 0.34902, 0.341176, 1 )
|
||||
|
||||
[node name="Image" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_top = 972.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 1048.0
|
||||
|
||||
[node name="ImageOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 76.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="DefaultWidthLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_top = 5.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 19.0
|
||||
rect_min_size = Vector2( 110, 0 )
|
||||
hint_tooltip = "A default width of a new image"
|
||||
mouse_filter = 0
|
||||
text = "Default width:"
|
||||
|
||||
[node name="ImageDefaultWidth" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_left = 114.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "A default width of a new image"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
align = 2
|
||||
suffix = "px"
|
||||
|
||||
[node name="DefaultHeightLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_top = 33.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 47.0
|
||||
hint_tooltip = "A default height of a new image"
|
||||
mouse_filter = 0
|
||||
text = "Default height:"
|
||||
|
||||
[node name="ImageDefaultHeight" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 28.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 52.0
|
||||
hint_tooltip = "A default height of a new image"
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
align = 2
|
||||
suffix = "px"
|
||||
|
||||
[node name="DefaultFillColorLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_top = 59.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 73.0
|
||||
hint_tooltip = "A default background color of a new image"
|
||||
mouse_filter = 0
|
||||
text = "Default fill color:"
|
||||
|
||||
[node name="DefaultFillColor" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||
margin_left = 114.0
|
||||
margin_top = 56.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 76.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
hint_tooltip = "A default background color of a new image"
|
||||
mouse_default_cursor_shape = 2
|
||||
color = Color( 0, 0, 0, 0 )
|
||||
|
||||
[node name="Shortcuts" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
margin_top = 1052.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 1286.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts"]
|
||||
margin_right = 494.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Only custom preset can be modified"
|
||||
|
||||
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/HBoxContainer"]
|
||||
margin_top = 3.0
|
||||
margin_right = 45.0
|
||||
margin_bottom = 17.0
|
||||
text = "Preset:"
|
||||
|
||||
[node name="PresetOptionButton" type="OptionButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/HBoxContainer"]
|
||||
margin_left = 49.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Only custom preset can be modified"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Default"
|
||||
items = [ "Default", null, false, 0, null, "Custom", null, false, 1, null ]
|
||||
selected = 0
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts"]
|
||||
margin_top = 24.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 28.0
|
||||
|
||||
[node name="Shortcuts" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts"]
|
||||
margin_top = 32.0
|
||||
margin_right = 494.0
|
||||
margin_bottom = 234.0
|
||||
custom_constants/vseparation = 2
|
||||
custom_constants/hseparation = 5
|
||||
columns = 3
|
||||
|
||||
[node name="Empty" type="Control" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_right = 137.0
|
||||
margin_bottom = 14.0
|
||||
|
||||
[node name="LeftToolLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 14.0
|
||||
hint_tooltip = "A tool assigned to the left mouse button"
|
||||
mouse_filter = 0
|
||||
text = "Left Tool:"
|
||||
align = 1
|
||||
|
||||
[node name="RightToolLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 14.0
|
||||
hint_tooltip = "A tool assigned to the right mouse button"
|
||||
mouse_filter = 0
|
||||
text = "Right Tool:"
|
||||
align = 1
|
||||
|
||||
[node name="Empty2" type="Control" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 16.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
visible = false
|
||||
margin_top = 18.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 22.0
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 16.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="HSeparator3" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 16.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="RectSelectLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 25.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 39.0
|
||||
text = "Rectangular Selection"
|
||||
|
||||
[node name="left_rectangle_select_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 22.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 42.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="right_rectangle_select_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 22.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 42.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ZoomLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 47.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 61.0
|
||||
text = "Zoom"
|
||||
|
||||
[node name="left_zoom_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 44.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 64.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="right_zoom_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 44.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 64.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ColorPickerLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 69.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 83.0
|
||||
text = "Color Picker"
|
||||
|
||||
[node name="left_colorpicker_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 66.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 86.0
|
||||
|
||||
[node name="right_colorpicker_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 66.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 86.0
|
||||
|
||||
[node name="PencilLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 91.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 105.0
|
||||
text = "Pencil"
|
||||
|
||||
[node name="left_pencil_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 88.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 108.0
|
||||
|
||||
[node name="right_pencil_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 88.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 108.0
|
||||
|
||||
[node name="EraserLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 113.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 127.0
|
||||
text = "Eraser"
|
||||
|
||||
[node name="left_eraser_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 110.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 130.0
|
||||
|
||||
[node name="right_eraser_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 110.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 130.0
|
||||
|
||||
[node name="BucketLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 135.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 149.0
|
||||
text = "Bucket"
|
||||
|
||||
[node name="left_fill_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 132.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 152.0
|
||||
|
||||
[node name="right_fill_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 132.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 152.0
|
||||
|
||||
[node name="LightenDarkenLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 157.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 171.0
|
||||
text = "Lighten/Darken"
|
||||
|
||||
[node name="left_lightdark_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 154.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 174.0
|
||||
|
||||
[node name="right_lightdark_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 154.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 174.0
|
||||
|
||||
[node name="HSeparator4" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 176.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 180.0
|
||||
|
||||
[node name="HSeparator5" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 176.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 180.0
|
||||
|
||||
[node name="HSeparator6" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 320.0
|
||||
margin_top = 176.0
|
||||
margin_right = 493.0
|
||||
margin_bottom = 180.0
|
||||
|
||||
[node name="Switch Colors" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_top = 185.0
|
||||
margin_right = 137.0
|
||||
margin_bottom = 199.0
|
||||
text = "Switch Colors"
|
||||
|
||||
[node name="switch_colors" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"]
|
||||
margin_left = 142.0
|
||||
margin_top = 182.0
|
||||
margin_right = 315.0
|
||||
margin_bottom = 202.0
|
||||
|
||||
[node name="Popups" type="Node" parent="."]
|
||||
|
||||
[node name="ShortcutSelector" type="ConfirmationDialog" parent="Popups"]
|
||||
margin_right = 250.0
|
||||
margin_bottom = 87.5
|
||||
rect_min_size = Vector2( 250, 87.5 )
|
||||
window_title = "Set the shortcut"
|
||||
dialog_text = "Press a key or a key combination to set the shortcut"
|
||||
dialog_hide_on_ok = false
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="EnteredShortcut" type="Label" parent="Popups/ShortcutSelector"]
|
||||
margin_left = 8.0
|
||||
margin_top = 22.0
|
||||
margin_right = 341.0
|
||||
margin_bottom = 51.5
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="about_to_show" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
||||
[connection signal="popup_hide" from="." to="." method="_on_PreferencesDialog_popup_hide"]
|
||||
[connection signal="item_selected" from="HSplitContainer/Tree" to="." method="_on_Tree_item_selected"]
|
||||
[connection signal="pressed" from="HSplitContainer/ScrollContainer/VBoxContainer/General/SmoothZoom" to="." method="_on_SmoothZoom_pressed"]
|
||||
[connection signal="toggled" from="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/LeftIndicatorCheckbox" to="." method="_on_LeftIndicatorCheckbox_toggled"]
|
||||
[connection signal="toggled" from="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/RightIndicatorCheckbox" to="." method="_on_RightIndicatorCheckbox_toggled"]
|
||||
[connection signal="toggled" from="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/LeftToolIconCheckbox" to="." method="_on_LeftToolIconCheckbox_toggled"]
|
||||
[connection signal="toggled" from="HSplitContainer/ScrollContainer/VBoxContainer/General/GridContainer/RightToolIconCheckbox" to="." method="_on_RightToolIconCheckbox_toggled"]
|
||||
[connection signal="item_selected" from="HSplitContainer/ScrollContainer/VBoxContainer/General/PressureSentivity/PressureSensitivityOptionButton" to="." method="_on_PressureSensitivityOptionButton_item_selected"]
|
||||
[connection signal="pressed" from="HSplitContainer/ScrollContainer/VBoxContainer/General/OpenLastProject" to="." method="_on_OpenLastProject_pressed"]
|
||||
[connection signal="toggled" from="HSplitContainer/ScrollContainer/VBoxContainer/General/EnableAutosave" to="." method="_on_EnableAutosave_toggled"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/General/AutosaveInterval/AutosaveInterval" to="." method="_on_AutosaveInterval_value_changed"]
|
||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GuideOptions/GuideColor" to="." method="_on_GuideColor_color_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridWidthValue" to="." method="_on_GridWidthValue_value_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridHeightValue" to="." method="_on_GridHeightValue_value_changed"]
|
||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/GridOptions/GridColor" to="." method="_on_GridColor_color_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerSizeValue" to="." method="_on_CheckerSize_value_changed"]
|
||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerColor1" to="." method="_on_CheckerColor1_color_changed"]
|
||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Canvas/CheckerOptions/CheckerColor2" to="." method="_on_CheckerColor2_color_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultWidth" to="." method="_on_ImageDefaultWidth_value_changed"]
|
||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultHeight" to="." method="_on_ImageDefaultHeight_value_changed"]
|
||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/DefaultFillColor" to="." method="_on_DefaultBackground_color_changed"]
|
||||
[connection signal="item_selected" from="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/HBoxContainer/PresetOptionButton" to="." method="_on_PresetOptionButton_item_selected"]
|
||||
[connection signal="confirmed" from="Popups/ShortcutSelector" to="." method="_on_ShortcutSelector_confirmed"]
|
||||
[connection signal="popup_hide" from="Popups/ShortcutSelector" to="." method="_on_ShortcutSelector_popup_hide"]
|
Loading…
Add table
Add a link
Reference in a new issue