Using the command sliderSetSpeed (with both syntaxes) causes the slider's page step (the amount adjusted with every move of the slider itself) to reset to an extremely small number relative to the sliders max range. The slider's line step (the amount adjusted when the arrows are clicked) is adjusted with this command as normal.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- No Bug
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Operating System Version
- 10.0.19041 Build 19041
- Category
- Scripting
Steps To Reproduce
- Start Arma 3
- Open Editor
- Open the escape menu
- Run this code in debug console:
_disp = findDisplay 46 createDisplay "RscDisplayEmpty"; _bg = _disp ctrlCreate ["RscText", -1]; _bg ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH]; _bg ctrlSetBackgroundColor [0.5, 0.5, 0.5, 1]; _bg ctrlCommit 0; _ctrl = _disp ctrlCreate ["RscXSliderH", -1]; _ctrl ctrlSetPosition [0.5, 1, 0.5]; _ctrl ctrlCommit 0; _ctrl sliderSetRange [0,100]; _ctrl sliderSetPosition 50; _ctrl sliderSetSpeed [10,10]; _ctrl ctrlAddEventHandler ["sliderPosChanged",{ params ["_control", "_newValue"]; hint str _newValue; }];
- Close the escape menu
- Adjust the slider created on screen and observe hint for value.
Observed: Slider correctly steps up by 10 with arrows but with a small number by slider changes
Expected: Both arrow and slider interactions adjust the slider value by 10
Additional Information
- The config value sliderStep still works to adjust the page value of a slider.
- https://community.bistudio.com/wiki/sliderSetSpeed
Event Timeline
Comment Actions
This is not a bug. RscXSlider does not use page param, instead it acts like scrollbar when you click on the bar. Arrows use line param. Try with RscSlider instead and it works with page too as intended.