mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 11:54:44 -04:00
Changed normal textures of light theme UI buttons
This commit is contained in:
parent
b32c9634f9
commit
ba9ee9bdd8
42 changed files with 5 additions and 17 deletions
|
@ -1,13 +1,5 @@
|
|||
extends Node
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
func import_gpl(path : String) -> Palette:
|
||||
var result : Palette = null
|
||||
var file = File.new()
|
||||
|
@ -28,7 +20,7 @@ func import_gpl(path : String) -> Palette:
|
|||
var name_end = path.find_last('.')
|
||||
if name_end > name_start:
|
||||
result.name = path.substr(name_start, name_end - name_start)
|
||||
|
||||
|
||||
# Comments
|
||||
if line.begins_with('#'):
|
||||
comments += line.trim_prefix('#') + '\n'
|
||||
|
@ -41,13 +33,9 @@ func import_gpl(path : String) -> Palette:
|
|||
var color = Color(red, green, blue)
|
||||
result.add_color(color, name)
|
||||
line_number += 1
|
||||
|
||||
|
||||
if result:
|
||||
result.comments = comments
|
||||
file.close()
|
||||
|
||||
return result
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
return result
|
||||
|
|
|
@ -51,7 +51,7 @@ func on_palette_import_file_selected(path) -> void:
|
|||
palette = Palette.new().load_from_file(path)
|
||||
elif path.to_lower().ends_with("gpl"):
|
||||
palette = Import.import_gpl(path)
|
||||
|
||||
|
||||
if palette:
|
||||
if not Global.palettes.has(palette.name):
|
||||
Global.palettes[palette.name] = palette
|
||||
|
@ -216,5 +216,5 @@ func _delete_palette_file(file_name : String) -> void:
|
|||
|
||||
func save_palette(palette_name : String, filename : String) -> void:
|
||||
var palette = Global.palettes[palette_name]
|
||||
|
||||
|
||||
palette.save_to_file("user://palettes/custom/" + filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue