[Fix] Pointer Bug in ToolBar plugin

Fixes an issue where the pointer moves down when "open user module" button is spammed
This commit is contained in:
Nightwing
2021-12-30 06:26:58 +09:00
committed by GitHub
parent 1552f18a87
commit 46aaf57b45
+2 -1
View File
@@ -84,11 +84,12 @@ end
function ToolbarView:on_mouse_pressed(button, x, y, clicks) function ToolbarView:on_mouse_pressed(button, x, y, clicks)
local caught = ToolbarView.super.on_mouse_pressed(self, button, x, y, clicks) local caught = ToolbarView.super.on_mouse_pressed(self, button, x, y, clicks)
if caught then return end if caught then return false end
core.set_active_view(core.last_active_view) core.set_active_view(core.last_active_view)
if self.hovered_item then if self.hovered_item then
command.perform(self.hovered_item.command) command.perform(self.hovered_item.command)
end end
return true
end end