Page MenuHomeFeedback Tracker

DbgUI.SliderFloat snaps to integer steps
Assigned, NormalPublic

Description

It is very difficult to use a SliderFloat with small float values, as the slider itself snaps to integer-sized steps

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Use the following code

float atest = 0.5;
float btest = 5.0;

void DbgUITest()
{
	DbgUI.Begin("A menu");
	{
		DbgUI.SliderFloat("a var", atest, -0.2, 1.2); DbgUI.SameLine(); DbgUI.Text("" + atest);    // Values available: -0.2, 0.8, 1.2
		DbgUI.SliderFloat("b var", btest, -2.0, 12.0); DbgUI.SameLine(); DbgUI.Text("" + btest); // Values available: -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
	}
	DbgUI.End();
}

Integer steps begin from the slider starting value, as seen in test A

Event Timeline

Geez changed the task status from New to Assigned.Jul 1 2024, 1:51 PM