Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions material_maker/icons/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions material_maker/icons/cross.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[remap]

importer="svg"
type="DPITexture"
uid="uid://d1ta3b838aivw"
path="res://.godot/imported/cross.svg-1e1ed0f83009f7099e07bd965fe63d86.dpitex"

[deps]

source_file="res://material_maker/icons/cross.svg"
dest_files=["res://.godot/imported/cross.svg-1e1ed0f83009f7099e07bd965fe63d86.dpitex"]

[params]

base_scale=0.8
saturation=1.0
color_map={}
compress=true
4 changes: 4 additions & 0 deletions material_maker/panels/graph_edit/graph_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ var drag_cut_line : PackedVector2Array
var valid_drag_cut_entry: bool = false
const CURSOR_HOT_SPOT : Vector2 = Vector2(1.02, 17.34)

const LASSO_CURSOR : DPITexture = preload("res://material_maker/icons/cross.svg")
const LASSO_HOT_SPOT : Vector2 = Vector2(8.8, 8.8)
var lasso_points : PackedVector2Array

var is_dragging_connection : bool = false:
Expand Down Expand Up @@ -202,6 +204,7 @@ func _gui_input(event) -> void:
for point in node_points:
node.selected = node.selected or Geometry2D.is_point_in_polygon(point, lasso_points)
lasso_points.clear()
Input.set_custom_mouse_cursor(null)
queue_redraw()
elif event.is_action_pressed("ui_hierarchy_up"):
on_ButtonUp_pressed()
Expand Down Expand Up @@ -340,6 +343,7 @@ func _gui_input(event) -> void:
# lasso selection
if (event.button_mask & MOUSE_BUTTON_MASK_LEFT) != 0 and event.alt_pressed:
accept_event()
Input.set_custom_mouse_cursor(LASSO_CURSOR, Input.CURSOR_ARROW, LASSO_HOT_SPOT)
lasso_points.append(get_local_mouse_position())
queue_redraw()
elif (event.button_mask & MOUSE_BUTTON_MASK_LEFT) != 0 and event.shift_pressed:
Expand Down