spaar / besiege-modloader

spaar's Mod Loader for Besiege - Deprecated
Other
57 stars 14 forks source link

In-game zooming and scrolling #35

Closed spaar closed 4 years ago

spaar commented 8 years ago

It would be great if the in-game zoom could be prevented from triggering when the user scrolls in a GUI with their mouse wheel.

wangw571 commented 8 years ago

lock the mouseorbit.zoom?

spaar commented 8 years ago

You could indeed prevent zooming by settings MouseOrbit.scrollSensitivityScaler to 0. So what would still be required is a way to detect whether the mouse is over a GUI (possibly even only one with a scoll view).

wangw571 commented 8 years ago

I thought we can use mouse positions :P how did Besiege itself made buttons like having real colliders and will make all collider behind it not receiving rays?

spaar commented 8 years ago

Well, it would be possible to just hardcode some special cases to check if the mouse is over any mod loader GUI, but ideally this would work with every GUI created by a mod. Getting the mouse position is no problem, but this would also require getting the positions and sizes of every GUI.Window that's currently shown. I don't know of any way to do this (except requiring all mods that want to use this call some additional methods or something like that). Another way would be if there was anything in Unity's API that would allow you to check if the mouse is over a GUI element.

spaar commented 4 years ago

Closing this, the mod loader will not receive future updates as it was superseded by the official in-game one.