1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-03-13 23:05:20 +00:00
This commit is contained in:
Variable 2024-11-30 00:56:00 +05:00
parent cb1c390fdf
commit 272ccc015a
2 changed files with 2 additions and 2 deletions

View file

@ -509,7 +509,7 @@ func swap_color() -> void:
assign_color(left, MOUSE_BUTTON_RIGHT, false)
func assign_color(color: Color, button: int, change_alpha := true, index: int = 0) -> void:
func assign_color(color: Color, button: int, change_alpha := true, index: int = -1) -> void:
var c: Color = _slots[button].color
# This was requested by Issue #54 on GitHub
if color.a == 0 and change_alpha:

View file

@ -85,7 +85,7 @@ func scroll_palette(origin: Vector2i) -> void:
## This is helpful when we select color indirectly (e.g through colorpicker)
func find_and_select_color(color_info: Dictionary, mouse_button: int) -> void:
var target_color: Color = color_info.get("color", Color(0, 0, 0, 0))
var palette_color_index: int = color_info.get("index", 0)
var palette_color_index: int = color_info.get("index", -1)
if not is_instance_valid(current_palette):
return
var selected_index := Palettes.current_palette_get_selected_color_index(mouse_button)