Hey all,
I have a settings Common Activatable widget. The layout is
TOP: This holds HB with 3 buttons on the top.
MIDDLE: section is a Common Activatable Widget Stack
BOTTOM: the Back button.
Working in Blueprints.
In the common activatable Widget Stack I push a Audio settings widget, Common Activatable Widget.
The slider is my own User Widget with Text and a slider. In this BP i use the onAnalogueChanged() and does a check that the slider has User Focus, and then it checks its value < 0 or >= 0 , then does addition or subtraction of the value of the slider and updates the slider.
I want my game to work with keyboard and mouse OR gamepad. The user can switch at any time between input.
I had a problem where moving up and down between the sliders, the up and down would affect the change in value. I appreciate the D pad is not 4 independent buttons, there will be a deadzone to consider.
I have also messed around with the sliders details options of Requires Controller Lock.
So I wrapped the slider in a button and this helped to solve the up/down movement between UI elements causing a slider value to change.
The prob I have, is that when you press A (lower face btn) to click onto the slider, the slider value snaps to the middle.
I have tried adding a delay in the sliders BP, Event on added to focus, tried using delay and then tried Set Timer By Fuc Name , used this to set a bool AllowedFocus. Then on my on AnalogueValueChanged I added a check for this as a 3rd pin on the AND (see other pins mentioned above).
This didn’t help, the snapping persisted.
The snapping on all 3 instances of the sliders are all snapping to halfway.
The default val of slider is 0, min val 0, max 100, isFocusable ticked.
In the Audio Common Activatable Widget, I load the Audio settings Master, SFX and Music and set the values, if none is saved it uses the default value as per set in the Save Game object. The Save Game object has 3 properties one for each volume setting and its default val is set to 10.
I thought maybe the mouse cursor pos (even tho mouse now hidded as input is controller) was maybe causing the problem, but onTick I check if the global hardware used input is Gamepad (Enum to string) if it is on the GetPlayerController I call set show mouse cursor and enableclick event to ticked or unticked as needed.
Still my bug persists!
Can anyone give me any tips on why this snapping is happening? Why the value of the slider goes to the midway mark after pressing the A btn. How can I solve it?
This text is long enough lol But to say quickly I have tried adding key mappings IMC with IAs. But still the problem persists
I’ve added various print strings, I see change in colour of the slider when its focused, I am not setting the slider to 50% anywhere.
I would be REALLY grateful for any help, its really driving me nuts!