Edit palette fixes

- If the palette has colors, automatically select the first one
- When adding a new color button, take the color currently selected on the picker instead of white
- Fixes issues with drag&dropping color buttons. The color that was dragged remains selected.
This commit is contained in:
OverloadedOrama 2019-12-26 02:01:04 +02:00
parent 4a2c0eb291
commit 9b73e4f661
9 changed files with 20 additions and 19 deletions

View file

@ -6,7 +6,6 @@
[ext_resource path="res://Assets/Graphics/Palette/remove_swatch_button.png" type="Texture" id=4]
[ext_resource path="res://Assets/Graphics/Palette/remove_swatch_button_hover.png" type="Texture" id=5]
[node name="EditPalettePopup" type="WindowDialog"]
visible = true
margin_right = 600.0

View file

@ -7,7 +7,6 @@
[ext_resource path="res://Scripts/Palette/PaletteButton.gd" type="Script" id=5]
[ext_resource path="res://Assets/Graphics/Palette/palette_button_fill.png" type="Texture" id=6]
[sub_resource type="ImageTexture" id=1]
[node name="PaletteButton" type="Button"]
@ -19,6 +18,7 @@ custom_styles/hover = ExtResource( 1 )
custom_styles/pressed = ExtResource( 2 )
custom_styles/focus = ExtResource( 3 )
custom_styles/normal = ExtResource( 4 )
action_mode = 0
button_mask = 3
icon = SubResource( 1 )
script = ExtResource( 5 )