Add palette import from a PNG file

This commit is contained in:
novhack 2020-03-02 22:37:52 +01:00
parent b3a8eb6d84
commit 3b16b727b9
4 changed files with 39 additions and 1 deletions

View file

@ -43,6 +43,8 @@ func on_palette_import_file_selected(path : String) -> void:
palette = Palette.new().load_from_file(path)
elif path.to_lower().ends_with("gpl"):
palette = Import.import_gpl(path)
elif path.to_lower().ends_with("png"):
palette = Import.import_png_palette(path)
if palette:
if not Global.palettes.has(palette.name):