Fixed issues where fully transparent color could not be picked

More specifically, the color picked sometimes failed to pick transparent color (and picked black instead), swapping between colors when one of them is fully transparent made it fully opaque, and also when picking a color from a palette which was fully transparent made it fully opaque.

Closes #364
This commit is contained in:
Manolis Papadeas 2020-10-23 20:18:39 +03:00
parent df7a650137
commit 96fc2aa12d
3 changed files with 11 additions and 10 deletions

View file

@ -268,9 +268,9 @@ func on_color_select(index : int) -> void:
var color : Color = Global.palettes[current_palette].get_color(index)
if Input.is_action_just_pressed("left_mouse"):
Tools.assign_color(color, BUTTON_LEFT)
Tools.assign_color(color, BUTTON_LEFT, false)
elif Input.is_action_just_pressed("right_mouse"):
Tools.assign_color(color, BUTTON_RIGHT)
Tools.assign_color(color, BUTTON_RIGHT, false)
func _load_palettes() -> void: