Skip to content

Commit

Permalink
Merge pull request #9 from Orama-Interactive/master
Browse files Browse the repository at this point in the history
δγ
  • Loading branch information
Erevoid authored Dec 21, 2019
2 parents f4f673e + f4a62f2 commit 6739a2b
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 20 deletions.
Binary file added Assets/Graphics/Transparent Background Dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Assets/Graphics/Transparent Background Dark.png.import
Original file line number Diff line number Diff line change
@@ -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]

Binary file added Assets/Graphics/Transparent Background Godot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Assets/Graphics/Transparent Background Godot.png.import
Original file line number Diff line number Diff line change
@@ -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]

Binary file added Assets/Graphics/Transparent Background Gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Assets/Graphics/Transparent Background Gold.png.import
Original file line number Diff line number Diff line change
@@ -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]

File renamed without changes
13 changes: 13 additions & 0 deletions Assets/Graphics/Transparent Background Gray.png.import
Original file line number Diff line number Diff line change
@@ -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]

13 changes: 0 additions & 13 deletions Assets/Graphics/Transparent Background.png.import

This file was deleted.

1 change: 1 addition & 0 deletions Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions Scripts/Canvas.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions Scripts/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 6 additions & 2 deletions Scripts/PreferencesDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6739a2b

Please sign in to comment.