Merge pull request #1 from TeddyDD/fix-colorize

Fix removing gradient steps from colorize node
This commit is contained in:
Rodolphe Suescun 2018-08-08 09:03:49 +02:00 committed by GitHub
commit 312b7f74d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ anchor_bottom = 0.0
margin_left = 1.0
margin_top = 4.0
margin_right = 133.0
margin_bottom = 63.0
margin_bottom = 72.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1

View File

@ -11,10 +11,10 @@ class GradientCursor:
rect_size = Vector2(WIDTH, 20)
func _gui_input(ev):
if ev is InputEventMouseButton && ev.doubleclick:
if ev.button_index == 1:
if ev is InputEventMouseButton:
if ev.button_index == BUTTON_LEFT && ev.doubleclick:
get_parent().select_color(self, ev.global_position)
elif ev.button_index == 2 && get_parent().get_sorted_cursors().size() > 2:
elif ev.button_index == BUTTON_RIGHT && get_parent().get_sorted_cursors().size() > 2:
var parent = get_parent()
parent.remove_child(self)
parent.update_shader()