Dominos

Dominos

19M Downloads

Slider Modifications

Goranaws opened this issue ยท 5 comments

commented

Most min/max slider values are arbitrary, so why lock a sliders value inside them? I've made some further modifications that allow users to set a value outside of the min/max values with ease. These changes also allow an outside value to persist through closing/opening an options menu. Also made a few optional cosmetic changes. I've tried to comment an explanation of each change for clarity.

master...Goranaws:patch-5

commented

This is neat. A few things/suggestions

  • Labels need to remain above the sliders so that they have a consistent length across all locales. Plus, the shorter the slider the less precision you have if you're using a mousedrag to adjust it.
  • Make the functionality opt in (maybe SetDynamic(true) as a method?) The most common sliders (opacity, scale, columns, size) actually have a limited range of values (ex opacity can't be less than zero)
  • If the slider is hidden, and the range of the value returns to within the normal suggested limits (say i set a padding of 10 after setting it to 120 earlier), then the slider boundaries should reset.
  • I don't appear to be able to type in a number outside of the current slider range easily. Say i put 120 into padding,
commented

latest adjustments: master...Goranaws:patch-7

commented

Seems reasonable. I like the concept of alt/modifier drag to break the slider limit.

commented

well, I feel its pretty solid as is, but you are a far better programmer than I, so feel free to streamline as necessary. If you have any more recommendations, do let me know, though. ;-)

I've always felt like the base slider needed a little more "oomph," so I decided to try doing something with it.

commented

This is now implemented with the latest commit 64a5593

When you create a new slider, you can pass softLimits = true as an option to allow typing in a value beyond the normal limit, as well as modifier + mousewheel.