Mousewheel detection while using gui.EnableScreenClicker

I’m working on a custom gui that doesn’t use panels, and to make navigation easier, I’d like to make it so people can use their mouse wheel to scroll through menus.

The problem is that, once you enable the mouse on screen using gui.EnableScreenClicker, there doesn’t seem to be a way to detect mouse wheel input after that.

CUserCmd:GetMouseWheel() doesn’t work once screen clicker is active, and neither does PANEL:OnMouseWheeled().

Does anyone know a way around this problem?

Bump for page 1, still relevant after 3 days.

I’ve had this exact same problem and never found a solution

Make sure its not a error on your side when you use

PANEL/OnMouseWheeled, if its not, then report it on the Garrysmod github page, so they fix it.

he said he wasn’t using vgui or panels.

Use the world panel.



local worldPanel = vgui.GetWorldPanel();
function worldPanel.OnMouseWheeled( self, scrollDelta )

end


Yes! It works exactly as I need it to, thanks a ton!