Add widget near selected button in a scrollbox.
I have an Scrollbox-widget that generates a list of button-widgets. The navigation in this list can only be done with gamepad/keyboard scrolling through the buttons is done with ++/-- a INT variable.
what i miss right now for all my menus i have almost finished (trying to to find it out for almost a year now) is this small "decorative-fake-mouse cursor". it is just a widget with an image and i want to attach it always to the selected "button". the arrow widget should not be part of the button itself because it should stay outside of the scrollbox and can overlap ther other buttons in that list.
is it even possible to add a widget on that position? I tried now all possibilities with slots/canvas slots that i found but was not able to get the absolute position of the selected buttons inside that scrollbox widget.
I still hope that there is a way to make something like that but couldnt find any tutorials that go into that direction. the only UE4 project that i found which has something like this is this example: https://www.youtube.com/watch?v=duDRpVxcEwM&t=0m15s
i asked the same question over a half year ago but there was no answer: https://forums.unrealengine.com/showthread.php?121235-Need-help-with-RPG-cursor-on-selection-in-gamepad-menu&highlight=canvas%20slot
So right now i am a bit lost :)
asked Mar 20 '17 at 08:46 PM in Blueprint Scripting
Hi, have you found a solution yet? In case you have not, drag off the widget reference and type "get cached geometry". From that, you can then "local to viewport", getting its viewport or pixel position. Then you can also "get local size". Using these, you should be able to place the cursor accordingly.
answered Jul 11 '17 at 03:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here