Skip to content

Commit ca3b77d

Browse files
committed
WIP: open add node popup when dragging from an unconnected socket
1 parent 76d0441 commit ca3b77d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

nodezator/graphman/socketparenthood/action.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
from ..socket.output import OutputSocket
1111

12+
from pygame.mouse import (
13+
get_pos as get_mouse_pos,
14+
)
15+
1216

1317
class UserActions:
1418
"""Behaviours related to user actions."""
@@ -123,6 +127,11 @@ def cancel_defining_segment(self):
123127
### file state
124128
APP_REFS.window_manager.set_state("loaded_file")
125129

130+
print("NICK: cancel_defining_segment - add mouse up position here, don't delete socket_a")
131+
mouse_pos = get_mouse_pos()
132+
APP_REFS.ea.popup_spawn_pos = mouse_pos
133+
(APP_REFS.window_manager.canvas_popup_menu.focus_if_within_boundaries(mouse_pos))
134+
126135
### restart the loop
127136
raise ContinueLoopException
128137

0 commit comments

Comments
 (0)