ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 3031

About smooth scroller

by EL_Dev - 08-27-2019 - 06:34 PM
#1
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
float scrollBarPos;
if (currentOption > maxOptions) {
toPos = ((maxOptions * 0.035f) + 0.1415f);
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
if ((scrollBarPos - toPos) < 0.0020f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0020f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0020f;
}
}
}
This code completed a smooth scroller, but it only works when moved up.

How can I make it work when it goes down?
This account is currently banned
Ban reason: Leeching/spamming
Reply
#2
You have to loop it, put it above
Code:
otherLoop ();
monitorButtons ();
Reply
#3
(08-27-2019 - 07:55 PM)PhucedMODZ Wrote: You have to loop it, put it above
Code:
otherLoop ();
monitorButtons ();

Already completed.

Works only when option is raised, does not work when option is lowered.
This account is currently banned
Ban reason: Leeching/spamming
Reply
#4
(08-27-2019 - 06:34 PM)EL_Dev Wrote:
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
float scrollBarPos;
if (currentOption > maxOptions) {
toPos = ((maxOptions * 0.035f) + 0.1415f);
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
if ((scrollBarPos - toPos) < 0.0020f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0020f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0020f;
}
}
}
This code completed a smooth scroller, but it only works when moved up.

How can I make it work when it goes down?
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#5
i gonna try it out
Reply
#6
(08-27-2019 - 06:34 PM)EL_Dev Wrote:
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
float scrollBarPos;
if (currentOption > maxOptions) {
toPos = ((maxOptions * 0.035f) + 0.1415f);
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
if ((scrollBarPos - toPos) < 0.0020f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0020f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0020f;
}
}
}
This code completed a smooth scroller, but it only works when moved up.

How can I make it work when it goes down?
Dope
Reply
#7
Easy to fix men
Reply
#8
(08-27-2019 - 06:34 PM)EL_Dev Wrote:
Quote:無効なスムーススクロール
(){フロート
toPos;場合 (オプションカウント > maxOptions) {

フロートスクロールバーポッ;場合 (現在のオプション >
最大オプション) { toPos = ((maxOptions * 0.035f) + 0.1415f;
}
その他
{ toPos = (現在のオプション * 0.035f) +
0.1415f; }
}
その
他の { toPos = (現在のオプション * 0.035f)
+ 0.1415f; }
場合 ((スクロールバーポス - toPos) < 0.0020f)
{
スクロールバーポス = toPos; }
場合は
{ (スクロールバーポス >
toPos) { スクロールバーポス -= 0.0020f;
}
それ以外の場合 (スクロールバーポス < toPos) {
スクロールバーポス += 0.0020f;
}
}
}
このコードは、スムーズなスクロールを完了しましたが、上に移動した場合にのみ動作します。
それがダウンしたときにどのように動作させることができます
か?

(08-27-2019 - 06:34 PM)EL_Dev Wrote:
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
float scrollBarPos;
if (currentOption > maxOptions) {
toPos = ((maxOptions * 0.035f) + 0.1415f);
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
}
else {
toPos = ((currentOption * 0.035f) + 0.1415f);
}
if ((scrollBarPos - toPos) < 0.0020f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0020f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0020f;
}
}
}
Thank you.
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply

Users browsing: 1 Guest(s)