diff --git a/Assets/Graphics/Transparent Background Dark.png b/Assets/Graphics/Transparent Background Dark.png new file mode 100644 index 0000000..3d3d2c8 Binary files /dev/null and b/Assets/Graphics/Transparent Background Dark.png differ diff --git a/Assets/Graphics/Transparent Background Dark.png.import b/Assets/Graphics/Transparent Background Dark.png.import new file mode 100644 index 0000000..fed594b --- /dev/null +++ b/Assets/Graphics/Transparent Background Dark.png.import @@ -0,0 +1,13 @@ +[remap] + +importer="image" +type="Image" +path="res://.import/Transparent Background Dark.png-3390cbd0582c34c8d5e9ea776775a7f5.image" + +[deps] + +source_file="res://Assets/Graphics/Transparent Background Dark.png" +dest_files=[ "res://.import/Transparent Background Dark.png-3390cbd0582c34c8d5e9ea776775a7f5.image" ] + +[params] + diff --git a/Assets/Graphics/Transparent Background Godot.png b/Assets/Graphics/Transparent Background Godot.png new file mode 100644 index 0000000..56d454c Binary files /dev/null and b/Assets/Graphics/Transparent Background Godot.png differ diff --git a/Assets/Graphics/Transparent Background Godot.png.import b/Assets/Graphics/Transparent Background Godot.png.import new file mode 100644 index 0000000..0ce3089 --- /dev/null +++ b/Assets/Graphics/Transparent Background Godot.png.import @@ -0,0 +1,13 @@ +[remap] + +importer="image" +type="Image" +path="res://.import/Transparent Background Godot.png-d1a39497ccb71eaedecb0ccf98e2bf02.image" + +[deps] + +source_file="res://Assets/Graphics/Transparent Background Godot.png" +dest_files=[ "res://.import/Transparent Background Godot.png-d1a39497ccb71eaedecb0ccf98e2bf02.image" ] + +[params] + diff --git a/Assets/Graphics/Transparent Background Gold.png b/Assets/Graphics/Transparent Background Gold.png new file mode 100644 index 0000000..6c75133 Binary files /dev/null and b/Assets/Graphics/Transparent Background Gold.png differ diff --git a/Assets/Graphics/Transparent Background Gold.png.import b/Assets/Graphics/Transparent Background Gold.png.import new file mode 100644 index 0000000..e80a0a4 --- /dev/null +++ b/Assets/Graphics/Transparent Background Gold.png.import @@ -0,0 +1,13 @@ +[remap] + +importer="image" +type="Image" +path="res://.import/Transparent Background Gold.png-df3e9b1fb8719f4a7356d4379d2066e3.image" + +[deps] + +source_file="res://Assets/Graphics/Transparent Background Gold.png" +dest_files=[ "res://.import/Transparent Background Gold.png-df3e9b1fb8719f4a7356d4379d2066e3.image" ] + +[params] + diff --git a/Assets/Graphics/Transparent Background.png b/Assets/Graphics/Transparent Background Gray.png similarity index 100% rename from Assets/Graphics/Transparent Background.png rename to Assets/Graphics/Transparent Background Gray.png diff --git a/Assets/Graphics/Transparent Background Gray.png.import b/Assets/Graphics/Transparent Background Gray.png.import new file mode 100644 index 0000000..530cfb8 --- /dev/null +++ b/Assets/Graphics/Transparent Background Gray.png.import @@ -0,0 +1,13 @@ +[remap] + +importer="image" +type="Image" +path="res://.import/Transparent Background Gray.png-0ba67df3c826cdf2e974e693683b6f48.image" + +[deps] + +source_file="res://Assets/Graphics/Transparent Background Gray.png" +dest_files=[ "res://.import/Transparent Background Gray.png-0ba67df3c826cdf2e974e693683b6f48.image" ] + +[params] + diff --git a/Assets/Graphics/Transparent Background.png.import b/Assets/Graphics/Transparent Background.png.import deleted file mode 100644 index 6c63960..0000000 --- a/Assets/Graphics/Transparent Background.png.import +++ /dev/null @@ -1,13 +0,0 @@ -[remap] - -importer="image" -type="Image" -path="res://.import/Transparent Background.png-62a2c5eb3e805ff7dbb890edc2b8d883.image" - -[deps] - -source_file="res://Assets/Graphics/Transparent Background.png" -dest_files=[ "res://.import/Transparent Background.png-62a2c5eb3e805ff7dbb890edc2b8d883.image" ] - -[params] - diff --git a/Main.tscn b/Main.tscn index bb06ee2..494aa90 100644 --- a/Main.tscn +++ b/Main.tscn @@ -859,6 +859,7 @@ enabled_focus_mode = 0 script = ExtResource( 15 ) [node name="ViewportContainer" type="ViewportContainer" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler"] +editor/display_folded = true margin_left = 16.0 margin_right = 704.0 margin_bottom = 462.0 diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index c4a5439..8d6b91c 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -3,7 +3,6 @@ class_name Canvas var layers := [] var current_layer_index := 0 -var trans_background : ImageTexture var location := Vector2.ZERO var size := Vector2(64, 64) var frame := 0 setget frame_changed @@ -27,9 +26,6 @@ var line_2d : Line2D # Called when the node enters the scene tree for the first time. func _ready() -> void: Global.can_draw = false - #Background - trans_background = ImageTexture.new() - trans_background.create_from_image(preload("res://Assets/Graphics/Transparent Background.png"), 0) #The sprite itself if layers.empty(): @@ -381,7 +377,7 @@ func get_layer_container(layer_index : int) -> LayerContainer: return null func _draw() -> void: - draw_texture_rect(trans_background, Rect2(location, size), true) #Draw transparent background + draw_texture_rect(Global.transparent_background, Rect2(location, size), true) #Draw transparent background #Onion Skinning #Past if Global.onion_skinning_past_rate > 0: diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 0c407c6..973c18c 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -17,6 +17,7 @@ var canvases := [] var hidden_canvases := [] var left_cursor_tool_texture : ImageTexture var right_cursor_tool_texture : ImageTexture +var transparent_background : ImageTexture # warning-ignore:unused_class_variable var selected_pixels := [] var image_clipboard : Image @@ -205,6 +206,8 @@ func _ready() -> void: config_cache.load("user://cache.ini") undo_redo = UndoRedo.new() + transparent_background = ImageTexture.new() + transparent_background.create_from_image(preload("res://Assets/Graphics/Transparent Background Dark.png"), 0) image_clipboard = Image.new() var root = get_tree().get_root() diff --git a/Scripts/PreferencesDialog.gd b/Scripts/PreferencesDialog.gd index 13b4483..c59b6f7 100644 --- a/Scripts/PreferencesDialog.gd +++ b/Scripts/PreferencesDialog.gd @@ -32,24 +32,28 @@ func change_theme(ID : int) -> void: var ruler_style if ID == 0: #Dark Theme Global.theme_type = "Dark" - VisualServer.set_default_clear_color(Color(0.301961, 0.301961, 0.301961)) + Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Transparent Background Dark.png"), 0) + VisualServer.set_default_clear_color(Color(0.247059, 0.25098, 0.247059)) main_theme = preload("res://Themes & Styles/Dark Theme/Dark Theme.tres") top_menu_style = preload("res://Themes & Styles/Dark Theme/DarkTopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Dark Theme/DarkRulerStyle.tres") elif ID == 1: #Gray Theme Global.theme_type = "Dark" + Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Transparent Background Gray.png"), 0) VisualServer.set_default_clear_color(Color(0.301961, 0.301961, 0.301961)) main_theme = preload("res://Themes & Styles/Gray Theme/Gray Theme.tres") top_menu_style = preload("res://Themes & Styles/Gray Theme/GrayTopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Dark Theme/DarkRulerStyle.tres") elif ID == 2: #Godot's Theme Global.theme_type = "Dark" - VisualServer.set_default_clear_color(Color(0.301961, 0.301961, 0.301961)) + Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Transparent Background Godot.png"), 0) + VisualServer.set_default_clear_color(Color(0.27451, 0.278431, 0.305882)) main_theme = preload("res://Themes & Styles/Godot\'s Theme/Godot\'s Theme.tres") top_menu_style = preload("res://Themes & Styles/Godot\'s Theme/TopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Godot\'s Theme/RulerStyle.tres") elif ID == 3: #Gold Theme Global.theme_type = "Light" + Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Transparent Background Gold.png"), 0) VisualServer.set_default_clear_color(Color(0.694118, 0.619608, 0.458824)) main_theme = preload("res://Themes & Styles/Gold Theme/Gold Theme.tres") top_menu_style = preload("res://Themes & Styles/Gold Theme/GoldTopMenuStyle.tres")