Code: Select all
parent.add{type="slider", minimum_value=1, maximum_value=2}
Edit: Setting value_step to 1 doesn't change anything (I think it's default 1 anyways?), and neither does setting discrete_slider and discrete_values have any effect. I also realize that a slider to select between 1 and 2 does not make much sense, but I want to use it in a context where the maximum_value could be larger in some cases, but it'll be 2 in some. Having a different UI to choose between 1 and 2 would be silly in that case.