mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Updated link to make it child of graph_edit control
Should fix problems under Linux
This commit is contained in:
parent
4a504b0bb5
commit
e4aebb9b1f
@ -11,7 +11,7 @@ func _ready():
|
||||
|
||||
func clip(p, s):
|
||||
clip_pos = p
|
||||
rect_global_position = p
|
||||
rect_global_position = Vector2(0, 0)
|
||||
rect_size = s
|
||||
rect_clip_content = true
|
||||
|
||||
|
@ -62,7 +62,7 @@ func _on_mouse_entered():
|
||||
link.clip(graph_edit.rect_global_position, graph_edit.rect_size)
|
||||
link.source = self
|
||||
link.target = w.widget
|
||||
viewport.add_child(link)
|
||||
graph_edit.add_child(link)
|
||||
links.append(link)
|
||||
|
||||
func _on_mouse_exited():
|
||||
@ -124,7 +124,7 @@ func pick_linked():
|
||||
link.clip(graph_edit.rect_global_position, graph_edit.rect_size)
|
||||
link.source = self
|
||||
link.end = rect_global_position+0.5*rect_size*get_global_transform().get_scale()
|
||||
viewport.add_child(link)
|
||||
graph_edit.add_child(link)
|
||||
set_process_input(true)
|
||||
pointed_control = null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user