mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-12 22:35:18 +00:00
Update PaletteContainer.gd
This commit is contained in:
parent
6bd4f57903
commit
73830832ce
1 changed files with 5 additions and 1 deletions
|
@ -115,12 +115,16 @@ func on_color_select(index : int) -> void:
|
|||
Global.update_right_custom_brush()
|
||||
|
||||
func _load_palettes() -> void:
|
||||
var file := File.new()
|
||||
var dir := Directory.new()
|
||||
|
||||
if not dir.dir_exists("user://palettes"):
|
||||
dir.make_dir("user://palettes");
|
||||
dir.make_dir("user://custom/palettes")
|
||||
if not dir.dir_exists("user://palettes/custom"):
|
||||
dir.make_dir("user://palettes/custom")
|
||||
if not file.file_exists("user://palettes/default_palette.json"):
|
||||
dir.copy("res://Assets/Graphics/Palette/default_palette.json","user://palettes/default_palette.json");
|
||||
if not file.file_exists("user://palettes/bubblegum16.json"):
|
||||
dir.copy("res://Assets/Graphics/Palette/bubblegum16.json","user://palettes/bubblegum16.json");
|
||||
|
||||
var palette_files : Array = get_palette_files("user://palettes")
|
||||
|
|
Loading…
Add table
Reference in a new issue