1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-13 17:23:08 +00:00

Fixed a colorpicker bug

This commit is contained in:
Variable 2024-09-15 10:18:00 +05:00
parent 52e45b158b
commit e916722e12

View file

@ -98,6 +98,12 @@ func _notification(what: int) -> void:
func _on_color_picker_color_changed(color: Color) -> void:
## due to the decimal nature of the color values, some values get rounded off
## unintentionally before entering this method.
## I've noticed that even tho the decimal values change, the HTML remains same after the change.
## So i'm using this trick to convert the values back to how they are shown in
## the color picker's UI.
color = Color(color.to_html())
if Tools.picking_color_for == MOUSE_BUTTON_RIGHT:
right_color_rect.color = color
else: