Skip to content

Commit f3a2db9

Browse files
authored
Fixed minor portal issues (contributed by williamchange)
Fixed minor portal issues
2 parents 10e62a7 + 8d1c31d commit f3a2db9

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

material_maker/nodes/portal/portal.gd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ func jump_to_source() -> void:
111111
graph.scroll_offset = (source_portal.position_offset
112112
+ 0.5 * source_portal.size) * graph.zoom - 0.5 * graph.size
113113

114-
var tween : Tween = get_tree().create_tween()
115-
tween.tween_property(source_portal, "modulate", Color(1.5, 1.5, 1.5, 1.0), 0.2).set_trans(Tween.TRANS_CUBIC)
116-
tween.tween_property(source_portal, "modulate", Color.WHITE, 0.6).set_trans(Tween.TRANS_CUBIC).set_delay(0.5)
117-
source_portal.set_deferred("selected", true)
118-
await tween.finished
114+
var tween : Tween = get_tree().create_tween()
115+
tween.tween_property(source_portal, "modulate", Color(1.5, 1.5, 1.5, 1.0), 0.2).set_trans(Tween.TRANS_CUBIC)
116+
tween.tween_property(source_portal, "modulate", Color.WHITE, 0.6).set_trans(Tween.TRANS_CUBIC).set_delay(0.5)
117+
source_portal.set_deferred("selected", true)
118+
await tween.finished
119119
is_navigating_source = false
120120

121121
func set_portal_tip_text() -> void:
@@ -150,6 +150,8 @@ func _input(event : InputEvent) -> void:
150150
if event.alt_pressed and (mouse_in_node_rect() or mouse_in_label_rect()):
151151
accept_event()
152152
jump_to_source()
153+
else:
154+
set_link_hint(false)
153155

154156
func _on_dragger_gui_input(event : InputEvent) -> void:
155157
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:

material_maker/panels/graph_edit/graph_edit.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,16 @@ func _gui_input(event) -> void:
379379
# lasso selection
380380
if (event.button_mask & MOUSE_BUTTON_MASK_LEFT) != 0 and event.alt_pressed:
381381
accept_event()
382-
Input.set_custom_mouse_cursor(LASSO_CURSOR, Input.CURSOR_ARROW, LASSO_HOT_SPOT)
382+
if event.relative.length() > 0.0:
383+
Input.set_custom_mouse_cursor(LASSO_CURSOR, Input.CURSOR_ARROW, LASSO_HOT_SPOT)
383384
lasso_points.append(get_local_mouse_position())
384385
queue_redraw()
385386
elif (event.button_mask & MOUSE_BUTTON_MASK_LEFT) != 0 and event.shift_pressed:
386387
scroll_offset -= event.relative
387388
accept_event()
388389
else:
390+
if not has_grab:
391+
Input.set_custom_mouse_cursor(null)
389392
lasso_points.clear()
390393
queue_redraw()
391394

0 commit comments

Comments
 (0)