Request: Adjustable bounds for Scroller Panes
KonSola5 opened this issue ยท 1 comments
Description
It would be cool, if the bounds and step sizes for Scroller Panes (min-max) were adjustable.
Currently, they are hardcoded between -15 and 15 with step sizes: large - 1 and small - 0.1.
The most preferable way of adjusting the bounds would be with CC methods:
setMin(number)
- sets the minimum number that Scroller Pane can be scrolled to.setMax(number)
- sets the maximum number.getMin()
andgetMax()
get the minimum and maximum bounds, returning anumber
.setLargeStep(number)
sets the step size when scrolling without SHIFT.setSmallStep(number)
sets the step size when scrolling with SHIFT.getLargeStep()
andgetSmallStep()
are the getters for step size, returning anumber
.
An option to disable the decimal point would be a cherry on top.
This would enable more elegant number scrolling, if you wanted for example make a floor picker where you have only 5 floors, then you would only have to set min to 0, max to 5, set large step to 1 and small step to 1.
Describe alternatives you've considered
You can currently use setValue(value)
to force the value on the scroller pane to the certain value, but if I wanted a range that's outside of range between -15 and 15, then it's not possible.
Oh well, I have good news for you! ^^
The scrollbar behavior completely changed within the new Create version 1.5.1.
On top of the new interface by Create, the API from CC:C Bridge got changed too. You can now change the limits. However, you can only change them on one side, which then gets flipped over to the minus spectrum (which you can also toggle on or off).
This is due to a technical limitation from Create's code base.
I first wanted to make both limits adjustable, but without making my completely own Behavior class for it, this wont be really possible. Maybe in some future (or via a PR).
Thanks for contributing here!
I will keep this issue open until the update got released. ^^