From abee0653d66fff1729112a421facd78ecd3787f0 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 20 Dec 2019 05:22:03 +0200 Subject: [PATCH] 3 themes available under Preferences, changed theme organization Dark theme (default), gray theme, Godot's theme --- Main.tscn | 24 +++++++++---------- Prefabs/NotificationLabel.tscn | 6 ++++- Prefabs/PreferencesDialog.tscn | 4 ++-- Scripts/PreferencesDialog.gd | 14 +++++++---- .../Godot's Theme.tres} | 0 .../RulerStyle.tres | 0 .../TopMenuStyle.tres | 0 .../Gray Theme.tres} | 0 .../GrayTopMenuStyle.tres} | 0 9 files changed, 28 insertions(+), 20 deletions(-) rename Themes & Styles/{Main Theme/Main Theme.tres => Godot's Theme/Godot's Theme.tres} (100%) rename Themes & Styles/{Main Theme => Godot's Theme}/RulerStyle.tres (100%) rename Themes & Styles/{Main Theme => Godot's Theme}/TopMenuStyle.tres (100%) rename Themes & Styles/{Main Theme/Original Theme.tres => Gray Theme/Gray Theme.tres} (100%) rename Themes & Styles/{Main Theme/OriginalTopMenuStyle.tres => Gray Theme/GrayTopMenuStyle.tres} (100%) diff --git a/Main.tscn b/Main.tscn index f563e312e..66658ad78 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=81 format=2] -[ext_resource path="res://Themes & Styles/Main Theme/Original Theme.tres" type="Theme" id=1] +[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://Themes & Styles/Main Theme/OriginalTopMenuStyle.tres" type="StyleBox" id=3] +[ext_resource path="res://Themes & Styles/Dark Theme/DarkTopMenuStyle.tres" type="StyleBox" id=3] [ext_resource path="res://Assets/Graphics/Tools/RectSelect.png" type="Texture" id=4] [ext_resource path="res://Assets/Graphics/Tools/ColorPicker.png" type="Texture" id=5] [ext_resource path="res://Assets/Graphics/Tools/Pencil_l.png" type="Texture" id=6] @@ -1478,8 +1478,8 @@ resizable = true mode = 0 access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "C:/Users/User/Desktop/Github/Pixelorama" -current_path = "C:/Users/User/Desktop/Github/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="SaveSprite" type="FileDialog" parent="."] anchor_left = 0.5 @@ -1494,8 +1494,8 @@ window_title = "Save Sprite as .pxo" resizable = true access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "C:/Users/User/Desktop/Github/Pixelorama" -current_path = "C:/Users/User/Desktop/Github/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ImportSprites" type="FileDialog" parent="."] margin_right = 515.0 @@ -1505,8 +1505,8 @@ resizable = true mode = 1 access = 2 filters = PoolStringArray( "*.bmp ; BMP Image", "*.hdr ; Radiance HDR Image", "*.jpg,*.jpeg ; JPEG Image", "*.png ; PNG Image", "*.svg ; SVG Image", "*.tga ; TGA Image", "*.webp ; WebP Image" ) -current_dir = "C:/Users/User/Desktop/Github/Pixelorama" -current_path = "C:/Users/User/Desktop/Github/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ExportSprites" type="FileDialog" parent="."] anchor_left = 0.5 @@ -1521,8 +1521,8 @@ window_title = "Export Sprite" resizable = true access = 2 filters = PoolStringArray( "*.png ; PNG Image" ) -current_dir = "C:/Users/User/Desktop/Github/Pixelorama" -current_path = "C:/Users/User/Desktop/Github/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ScaleImage" type="ConfirmationDialog" parent="."] editor/display_folded = true @@ -1677,8 +1677,8 @@ visible = false [node name="NewPaletteDialog" parent="." instance=ExtResource( 60 )] [node name="PaletteImportFileDialog" parent="." instance=ExtResource( 61 )] -current_dir = "C:/Users/User/Desktop/Github/Pixelorama" -current_path = "C:/Users/User/Desktop/Github/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="AnimationTimer" type="Timer" parent="."] diff --git a/Prefabs/NotificationLabel.tscn b/Prefabs/NotificationLabel.tscn index 6cfbe7237..1ae8b2a38 100644 --- a/Prefabs/NotificationLabel.tscn +++ b/Prefabs/NotificationLabel.tscn @@ -1,9 +1,13 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://Themes & Styles/Main Theme/Main Theme.tres" type="Theme" id=1] +[ext_resource path="res://Themes & Styles/Godot's Theme/Godot's Theme.tres" type="Theme" id=1] [ext_resource path="res://Scripts/NotificationLabel.gd" type="Script" id=2] + + + + [node name="NotificationLabel" type="Label"] margin_right = 116.0 margin_bottom = 14.0 diff --git a/Prefabs/PreferencesDialog.tscn b/Prefabs/PreferencesDialog.tscn index 58b35237f..012f8a527 100644 --- a/Prefabs/PreferencesDialog.tscn +++ b/Prefabs/PreferencesDialog.tscn @@ -48,8 +48,8 @@ margin_top = 24.0 margin_right = 218.0 margin_bottom = 44.0 text = "Dark Theme" -items = [ "Main Theme", null, false, 0, null, "Dark Theme", null, false, 1, null ] -selected = 1 +items = [ "Dark Theme", null, false, 0, null, "Gray Theme", null, false, 1, null, "Godot's Theme", null, false, 2, null ] +selected = 0 [node name="GridOptionsLabel" type="Label" parent="VBoxContainer"] margin_top = 48.0 diff --git a/Scripts/PreferencesDialog.gd b/Scripts/PreferencesDialog.gd index 6888c9dc5..85a8ea381 100644 --- a/Scripts/PreferencesDialog.gd +++ b/Scripts/PreferencesDialog.gd @@ -17,14 +17,18 @@ func _on_ThemeOption_item_selected(ID : int) -> void: var main_theme var top_menu_style var ruler_style - if ID == 0: #Main Theme - main_theme = preload("res://Themes & Styles/Main Theme/Main Theme.tres") - top_menu_style = preload("res://Themes & Styles/Main Theme/TopMenuStyle.tres") - ruler_style = preload("res://Themes & Styles/Main Theme/RulerStyle.tres") - elif ID == 1: #Dark Theme + if ID == 0: #Dark Theme 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 + 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 + 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") Global.control.theme = main_theme Global.top_menu_container.add_stylebox_override("panel", top_menu_style) diff --git a/Themes & Styles/Main Theme/Main Theme.tres b/Themes & Styles/Godot's Theme/Godot's Theme.tres similarity index 100% rename from Themes & Styles/Main Theme/Main Theme.tres rename to Themes & Styles/Godot's Theme/Godot's Theme.tres diff --git a/Themes & Styles/Main Theme/RulerStyle.tres b/Themes & Styles/Godot's Theme/RulerStyle.tres similarity index 100% rename from Themes & Styles/Main Theme/RulerStyle.tres rename to Themes & Styles/Godot's Theme/RulerStyle.tres diff --git a/Themes & Styles/Main Theme/TopMenuStyle.tres b/Themes & Styles/Godot's Theme/TopMenuStyle.tres similarity index 100% rename from Themes & Styles/Main Theme/TopMenuStyle.tres rename to Themes & Styles/Godot's Theme/TopMenuStyle.tres diff --git a/Themes & Styles/Main Theme/Original Theme.tres b/Themes & Styles/Gray Theme/Gray Theme.tres similarity index 100% rename from Themes & Styles/Main Theme/Original Theme.tres rename to Themes & Styles/Gray Theme/Gray Theme.tres diff --git a/Themes & Styles/Main Theme/OriginalTopMenuStyle.tres b/Themes & Styles/Gray Theme/GrayTopMenuStyle.tres similarity index 100% rename from Themes & Styles/Main Theme/OriginalTopMenuStyle.tres rename to Themes & Styles/Gray Theme/GrayTopMenuStyle.tres