Page MenuHomeFeedback Tracker

sliderSetSpeed Command Resets Slider Page Value To Very Small Percentage
Closed, ResolvedPublic

Description

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.

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
  1. Start Arma 3
  2. Open Editor
  3. Open the escape menu
  4. 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;
	}];
  1. Close the escape menu
  2. 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

Event Timeline

Ansible2 created this task.Nov 5 2020, 9:18 PM
BIS_fnc_KK changed the task status from New to Reviewed.
BIS_fnc_KK added a comment.EditedMay 21 2021, 9:38 PM

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.

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.May 21 2021, 9:39 PM
BIS_fnc_KK closed this task as Resolved.
BIS_fnc_KK changed Resolution from Open to No Bug.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.