Trying to scale a UI element by mouse wheel
I have a world map accessible via a GUI. I'm trying to make it so the map can scale with mouse wheel input, but I'm unsure where to start.
The world map exists in an overlay, which exists in a border (because I have sub-map elements that overlap the main map). The map can be panned on the X and Y, although I'm not thrilled with how it works, and am open to suggestions on that as well. I followed this tutorial to get the panning to work, but can't make the logic work in my head to get what amounts to GUI "zooming" to work.
Thanks in advance.
asked Jan 31 '16 at 01:55 AM in Blueprint Scripting
Put your map and other related stuff/widgets inside a Scalebox. Then inside Scalebox set the very top option Stretching>Stretch to "User Specified". Then in Graph add node "Set User Specified Scale", target it to your Scalebox and then you will have full access to its Scale using Float. You can create some Slider or/and bind that Float to Mouse Wheel. Personally i have a whole Menu which scale is controlled via such Slider in menu itself. I am sure its technically no problem to bind Mouse Whell to control such Slider then.
answered Aug 23 '17 at 08:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here