Import palette file dialog added

This commit is contained in:
CheetoHead 2019-12-18 09:43:11 -05:00
parent b08452034d
commit 9a65960994
16 changed files with 242 additions and 47 deletions

View file

@ -103,13 +103,13 @@ func _on_EditPaletteCancelButton_pressed() -> void:
pass # Replace with function body.
func _on_EditPaletteColorNameLineEdit_text_changed(new_text) -> void:
if current_swatch > 0 && current_swatch < working_palette.colors.size():
if current_swatch >= 0 && current_swatch < working_palette.colors.size():
working_palette.colors[current_swatch].name = new_text
_refresh_hint_tooltip(current_swatch)
pass
func _on_EditPaletteColorPicker_color_changed(color) -> void:
if current_swatch > 0 && current_swatch < working_palette.colors.size():
if current_swatch >= 0 && current_swatch < working_palette.colors.size():
palette_grid.get_child(current_swatch).get_child(0).modulate = color
working_palette.colors[current_swatch].data = color.to_html(true)
_refresh_hint_tooltip(current_swatch)