File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
material_maker/windows/load_from_website Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ var displayed_assets : Array = []
6
6
var thumbnail_update_thread : Thread = null
7
7
var only_return_index : bool = false
8
8
9
+ var _is_item_list_warping_mouse : int = 0
10
+
9
11
@onready var item_list : ItemList = $ VBoxContainer/ItemList
10
12
11
13
@@ -138,12 +140,17 @@ func _on_Filter_changed(new_text):
138
140
func _on_item_list_gui_input (event : InputEvent ) -> void :
139
141
if event is InputEventMouseMotion and (
140
142
event .button_mask & MOUSE_BUTTON_MASK_MIDDLE ) != 0 :
141
- $ VBoxContainer/ItemList .get_v_scroll_bar ().value -= event .relative .y
143
+
144
+ _is_item_list_warping_mouse -= 1 if _is_item_list_warping_mouse else 0
145
+ if not _is_item_list_warping_mouse :
146
+ $ VBoxContainer/ItemList .get_v_scroll_bar ().value -= event .relative .y
142
147
143
148
var rect : Rect2 = $ VBoxContainer/ItemList .get_rect ()
144
149
var mouse_pos = $ VBoxContainer/ItemList .get_local_mouse_position ()
145
150
146
151
if mouse_pos .y > rect .size .y :
152
+ _is_item_list_warping_mouse = 2
147
153
mm_globals .do_warp_mouse (Vector2 (mouse_pos .x , 0 ), $ VBoxContainer/ItemList )
148
154
elif mouse_pos .y < 0 :
155
+ _is_item_list_warping_mouse = 2
149
156
mm_globals .do_warp_mouse (Vector2 (mouse_pos .x , rect .size .y ), $ VBoxContainer/ItemList )
You can’t perform that action at this time.
0 commit comments