void SimpleSmoothScrolling() {
float toPos;
if (YourOptionCount > YourMaxOptions){
if (YourCurrentOption > YourMaxOptions) {
toPos = (0.1f / 3) + ((YourMaxOptions * 0.035f) + 0.1261f);
}
else {
toPos = (0.1f / 3) + ((YourCurrentOption * 0.035f) + 0.1261f);
}
}
else{
toPos = (0.1f / 3) + ((YourCurrentOption * 0.035f) + 0.1261f);
}
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0005f;
}
if (scrollBarPos < toPos) {
scrollBarPos += 0.0005f;
}
}
and put SimpleSmoothScrolling(); where ya ScriptVM_Dtr is..........before getting input obv ;P
float toPos;
if (YourOptionCount > YourMaxOptions){
if (YourCurrentOption > YourMaxOptions) {
toPos = (0.1f / 3) + ((YourMaxOptions * 0.035f) + 0.1261f);
}
else {
toPos = (0.1f / 3) + ((YourCurrentOption * 0.035f) + 0.1261f);
}
}
else{
toPos = (0.1f / 3) + ((YourCurrentOption * 0.035f) + 0.1261f);
}
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0005f;
}
if (scrollBarPos < toPos) {
scrollBarPos += 0.0005f;
}
}
and put SimpleSmoothScrolling(); where ya ScriptVM_Dtr is..........before getting input obv ;P