From 646fc19a70f21952c5c960d79d3e2ffa2a447b11 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 1 May 2020 22:17:05 +0300 Subject: [PATCH] Merged "Scripts" and "Prefabs" folders into "src" Made a new "src" folder that will contain the source code files, like all the GDScript and scene files. Please read this for more details: https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/ It made no sense to keep scenes separate from their scripts. More file organizing will follow soon. --- project.godot | 22 ++++---- {Prefabs => src}/AnimationTag.tscn | 0 {Scripts => src}/AnimationTimeline.gd | 4 +- {Prefabs => src}/AnimationTimeline.tscn | 10 ++-- {Scripts => src/Autoload}/Global.gd | 30 +++++------ {Scripts => src/Autoload}/Import.gd | 2 +- {Scripts => src/Autoload}/OpenSave.gd | 2 +- {Scripts => src}/BrushButton.gd | 0 {Prefabs => src}/BrushButton.tscn | 3 +- {Scripts => src}/CameraMovement.gd | 0 {Scripts => src}/Canvas.gd | 2 +- {Prefabs => src}/Canvas.tscn | 3 +- Scripts/FrameButton.gd => src/CelButton.gd | 3 +- .../FrameButton.tscn => src/CelButton.tscn | 8 +-- {Scripts => src}/Dialogs/AboutDialog.gd | 0 {Prefabs => src}/Dialogs/AboutDialog.tscn | 3 +- {Scripts => src}/Dialogs/CreateNewImage.gd | 2 +- {Prefabs => src}/Dialogs/CreateNewImage.tscn | 3 +- {Scripts => src}/Dialogs/ExportDialog.gd | 0 {Prefabs => src}/Dialogs/ExportDialog.tscn | 3 +- {Scripts => src}/Dialogs/FrameTagDialog.gd | 0 {Prefabs => src}/Dialogs/FrameTagDialog.tscn | 3 +- {Scripts => src}/Dialogs/HSVDialog.gd | 0 {Prefabs => src}/Dialogs/HSVDialog.tscn | 3 +- {Scripts => src}/Dialogs/ImportSprites.gd | 4 +- {Prefabs => src}/Dialogs/ImportSprites.tscn | 3 +- .../NoProjectEditedOrCreatedAlertDialog.tscn | 0 .../Dialogs/OpenLastProjectAlertDialog.tscn | 0 {Scripts => src}/Dialogs/OutlineDialog.gd | 0 {Prefabs => src}/Dialogs/OutlineDialog.tscn | 3 +- {Scripts => src}/Dialogs/PreferencesDialog.gd | 0 .../Dialogs/PreferencesDialog.tscn | 3 +- {Prefabs => src}/Dialogs/RotateImage.gd | 0 {Prefabs => src}/Dialogs/RotateImage.tscn | 3 +- {Scripts => src}/Dialogs/ScaleImage.gd | 0 {Prefabs => src}/Dialogs/ScaleImage.tscn | 3 +- {Scripts => src}/Dialogs/SplashDialog.gd | 0 {Prefabs => src}/Dialogs/SplashDialog.tscn | 3 +- {Scripts => src}/Drawers.gd | 0 .../LayerContainer.gd => src/LayerButton.gd | 2 +- .../LayerButton.tscn | 28 +++++----- {Scripts => src}/Main.gd | 0 Main.tscn => src/Main.tscn | 52 +++++++++---------- {Scripts => src}/NotificationLabel.gd | 0 {Prefabs => src}/NotificationLabel.tscn | 3 +- {Scripts => src}/Palette/EditPalettePopup.gd | 2 +- .../Palette}/EditPalettePopup.tscn | 8 +-- .../Palette}/NewPaletteDialog.tscn | 0 {Scripts => src}/Palette/Palette.gd | 0 {Scripts => src}/Palette/PaletteButton.gd | 0 {Prefabs => src/Palette}/PaletteButton.tscn | 20 +++---- {Scripts => src}/Palette/PaletteColor.gd | 0 {Scripts => src}/Palette/PaletteContainer.gd | 2 +- .../Palette}/PaletteImportFileDialog.tscn | 0 {Prefabs => src}/PatternButton.gd | 0 {Prefabs => src}/PatternButton.tscn | 3 +- {Scripts => src}/Rulers/Guides.gd | 0 {Scripts => src}/Rulers/HorizontalRuler.gd | 0 {Scripts => src}/Rulers/VerticalRuler.gd | 0 {Scripts => src}/SecondViewport.gd | 0 {Scripts => src}/SelectionRectangle.gd | 0 {Scripts => src}/TransparentChecker.gd | 0 {Scripts => src}/XDGDataPaths.gd | 0 63 files changed, 135 insertions(+), 113 deletions(-) rename {Prefabs => src}/AnimationTag.tscn (100%) rename {Scripts => src}/AnimationTimeline.gd (99%) rename {Prefabs => src}/AnimationTimeline.tscn (99%) rename {Scripts => src/Autoload}/Global.gd (98%) rename {Scripts => src/Autoload}/Import.gd (99%) rename {Scripts => src/Autoload}/OpenSave.gd (99%) rename {Scripts => src}/BrushButton.gd (100%) rename {Prefabs => src}/BrushButton.tscn (99%) rename {Scripts => src}/CameraMovement.gd (100%) rename {Scripts => src}/Canvas.gd (99%) rename {Prefabs => src}/Canvas.tscn (60%) rename Scripts/FrameButton.gd => src/CelButton.gd (99%) rename Prefabs/FrameButton.tscn => src/CelButton.tscn (84%) rename {Scripts => src}/Dialogs/AboutDialog.gd (100%) rename {Prefabs => src}/Dialogs/AboutDialog.tscn (98%) rename {Scripts => src}/Dialogs/CreateNewImage.gd (98%) rename {Prefabs => src}/Dialogs/CreateNewImage.tscn (97%) rename {Scripts => src}/Dialogs/ExportDialog.gd (100%) rename {Prefabs => src}/Dialogs/ExportDialog.tscn (99%) rename {Scripts => src}/Dialogs/FrameTagDialog.gd (100%) rename {Prefabs => src}/Dialogs/FrameTagDialog.tscn (98%) rename {Scripts => src}/Dialogs/HSVDialog.gd (100%) rename {Prefabs => src}/Dialogs/HSVDialog.tscn (98%) rename {Scripts => src}/Dialogs/ImportSprites.gd (97%) rename {Prefabs => src}/Dialogs/ImportSprites.tscn (97%) rename {Prefabs => src}/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn (100%) rename {Prefabs => src}/Dialogs/OpenLastProjectAlertDialog.tscn (100%) rename {Scripts => src}/Dialogs/OutlineDialog.gd (100%) rename {Prefabs => src}/Dialogs/OutlineDialog.tscn (95%) rename {Scripts => src}/Dialogs/PreferencesDialog.gd (100%) rename {Prefabs => src}/Dialogs/PreferencesDialog.tscn (99%) rename {Prefabs => src}/Dialogs/RotateImage.gd (100%) rename {Prefabs => src}/Dialogs/RotateImage.tscn (96%) rename {Scripts => src}/Dialogs/ScaleImage.gd (100%) rename {Prefabs => src}/Dialogs/ScaleImage.tscn (96%) rename {Scripts => src}/Dialogs/SplashDialog.gd (100%) rename {Prefabs => src}/Dialogs/SplashDialog.tscn (99%) rename {Scripts => src}/Drawers.gd (100%) rename Scripts/LayerContainer.gd => src/LayerButton.gd (99%) rename Prefabs/LayerContainer.tscn => src/LayerButton.tscn (88%) rename {Scripts => src}/Main.gd (100%) rename Main.tscn => src/Main.tscn (98%) rename {Scripts => src}/NotificationLabel.gd (100%) rename {Prefabs => src}/NotificationLabel.tscn (86%) rename {Scripts => src}/Palette/EditPalettePopup.gd (98%) rename {Prefabs => src/Palette}/EditPalettePopup.tscn (98%) rename {Prefabs => src/Palette}/NewPaletteDialog.tscn (100%) rename {Scripts => src}/Palette/Palette.gd (100%) rename {Scripts => src}/Palette/PaletteButton.gd (100%) rename {Prefabs => src/Palette}/PaletteButton.tscn (71%) rename {Scripts => src}/Palette/PaletteColor.gd (100%) rename {Scripts => src}/Palette/PaletteContainer.gd (99%) rename {Prefabs => src/Palette}/PaletteImportFileDialog.tscn (100%) rename {Prefabs => src}/PatternButton.gd (100%) rename {Prefabs => src}/PatternButton.tscn (90%) rename {Scripts => src}/Rulers/Guides.gd (100%) rename {Scripts => src}/Rulers/HorizontalRuler.gd (100%) rename {Scripts => src}/Rulers/VerticalRuler.gd (100%) rename {Scripts => src}/SecondViewport.gd (100%) rename {Scripts => src}/SelectionRectangle.gd (100%) rename {Scripts => src}/TransparentChecker.gd (100%) rename {Scripts => src}/XDGDataPaths.gd (100%) diff --git a/project.godot b/project.godot index 63c981632..ffc26cb30 100644 --- a/project.godot +++ b/project.godot @@ -12,32 +12,32 @@ _global_script_classes=[ { "base": "Node2D", "class": "Canvas", "language": "GDScript", -"path": "res://Scripts/Canvas.gd" +"path": "res://src/Canvas.gd" }, { "base": "Line2D", "class": "Guide", "language": "GDScript", -"path": "res://Scripts/Rulers/Guides.gd" +"path": "res://src/Rulers/Guides.gd" }, { "base": "Button", -"class": "LayerContainer", +"class": "LayerButton", "language": "GDScript", -"path": "res://Scripts/LayerContainer.gd" +"path": "res://src/LayerButton.gd" }, { "base": "Reference", "class": "Palette", "language": "GDScript", -"path": "res://Scripts/Palette/Palette.gd" +"path": "res://src/Palette/Palette.gd" }, { "base": "Reference", "class": "PaletteColor", "language": "GDScript", -"path": "res://Scripts/Palette/PaletteColor.gd" +"path": "res://src/Palette/PaletteColor.gd" } ] _global_script_class_icons={ "Canvas": "", "Guide": "", -"LayerContainer": "", +"LayerButton": "", "Palette": "", "PaletteColor": "" } @@ -46,7 +46,7 @@ _global_script_class_icons={ config/name="Pixelorama" config/description="A free & open-source 2D sprite editor" -run/main_scene="res://Main.tscn" +run/main_scene="res://src/Main.tscn" run/low_processor_mode=true boot_splash/image="res://splash.png" boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 ) @@ -57,9 +57,9 @@ config/Version="v0.7" [autoload] -Global="*res://Scripts/Global.gd" -Import="*res://Scripts/Import.gd" -OpenSave="*res://Scripts/OpenSave.gd" +Global="*res://src/Autoload/Global.gd" +Import="*res://src/Autoload/Import.gd" +OpenSave="*res://src/Autoload/OpenSave.gd" [debug] diff --git a/Prefabs/AnimationTag.tscn b/src/AnimationTag.tscn similarity index 100% rename from Prefabs/AnimationTag.tscn rename to src/AnimationTag.tscn diff --git a/Scripts/AnimationTimeline.gd b/src/AnimationTimeline.gd similarity index 99% rename from Scripts/AnimationTimeline.gd rename to src/AnimationTimeline.gd index 7b39190b9..bfd12b310 100644 --- a/Scripts/AnimationTimeline.gd +++ b/src/AnimationTimeline.gd @@ -22,7 +22,7 @@ func _h_scroll_changed(value : float) -> void: func add_frame() -> void: - var new_canvas : Canvas = load("res://Prefabs/Canvas.tscn").instance() + var new_canvas : Canvas = load("res://src/Canvas.tscn").instance() new_canvas.size = Global.canvas.size new_canvas.frame = Global.canvases.size() @@ -119,7 +119,7 @@ func _on_CopyFrame_pressed(frame := -1) -> void: frame = Global.current_frame var canvas : Canvas = Global.canvases[frame] - var new_canvas : Canvas = load("res://Prefabs/Canvas.tscn").instance() + var new_canvas : Canvas = load("res://src/Canvas.tscn").instance() new_canvas.size = Global.canvas.size new_canvas.frame = Global.canvases.size() diff --git a/Prefabs/AnimationTimeline.tscn b/src/AnimationTimeline.tscn similarity index 99% rename from Prefabs/AnimationTimeline.tscn rename to src/AnimationTimeline.tscn index c78e5d726..be1322c08 100644 --- a/Prefabs/AnimationTimeline.tscn +++ b/src/AnimationTimeline.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=51 format=2] -[ext_resource path="res://Scripts/AnimationTimeline.gd" type="Script" id=1] +[ext_resource path="res://src/AnimationTimeline.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/New_Layer.png" type="Texture" id=2] [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/New_Layer_Hover.png" type="Texture" id=3] [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Delete_Layer.png" type="Texture" id=4] @@ -17,7 +17,7 @@ [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Merge_Down.png" type="Texture" id=15] [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Merge_Down_Hover.png" type="Texture" id=16] [ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Merge_Down_Disabled.png" type="Texture" id=17] -[ext_resource path="res://Prefabs/LayerContainer.tscn" type="PackedScene" id=18] +[ext_resource path="res://src/LayerButton.tscn" type="PackedScene" id=18] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/new_frame.png" type="Texture" id=19] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/remove_frame.png" type="Texture" id=20] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/go_to_first_frame.png" type="Texture" id=21] @@ -31,7 +31,11 @@ [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/onion_skinning_off.png" type="Texture" id=29] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/expandable.png" type="Texture" id=30] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/loop.png" type="Texture" id=31] -[ext_resource path="res://Prefabs/Dialogs/FrameTagDialog.tscn" type="PackedScene" id=42] +[ext_resource path="res://src/Dialogs/FrameTagDialog.tscn" type="PackedScene" id=42] + + + + [sub_resource type="InputEventKey" id=1] control = true diff --git a/Scripts/Global.gd b/src/Autoload/Global.gd similarity index 98% rename from Scripts/Global.gd rename to src/Autoload/Global.gd index fd635a51b..17ffe1272 100644 --- a/Scripts/Global.gd +++ b/src/Autoload/Global.gd @@ -7,7 +7,7 @@ enum Brush_Types {PIXEL, CIRCLE, FILLED_CIRCLE, FILE, RANDOM_FILE, CUSTOM} var root_directory := "." var window_title := "" setget title_changed # Why doesn't Godot have get_window_title()? var config_cache := ConfigFile.new() -var XDGDataPaths = preload("res://Scripts/XDGDataPaths.gd") +var XDGDataPaths = preload("res://src/XDGDataPaths.gd") var directory_module : Node # Stuff for arrowkey-based canvas movements nyaa ^.^ @@ -412,7 +412,7 @@ func find_node_by_name(root, node_name) -> Node: func notification_label(text : String) -> void: - var notification : Label = load("res://Prefabs/NotificationLabel.tscn").instance() + var notification : Label = load("res://src/NotificationLabel.tscn").instance() notification.text = tr(text) notification.rect_position = Vector2(240, OS.window_size.y - animation_timeline.rect_size.y - 20) notification.theme = control.theme @@ -525,12 +525,12 @@ func canvases_changed(value : Array) -> void: frame_ids.add_child(label) for i in range(layers.size() - 1, -1, -1): - var frame_button = load("res://Prefabs/FrameButton.tscn").instance() - frame_button.frame = j - frame_button.layer = i - frame_button.get_child(0).texture = Global.canvases[j].layers[i][1] + var cel_button = load("res://src/CelButton.tscn").instance() + cel_button.frame = j + cel_button.layer = i + cel_button.get_child(0).texture = Global.canvases[j].layers[i][1] - layers[i][3].add_child(frame_button) + layers[i][3].add_child(cel_button) # This is useful in case tagged frames get deleted DURING the animation is playing # otherwise, this code is useless in this context, since these values are being set @@ -581,7 +581,7 @@ func layers_changed(value : Array) -> void: frames_container.remove_child(container) for i in range(layers.size() - 1, -1, -1): - var layer_container = load("res://Prefabs/LayerContainer.tscn").instance() + var layer_container = load("res://src/LayerButton.tscn").instance() layer_container.i = i if !layers[i][0]: layers[i][0] = tr("Layer") + " %s" % i @@ -592,12 +592,12 @@ func layers_changed(value : Array) -> void: frames_container.add_child(layers[i][3]) for j in range(canvases.size()): - var frame_button = load("res://Prefabs/FrameButton.tscn").instance() - frame_button.frame = j - frame_button.layer = i - frame_button.get_child(0).texture = Global.canvases[j].layers[i][1] + var cel_button = load("res://src/CelButton.tscn").instance() + cel_button.frame = j + cel_button.layer = i + cel_button.get_child(0).texture = Global.canvases[j].layers[i][1] - layers[i][3].add_child(frame_button) + layers[i][3].add_child(cel_button) var layer_button = layers_container.get_child(layers_container.get_child_count() - 1 - current_layer) layer_button.pressed = true @@ -698,7 +698,7 @@ func animation_tags_changed(value : Array) -> void: child.queue_free() for tag in animation_tags: - var tag_c : Container = load("res://Prefabs/AnimationTag.tscn").instance() + var tag_c : Container = load("res://src/AnimationTag.tscn").instance() tag_container.add_child(tag_c) var tag_position := tag_container.get_child_count() - 1 tag_container.move_child(tag_c, tag_position) @@ -807,7 +807,7 @@ Hold %s to make a line""") % [InputMap.get_action_list("left_eraser_tool")[0].as func create_brush_button(brush_img : Image, brush_type := Brush_Types.CUSTOM, hint_tooltip := "") -> void: var brush_container - var brush_button = load("res://Prefabs/BrushButton.tscn").instance() + var brush_button = load("res://src/BrushButton.tscn").instance() brush_button.brush_type = brush_type brush_button.custom_brush_index = custom_brushes.size() - 1 if brush_type == Brush_Types.FILE || brush_type == Brush_Types.RANDOM_FILE: diff --git a/Scripts/Import.gd b/src/Autoload/Import.gd similarity index 99% rename from Scripts/Import.gd rename to src/Autoload/Import.gd index 2600597df..46605f7f5 100644 --- a/Scripts/Import.gd +++ b/src/Autoload/Import.gd @@ -237,7 +237,7 @@ func import_patterns(priority_ordered_search_path: Array) -> void: image.convert(Image.FORMAT_RGBA8) Global.patterns.append(image) - var pattern_button : BaseButton = load("res://Prefabs/PatternButton.tscn").instance() + var pattern_button : BaseButton = load("res://src/PatternButton.tscn").instance() pattern_button.image = image var pattern_tex := ImageTexture.new() pattern_tex.create_from_image(image, 0) diff --git a/Scripts/OpenSave.gd b/src/Autoload/OpenSave.gd similarity index 99% rename from Scripts/OpenSave.gd rename to src/Autoload/OpenSave.gd index f4769fae9..c74e62579 100644 --- a/Scripts/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -55,7 +55,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void: var frame_line := file.get_line() Global.clear_canvases() while frame_line == "--": # Load frames - var canvas : Canvas = load("res://Prefabs/Canvas.tscn").instance() + var canvas : Canvas = load("res://src/Canvas.tscn").instance() Global.canvas = canvas var width := file.get_16() var height := file.get_16() diff --git a/Scripts/BrushButton.gd b/src/BrushButton.gd similarity index 100% rename from Scripts/BrushButton.gd rename to src/BrushButton.gd diff --git a/Prefabs/BrushButton.tscn b/src/BrushButton.tscn similarity index 99% rename from Prefabs/BrushButton.tscn rename to src/BrushButton.tscn index df1d2a814..178b857b2 100644 --- a/Prefabs/BrushButton.tscn +++ b/src/BrushButton.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=5 format=2] [ext_resource path="res://Assets/Graphics/Brush_button.png" type="Texture" id=1] -[ext_resource path="res://Scripts/BrushButton.gd" type="Script" id=2] +[ext_resource path="res://src/BrushButton.gd" type="Script" id=2] + [sub_resource type="Image" id=3] data = { diff --git a/Scripts/CameraMovement.gd b/src/CameraMovement.gd similarity index 100% rename from Scripts/CameraMovement.gd rename to src/CameraMovement.gd diff --git a/Scripts/Canvas.gd b/src/Canvas.gd similarity index 99% rename from Scripts/Canvas.gd rename to src/Canvas.gd index f152707df..0cdd5cd3a 100644 --- a/Scripts/Canvas.gd +++ b/src/Canvas.gd @@ -605,7 +605,7 @@ func update_texture(layer_index : int) -> void: layers[layer_index][1].create_from_image(layers[layer_index][0], 0) var frame_texture_rect : TextureRect - frame_texture_rect = Global.find_node_by_name(Global.layers[layer_index][3].get_child(frame),"FrameTexture") + frame_texture_rect = Global.find_node_by_name(Global.layers[layer_index][3].get_child(frame), "CelTexture") frame_texture_rect.texture = layers[layer_index][1] diff --git a/Prefabs/Canvas.tscn b/src/Canvas.tscn similarity index 60% rename from Prefabs/Canvas.tscn rename to src/Canvas.tscn index 130060c63..6dcf80ea7 100644 --- a/Prefabs/Canvas.tscn +++ b/src/Canvas.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Canvas.gd" type="Script" id=1] +[ext_resource path="res://src/Canvas.gd" type="Script" id=1] + [node name="Canvas" type="Node2D"] script = ExtResource( 1 ) diff --git a/Scripts/FrameButton.gd b/src/CelButton.gd similarity index 99% rename from Scripts/FrameButton.gd rename to src/CelButton.gd index 200edb999..2755c67e9 100644 --- a/Scripts/FrameButton.gd +++ b/src/CelButton.gd @@ -18,7 +18,7 @@ func _ready() -> void: popup_menu.set_item_metadata(4, "Link Cel") -func _on_FrameButton_pressed() -> void: +func _on_CelButton_pressed() -> void: if Input.is_action_just_released("left_mouse"): Global.current_frame = frame Global.current_layer = layer @@ -118,3 +118,4 @@ func change_frame_order(rate : int) -> void: Global.undo_redo.add_undo_method(Global, "undo", [Global.canvases[frame]]) Global.undo_redo.add_do_method(Global, "redo", [Global.canvases[frame]]) Global.undo_redo.commit_action() + diff --git a/Prefabs/FrameButton.tscn b/src/CelButton.tscn similarity index 84% rename from Prefabs/FrameButton.tscn rename to src/CelButton.tscn index 4128dfc03..a236b77aa 100644 --- a/Prefabs/FrameButton.tscn +++ b/src/CelButton.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/FrameButton.gd" type="Script" id=1] +[ext_resource path="res://src/CelButton.gd" type="Script" id=1] -[node name="FrameButton" type="Button"] +[node name="CelButton" type="Button"] margin_top = 18.0 margin_right = 36.0 margin_bottom = 54.0 @@ -17,7 +17,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="FrameTexture" type="TextureRect" parent="."] +[node name="CelTexture" type="TextureRect" parent="."] margin_left = 2.0 margin_top = 1.78536 margin_right = 34.0 @@ -43,5 +43,5 @@ color = Color( 0.0627451, 0.741176, 0.215686, 1 ) invert_enable = true invert_border = 1.0 polygon = PoolVector2Array( 0, 0, 36, 0, 36, 36, 0, 36 ) -[connection signal="pressed" from="." to="." method="_on_FrameButton_pressed"] +[connection signal="pressed" from="." to="." method="_on_CelButton_pressed"] [connection signal="id_pressed" from="PopupMenu" to="." method="_on_PopupMenu_id_pressed"] diff --git a/Scripts/Dialogs/AboutDialog.gd b/src/Dialogs/AboutDialog.gd similarity index 100% rename from Scripts/Dialogs/AboutDialog.gd rename to src/Dialogs/AboutDialog.gd diff --git a/Prefabs/Dialogs/AboutDialog.tscn b/src/Dialogs/AboutDialog.tscn similarity index 98% rename from Prefabs/Dialogs/AboutDialog.tscn rename to src/Dialogs/AboutDialog.tscn index 9af873310..f6bc9175b 100644 --- a/Prefabs/Dialogs/AboutDialog.tscn +++ b/src/Dialogs/AboutDialog.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=6 format=2] -[ext_resource path="res://Scripts/Dialogs/AboutDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/AboutDialog.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/icon_64x64.png" type="Texture" id=2] [ext_resource path="res://Assets/Fonts/Roboto-Italic.tres" type="DynamicFont" id=3] [ext_resource path="res://Assets/Graphics/orama_64x64.png" type="Texture" id=4] [ext_resource path="res://Assets/Fonts/Roboto-Small.tres" type="DynamicFont" id=5] + [node name="AboutDialog" type="WindowDialog"] margin_right = 512.0 margin_bottom = 288.0 diff --git a/Scripts/Dialogs/CreateNewImage.gd b/src/Dialogs/CreateNewImage.gd similarity index 98% rename from Scripts/Dialogs/CreateNewImage.gd rename to src/Dialogs/CreateNewImage.gd index 670dc4b37..54b7da3fd 100644 --- a/Scripts/Dialogs/CreateNewImage.gd +++ b/src/Dialogs/CreateNewImage.gd @@ -77,7 +77,7 @@ func _on_CreateNewImage_confirmed() -> void: # Store [Layer name (0), Layer visibility boolean (1), Layer lock boolean (2), Frame container (3), # will new frames be linked boolean (4), Array of linked frames (5)] Global.layers.append([tr("Layer") + " 0", true, false, HBoxContainer.new(), false, []]) - Global.canvas = load("res://Prefabs/Canvas.tscn").instance() + Global.canvas = load("res://src/Canvas.tscn").instance() Global.canvas.size = Vector2(width, height).floor() Global.canvases.append(Global.canvas) diff --git a/Prefabs/Dialogs/CreateNewImage.tscn b/src/Dialogs/CreateNewImage.tscn similarity index 97% rename from Prefabs/Dialogs/CreateNewImage.tscn rename to src/Dialogs/CreateNewImage.tscn index 87f8e57d8..8e112b4cf 100644 --- a/Prefabs/Dialogs/CreateNewImage.tscn +++ b/src/Dialogs/CreateNewImage.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Dialogs/CreateNewImage.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/CreateNewImage.gd" type="Script" id=1] + [node name="CreateNewImage" type="ConfirmationDialog"] margin_right = 300.0 diff --git a/Scripts/Dialogs/ExportDialog.gd b/src/Dialogs/ExportDialog.gd similarity index 100% rename from Scripts/Dialogs/ExportDialog.gd rename to src/Dialogs/ExportDialog.gd diff --git a/Prefabs/Dialogs/ExportDialog.tscn b/src/Dialogs/ExportDialog.tscn similarity index 99% rename from Prefabs/Dialogs/ExportDialog.tscn rename to src/Dialogs/ExportDialog.tscn index ce69d1f01..b50c3eaaf 100644 --- a/Prefabs/Dialogs/ExportDialog.tscn +++ b/src/Dialogs/ExportDialog.tscn @@ -1,8 +1,9 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://Scripts/Dialogs/ExportDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/ExportDialog.gd" type="Script" id=1] [ext_resource path="res://addons/godot-gifexporter/src/GifExporter.gd" type="Script" id=2] + [node name="ExportDialog" type="AcceptDialog"] margin_right = 532.0 margin_bottom = 530.0 diff --git a/Scripts/Dialogs/FrameTagDialog.gd b/src/Dialogs/FrameTagDialog.gd similarity index 100% rename from Scripts/Dialogs/FrameTagDialog.gd rename to src/Dialogs/FrameTagDialog.gd diff --git a/Prefabs/Dialogs/FrameTagDialog.tscn b/src/Dialogs/FrameTagDialog.tscn similarity index 98% rename from Prefabs/Dialogs/FrameTagDialog.tscn rename to src/Dialogs/FrameTagDialog.tscn index 71391d60c..b9645879b 100644 --- a/Prefabs/Dialogs/FrameTagDialog.tscn +++ b/src/Dialogs/FrameTagDialog.tscn @@ -1,8 +1,9 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://Scripts/Dialogs/FrameTagDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/FrameTagDialog.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/new_frame.png" type="Texture" id=2] + [node name="FrameTagDialog" type="AcceptDialog"] margin_right = 83.0 margin_bottom = 58.0 diff --git a/Scripts/Dialogs/HSVDialog.gd b/src/Dialogs/HSVDialog.gd similarity index 100% rename from Scripts/Dialogs/HSVDialog.gd rename to src/Dialogs/HSVDialog.gd diff --git a/Prefabs/Dialogs/HSVDialog.tscn b/src/Dialogs/HSVDialog.tscn similarity index 98% rename from Prefabs/Dialogs/HSVDialog.tscn rename to src/Dialogs/HSVDialog.tscn index c94a5f188..81a0216e5 100644 --- a/Prefabs/Dialogs/HSVDialog.tscn +++ b/src/Dialogs/HSVDialog.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Dialogs/HSVDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/HSVDialog.gd" type="Script" id=1] + [node name="HSVDialog" type="WindowDialog"] margin_left = 1.0 diff --git a/Scripts/Dialogs/ImportSprites.gd b/src/Dialogs/ImportSprites.gd similarity index 97% rename from Scripts/Dialogs/ImportSprites.gd rename to src/Dialogs/ImportSprites.gd index 6eb942922..504e86c23 100644 --- a/Scripts/Dialogs/ImportSprites.gd +++ b/src/Dialogs/ImportSprites.gd @@ -54,7 +54,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void: Global.error_dialog.popup_centered() continue - var canvas : Canvas = load("res://Prefabs/Canvas.tscn").instance() + var canvas : Canvas = load("res://src/Canvas.tscn").instance() canvas.size = image.get_size() image.convert(Image.FORMAT_RGBA8) image.lock() @@ -106,7 +106,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void: var frame_height := image.get_size().y / spritesheet_vertical for yy in range(spritesheet_vertical): for xx in range(spritesheet_horizontal): - var canvas : Canvas = load("res://Prefabs/Canvas.tscn").instance() + var canvas : Canvas = load("res://src/Canvas.tscn").instance() var cropped_image := Image.new() cropped_image = image.get_rect(Rect2(frame_width * xx, frame_height * yy, frame_width, frame_height)) canvas.size = cropped_image.get_size() diff --git a/Prefabs/Dialogs/ImportSprites.tscn b/src/Dialogs/ImportSprites.tscn similarity index 97% rename from Prefabs/Dialogs/ImportSprites.tscn rename to src/Dialogs/ImportSprites.tscn index dd7afd777..200041678 100644 --- a/Prefabs/Dialogs/ImportSprites.tscn +++ b/src/Dialogs/ImportSprites.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Dialogs/ImportSprites.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/ImportSprites.gd" type="Script" id=1] + [node name="ImportSprites" type="FileDialog"] margin_right = 515.0 diff --git a/Prefabs/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn b/src/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn similarity index 100% rename from Prefabs/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn rename to src/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn diff --git a/Prefabs/Dialogs/OpenLastProjectAlertDialog.tscn b/src/Dialogs/OpenLastProjectAlertDialog.tscn similarity index 100% rename from Prefabs/Dialogs/OpenLastProjectAlertDialog.tscn rename to src/Dialogs/OpenLastProjectAlertDialog.tscn diff --git a/Scripts/Dialogs/OutlineDialog.gd b/src/Dialogs/OutlineDialog.gd similarity index 100% rename from Scripts/Dialogs/OutlineDialog.gd rename to src/Dialogs/OutlineDialog.gd diff --git a/Prefabs/Dialogs/OutlineDialog.tscn b/src/Dialogs/OutlineDialog.tscn similarity index 95% rename from Prefabs/Dialogs/OutlineDialog.tscn rename to src/Dialogs/OutlineDialog.tscn index f6a3a1ed4..b98c84378 100644 --- a/Prefabs/Dialogs/OutlineDialog.tscn +++ b/src/Dialogs/OutlineDialog.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Dialogs/OutlineDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/OutlineDialog.gd" type="Script" id=1] + [node name="OutlineDialog" type="ConfirmationDialog"] visible = true diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/src/Dialogs/PreferencesDialog.gd similarity index 100% rename from Scripts/Dialogs/PreferencesDialog.gd rename to src/Dialogs/PreferencesDialog.gd diff --git a/Prefabs/Dialogs/PreferencesDialog.tscn b/src/Dialogs/PreferencesDialog.tscn similarity index 99% rename from Prefabs/Dialogs/PreferencesDialog.tscn rename to src/Dialogs/PreferencesDialog.tscn index d78b7133e..0990eb7cf 100644 --- a/Prefabs/Dialogs/PreferencesDialog.tscn +++ b/src/Dialogs/PreferencesDialog.tscn @@ -1,9 +1,10 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://Scripts/Dialogs/PreferencesDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/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] + [node name="PreferencesDialog" type="AcceptDialog"] margin_left = -3.0 margin_top = 9.0 diff --git a/Prefabs/Dialogs/RotateImage.gd b/src/Dialogs/RotateImage.gd similarity index 100% rename from Prefabs/Dialogs/RotateImage.gd rename to src/Dialogs/RotateImage.gd diff --git a/Prefabs/Dialogs/RotateImage.tscn b/src/Dialogs/RotateImage.tscn similarity index 96% rename from Prefabs/Dialogs/RotateImage.tscn rename to src/Dialogs/RotateImage.tscn index 6a05cd144..5ecc7ef3a 100644 --- a/Prefabs/Dialogs/RotateImage.tscn +++ b/src/Dialogs/RotateImage.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Prefabs/Dialogs/RotateImage.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/RotateImage.gd" type="Script" id=1] + [node name="RotateImage" type="ConfirmationDialog"] margin_right = 245.0 diff --git a/Scripts/Dialogs/ScaleImage.gd b/src/Dialogs/ScaleImage.gd similarity index 100% rename from Scripts/Dialogs/ScaleImage.gd rename to src/Dialogs/ScaleImage.gd diff --git a/Prefabs/Dialogs/ScaleImage.tscn b/src/Dialogs/ScaleImage.tscn similarity index 96% rename from Prefabs/Dialogs/ScaleImage.tscn rename to src/Dialogs/ScaleImage.tscn index 96bd6cf7a..81646b4ff 100644 --- a/Prefabs/Dialogs/ScaleImage.tscn +++ b/src/Dialogs/ScaleImage.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Dialogs/ScaleImage.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/ScaleImage.gd" type="Script" id=1] + [node name="ScaleImage" type="ConfirmationDialog"] margin_right = 200.0 diff --git a/Scripts/Dialogs/SplashDialog.gd b/src/Dialogs/SplashDialog.gd similarity index 100% rename from Scripts/Dialogs/SplashDialog.gd rename to src/Dialogs/SplashDialog.gd diff --git a/Prefabs/Dialogs/SplashDialog.tscn b/src/Dialogs/SplashDialog.tscn similarity index 99% rename from Prefabs/Dialogs/SplashDialog.tscn rename to src/Dialogs/SplashDialog.tscn index a03b5c58f..c4e553675 100644 --- a/Prefabs/Dialogs/SplashDialog.tscn +++ b/src/Dialogs/SplashDialog.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=12 format=2] -[ext_resource path="res://Scripts/Dialogs/SplashDialog.gd" type="Script" id=1] +[ext_resource path="res://src/Dialogs/SplashDialog.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/Pixelorama Logo.png" type="Texture" id=2] [ext_resource path="res://Assets/Graphics/Become a patron.png" type="Texture" id=3] [ext_resource path="res://Assets/Graphics/Become a patron_Hover.png" type="Texture" id=4] @@ -12,6 +12,7 @@ [ext_resource path="res://Assets/Graphics/GitHub-32px.png" type="Texture" id=10] [ext_resource path="res://Assets/Graphics/Patreon_Mark_White.png" type="Texture" id=11] + [node name="SplashDialog" type="WindowDialog"] margin_right = 614.0 margin_bottom = 590.0 diff --git a/Scripts/Drawers.gd b/src/Drawers.gd similarity index 100% rename from Scripts/Drawers.gd rename to src/Drawers.gd diff --git a/Scripts/LayerContainer.gd b/src/LayerButton.gd similarity index 99% rename from Scripts/LayerContainer.gd rename to src/LayerButton.gd index 66d3f2bbc..64413ff21 100644 --- a/Scripts/LayerContainer.gd +++ b/src/LayerButton.gd @@ -1,4 +1,4 @@ -class_name LayerContainer +class_name LayerButton extends Button var i := 0 diff --git a/Prefabs/LayerContainer.tscn b/src/LayerButton.tscn similarity index 88% rename from Prefabs/LayerContainer.tscn rename to src/LayerButton.tscn index 5238d0312..41a8affbd 100644 --- a/Prefabs/LayerContainer.tscn +++ b/src/LayerButton.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://Scripts/LayerContainer.gd" type="Script" id=1] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Layer_Visible.png" type="Texture" id=2] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Layer_Visible_Hover.png" type="Texture" id=3] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlock_Hover.png" type="Texture" id=4] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlock.png" type="Texture" id=5] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlinked_Layer_Hover.png" type="Texture" id=6] -[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlinked_Layer.png" type="Texture" id=7] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlinked_Layer.png" type="Texture" id=1] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlock_Hover.png" type="Texture" id=2] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlock.png" type="Texture" id=3] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Unlinked_Layer_Hover.png" type="Texture" id=4] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Layer_Visible.png" type="Texture" id=5] +[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Layer_Visible_Hover.png" type="Texture" id=6] +[ext_resource path="res://src/LayerButton.gd" type="Script" id=7] [node name="LayerContainer" type="Button"] margin_right = 210.0 @@ -15,7 +15,7 @@ rect_min_size = Vector2( 212, 36 ) size_flags_horizontal = 0 toggle_mode = true action_mode = 0 -script = ExtResource( 1 ) +script = ExtResource( 7 ) __meta__ = { "_edit_horizontal_guides_": [ ], "_edit_use_anchors_": false @@ -44,8 +44,8 @@ focus_mode = 0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 4 -texture_normal = ExtResource( 2 ) -texture_hover = ExtResource( 3 ) +texture_normal = ExtResource( 5 ) +texture_hover = ExtResource( 6 ) [node name="LockButton" type="TextureButton" parent="HBoxContainer/LayerButtons" groups=[ "UIButtons", @@ -59,8 +59,8 @@ focus_mode = 0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 4 -texture_normal = ExtResource( 5 ) -texture_hover = ExtResource( 4 ) +texture_normal = ExtResource( 3 ) +texture_hover = ExtResource( 2 ) [node name="LinkButton" type="TextureButton" parent="HBoxContainer/LayerButtons" groups=[ "UIButtons", @@ -76,8 +76,8 @@ focus_mode = 0 mouse_default_cursor_shape = 2 size_flags_horizontal = 0 size_flags_vertical = 4 -texture_normal = ExtResource( 7 ) -texture_hover = ExtResource( 6 ) +texture_normal = ExtResource( 1 ) +texture_hover = ExtResource( 4 ) [node name="LayerName" type="HBoxContainer" parent="HBoxContainer"] margin_left = 108.0 diff --git a/Scripts/Main.gd b/src/Main.gd similarity index 100% rename from Scripts/Main.gd rename to src/Main.gd diff --git a/Main.tscn b/src/Main.tscn similarity index 98% rename from Main.tscn rename to src/Main.tscn index 22f34efd8..01447b52b 100644 --- a/Main.tscn +++ b/src/Main.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=59 format=2] [ext_resource path="res://Themes & Styles/Dark Theme/Dark Theme.tres" type="Theme" id=1] -[ext_resource path="res://Scripts/Main.gd" type="Script" id=2] +[ext_resource path="res://src/Main.gd" type="Script" id=2] [ext_resource path="res://Themes & Styles/Dark Theme/DarkTopMenuStyle.tres" type="StyleBox" id=3] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/RectSelect.png" type="Texture" id=4] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/ColorPicker.png" type="Texture" id=5] @@ -13,40 +13,40 @@ [ext_resource path="res://Assets/Graphics/Dark Themes/Misc/Color defaults.png" type="Texture" id=11] [ext_resource path="res://Assets/Graphics/Brush_button.png" type="Texture" id=12] [ext_resource path="res://Themes & Styles/Dark Theme/DarkRulerStyle.tres" type="StyleBox" id=13] -[ext_resource path="res://Scripts/Rulers/HorizontalRuler.gd" type="Script" id=14] -[ext_resource path="res://Scripts/Rulers/VerticalRuler.gd" type="Script" id=15] -[ext_resource path="res://Prefabs/Canvas.tscn" type="PackedScene" id=16] -[ext_resource path="res://Scripts/CameraMovement.gd" type="Script" id=17] -[ext_resource path="res://Scripts/SelectionRectangle.gd" type="Script" id=18] -[ext_resource path="res://Scripts/SecondViewport.gd" type="Script" id=19] -[ext_resource path="res://Prefabs/AnimationTimeline.tscn" type="PackedScene" id=20] +[ext_resource path="res://src/Rulers/HorizontalRuler.gd" type="Script" id=14] +[ext_resource path="res://src/Rulers/VerticalRuler.gd" type="Script" id=15] +[ext_resource path="res://src/Canvas.tscn" type="PackedScene" id=16] +[ext_resource path="res://src/CameraMovement.gd" type="Script" id=17] +[ext_resource path="res://src/SelectionRectangle.gd" type="Script" id=18] +[ext_resource path="res://src/SecondViewport.gd" type="Script" id=19] +[ext_resource path="res://src/AnimationTimeline.tscn" type="PackedScene" id=20] [ext_resource path="res://Assets/Graphics/Dark Themes/Palette/Add_Palette.png" type="Texture" id=21] [ext_resource path="res://Assets/Graphics/Dark Themes/Palette/Add_Palette_Hover.png" type="Texture" id=22] [ext_resource path="res://Assets/Graphics/Dark Themes/Palette/Edit_Palette.png" type="Texture" id=23] [ext_resource path="res://Assets/Graphics/Dark Themes/Palette/Edit_Palette_Hover.png" type="Texture" id=24] -[ext_resource path="res://Scripts/Palette/PaletteContainer.gd" type="Script" id=25] -[ext_resource path="res://Prefabs/BrushButton.tscn" type="PackedScene" id=26] -[ext_resource path="res://Prefabs/Dialogs/SplashDialog.tscn" type="PackedScene" id=27] -[ext_resource path="res://Prefabs/Dialogs/CreateNewImage.tscn" type="PackedScene" id=28] -[ext_resource path="res://Prefabs/Dialogs/ImportSprites.tscn" type="PackedScene" id=29] +[ext_resource path="res://src/Palette/PaletteContainer.gd" type="Script" id=25] +[ext_resource path="res://src/BrushButton.tscn" type="PackedScene" id=26] +[ext_resource path="res://src/Dialogs/SplashDialog.tscn" type="PackedScene" id=27] +[ext_resource path="res://src/Dialogs/CreateNewImage.tscn" type="PackedScene" id=28] +[ext_resource path="res://src/Dialogs/ImportSprites.tscn" type="PackedScene" id=29] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Horizontal_Mirror_Off.png" type="Texture" id=30] -[ext_resource path="res://Prefabs/Dialogs/ScaleImage.tscn" type="PackedScene" id=31] -[ext_resource path="res://Prefabs/Dialogs/PreferencesDialog.tscn" type="PackedScene" id=32] -[ext_resource path="res://Prefabs/Dialogs/OutlineDialog.tscn" type="PackedScene" id=33] -[ext_resource path="res://Prefabs/Dialogs/AboutDialog.tscn" type="PackedScene" id=34] -[ext_resource path="res://Prefabs/EditPalettePopup.tscn" type="PackedScene" id=35] -[ext_resource path="res://Prefabs/NewPaletteDialog.tscn" type="PackedScene" id=36] -[ext_resource path="res://Prefabs/PaletteImportFileDialog.tscn" type="PackedScene" id=37] -[ext_resource path="res://Prefabs/Dialogs/RotateImage.tscn" type="PackedScene" id=38] -[ext_resource path="res://Prefabs/Dialogs/ExportDialog.tscn" type="PackedScene" id=39] +[ext_resource path="res://src/Dialogs/ScaleImage.tscn" type="PackedScene" id=31] +[ext_resource path="res://src/Dialogs/PreferencesDialog.tscn" type="PackedScene" id=32] +[ext_resource path="res://src/Dialogs/OutlineDialog.tscn" type="PackedScene" id=33] +[ext_resource path="res://src/Dialogs/AboutDialog.tscn" type="PackedScene" id=34] +[ext_resource path="res://src/Palette/EditPalettePopup.tscn" type="PackedScene" id=35] +[ext_resource path="res://src/Palette/NewPaletteDialog.tscn" type="PackedScene" id=36] +[ext_resource path="res://src/Palette/PaletteImportFileDialog.tscn" type="PackedScene" id=37] +[ext_resource path="res://src/Dialogs/RotateImage.tscn" type="PackedScene" id=38] +[ext_resource path="res://src/Dialogs/ExportDialog.tscn" type="PackedScene" id=39] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Horizontal_Mirror_On.png" type="Texture" id=40] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Vertical_Mirror_On.png" type="Texture" id=41] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Vertical_Mirror_Off.png" type="Texture" id=42] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Zoom.png" type="Texture" id=43] -[ext_resource path="res://Prefabs/Dialogs/HSVDialog.tscn" type="PackedScene" id=44] -[ext_resource path="res://Scripts/TransparentChecker.gd" type="Script" id=45] -[ext_resource path="res://Prefabs/Dialogs/OpenLastProjectAlertDialog.tscn" type="PackedScene" id=46] -[ext_resource path="res://Prefabs/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn" type="PackedScene" id=47] +[ext_resource path="res://src/Dialogs/HSVDialog.tscn" type="PackedScene" id=44] +[ext_resource path="res://src/TransparentChecker.gd" type="Script" id=45] +[ext_resource path="res://src/Dialogs/OpenLastProjectAlertDialog.tscn" type="PackedScene" id=46] +[ext_resource path="res://src/Dialogs/NoProjectEditedOrCreatedAlertDialog.tscn" type="PackedScene" id=47] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; diff --git a/Scripts/NotificationLabel.gd b/src/NotificationLabel.gd similarity index 100% rename from Scripts/NotificationLabel.gd rename to src/NotificationLabel.gd diff --git a/Prefabs/NotificationLabel.tscn b/src/NotificationLabel.tscn similarity index 86% rename from Prefabs/NotificationLabel.tscn rename to src/NotificationLabel.tscn index 590d42aff..ce3f665d7 100644 --- a/Prefabs/NotificationLabel.tscn +++ b/src/NotificationLabel.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/NotificationLabel.gd" type="Script" id=2] +[ext_resource path="res://src/NotificationLabel.gd" type="Script" id=2] + [node name="NotificationLabel" type="Label"] margin_right = 116.0 diff --git a/Scripts/Palette/EditPalettePopup.gd b/src/Palette/EditPalettePopup.gd similarity index 98% rename from Scripts/Palette/EditPalettePopup.gd rename to src/Palette/EditPalettePopup.gd index 1ac0542f8..0ce598277 100644 --- a/Scripts/Palette/EditPalettePopup.gd +++ b/src/Palette/EditPalettePopup.gd @@ -1,6 +1,6 @@ extends WindowDialog -var palette_button = preload("res://Prefabs/PaletteButton.tscn") +var palette_button = preload("res://src/Palette/PaletteButton.tscn") var current_palette : String var current_swatch := -1 diff --git a/Prefabs/EditPalettePopup.tscn b/src/Palette/EditPalettePopup.tscn similarity index 98% rename from Prefabs/EditPalettePopup.tscn rename to src/Palette/EditPalettePopup.tscn index 4bc526bf3..e19514a28 100644 --- a/Prefabs/EditPalettePopup.tscn +++ b/src/Palette/EditPalettePopup.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://Scripts/Palette/EditPalettePopup.gd" type="Script" id=1] +[ext_resource path="res://src/Palette/EditPalettePopup.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/new_frame.png" type="Texture" id=2] [ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/remove_frame.png" type="Texture" id=3] [ext_resource path="res://Assets/Graphics/Palette/palette_button_fill.png" type="Texture" id=6] @@ -28,8 +28,10 @@ margin_bottom = 462.0 size_flags_vertical = 3 [node name="EditPaletteColorPicker" type="ColorPicker" parent="VBoxContainer/HBoxContainer"] -margin_right = 308.0 -margin_bottom = 462.0 +margin_left = 4.0 +margin_top = 4.0 +margin_right = 4.0 +margin_bottom = 4.0 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] margin_left = 312.0 diff --git a/Prefabs/NewPaletteDialog.tscn b/src/Palette/NewPaletteDialog.tscn similarity index 100% rename from Prefabs/NewPaletteDialog.tscn rename to src/Palette/NewPaletteDialog.tscn diff --git a/Scripts/Palette/Palette.gd b/src/Palette/Palette.gd similarity index 100% rename from Scripts/Palette/Palette.gd rename to src/Palette/Palette.gd diff --git a/Scripts/Palette/PaletteButton.gd b/src/Palette/PaletteButton.gd similarity index 100% rename from Scripts/Palette/PaletteButton.gd rename to src/Palette/PaletteButton.gd diff --git a/Prefabs/PaletteButton.tscn b/src/Palette/PaletteButton.tscn similarity index 71% rename from Prefabs/PaletteButton.tscn rename to src/Palette/PaletteButton.tscn index 08faf5162..d92cf4c84 100644 --- a/Prefabs/PaletteButton.tscn +++ b/src/Palette/PaletteButton.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_hover.tres" type="StyleBox" id=1] -[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_pressedr.tres" type="StyleBox" id=2] -[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_focus.tres" type="StyleBox" id=3] -[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_normal.tres" type="StyleBox" id=4] -[ext_resource path="res://Scripts/Palette/PaletteButton.gd" type="Script" id=5] +[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_pressedr.tres" type="StyleBox" id=1] +[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_hover.tres" type="StyleBox" id=2] +[ext_resource path="res://src/Palette/PaletteButton.gd" type="Script" id=3] +[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_focus.tres" type="StyleBox" id=4] +[ext_resource path="res://Themes & Styles/StyleBoxes/palette_stylebox_normal.tres" type="StyleBox" id=5] [ext_resource path="res://Assets/Graphics/Palette/palette_button_fill.png" type="Texture" id=6] [sub_resource type="ImageTexture" id=1] @@ -14,14 +14,14 @@ margin_right = 26.0 margin_bottom = 26.0 rect_min_size = Vector2( 26, 26 ) hint_tooltip = "Color Name" -custom_styles/hover = ExtResource( 1 ) -custom_styles/pressed = ExtResource( 2 ) -custom_styles/focus = ExtResource( 3 ) -custom_styles/normal = ExtResource( 4 ) +custom_styles/hover = ExtResource( 2 ) +custom_styles/pressed = ExtResource( 1 ) +custom_styles/focus = ExtResource( 4 ) +custom_styles/normal = ExtResource( 5 ) action_mode = 0 button_mask = 3 icon = SubResource( 1 ) -script = ExtResource( 5 ) +script = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } diff --git a/Scripts/Palette/PaletteColor.gd b/src/Palette/PaletteColor.gd similarity index 100% rename from Scripts/Palette/PaletteColor.gd rename to src/Palette/PaletteColor.gd diff --git a/Scripts/Palette/PaletteContainer.gd b/src/Palette/PaletteContainer.gd similarity index 99% rename from Scripts/Palette/PaletteContainer.gd rename to src/Palette/PaletteContainer.gd index cb0cfa1d7..3923dff72 100644 --- a/Scripts/Palette/PaletteContainer.gd +++ b/src/Palette/PaletteContainer.gd @@ -1,6 +1,6 @@ extends GridContainer -const palette_button = preload("res://Prefabs/PaletteButton.tscn") +const palette_button = preload("res://src/Palette/PaletteButton.tscn") var current_palette = "Default" var from_palette : Palette diff --git a/Prefabs/PaletteImportFileDialog.tscn b/src/Palette/PaletteImportFileDialog.tscn similarity index 100% rename from Prefabs/PaletteImportFileDialog.tscn rename to src/Palette/PaletteImportFileDialog.tscn diff --git a/Prefabs/PatternButton.gd b/src/PatternButton.gd similarity index 100% rename from Prefabs/PatternButton.gd rename to src/PatternButton.gd diff --git a/Prefabs/PatternButton.tscn b/src/PatternButton.tscn similarity index 90% rename from Prefabs/PatternButton.tscn rename to src/PatternButton.tscn index 8f2e631f7..86f4a9c7a 100644 --- a/Prefabs/PatternButton.tscn +++ b/src/PatternButton.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://Assets/Graphics/Brush_button.png" type="Texture" id=1] -[ext_resource path="res://Prefabs/PatternButton.gd" type="Script" id=2] +[ext_resource path="res://src/PatternButton.gd" type="Script" id=2] + [node name="PatternButton" type="TextureButton"] margin_right = 32.0 diff --git a/Scripts/Rulers/Guides.gd b/src/Rulers/Guides.gd similarity index 100% rename from Scripts/Rulers/Guides.gd rename to src/Rulers/Guides.gd diff --git a/Scripts/Rulers/HorizontalRuler.gd b/src/Rulers/HorizontalRuler.gd similarity index 100% rename from Scripts/Rulers/HorizontalRuler.gd rename to src/Rulers/HorizontalRuler.gd diff --git a/Scripts/Rulers/VerticalRuler.gd b/src/Rulers/VerticalRuler.gd similarity index 100% rename from Scripts/Rulers/VerticalRuler.gd rename to src/Rulers/VerticalRuler.gd diff --git a/Scripts/SecondViewport.gd b/src/SecondViewport.gd similarity index 100% rename from Scripts/SecondViewport.gd rename to src/SecondViewport.gd diff --git a/Scripts/SelectionRectangle.gd b/src/SelectionRectangle.gd similarity index 100% rename from Scripts/SelectionRectangle.gd rename to src/SelectionRectangle.gd diff --git a/Scripts/TransparentChecker.gd b/src/TransparentChecker.gd similarity index 100% rename from Scripts/TransparentChecker.gd rename to src/TransparentChecker.gd diff --git a/Scripts/XDGDataPaths.gd b/src/XDGDataPaths.gd similarity index 100% rename from Scripts/XDGDataPaths.gd rename to src/XDGDataPaths.gd