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
 1296

how to smooth scroller

by EL_Dev - 08-24-2019 - 05:57 PM
#1
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
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.0200f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0200f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0200f;
}
}
}
I used this code to create a smooth scroll but it doesn't work for some reason.

Please provide scroll source.
This account is currently banned
Ban reason: Leeching/spamming
Reply
#2
Learn c then it will work
Reply
#3
you most probably have to call it with the scroller you are using if you have not changed that
[Image: smoke-mk3-diz.gif]
Discord: Smokey xKoVx#5964
Reply
#4
(08-24-2019 - 05:57 PM)EL_Dev Wrote:
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
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.0200f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0200f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0200f;
}
}
}
I used this code to create a smooth scroll but it doesn't work for some reason.

Please provide scroll source.

(08-25-2019 - 01:56 PM)Smokey_xKoVx Wrote: you most probably have to call it with the scroller you are using if you have not changed that

That's right.
[Image: a8keeuutawx01.gif]
Reply
#5
(08-25-2019 - 03:14 PM)iLLuminder Wrote:
(08-24-2019 - 05:57 PM)EL_Dev Wrote:
Quote:void smoothScroller(){
float toPos;
if(optionCount> maxOptions){
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.0200f){
scrollBarPos = toPos;
}
else {
if(scrollBarPos> toPos){
scrollBarPos-= 0.0200f;
}
else if(scrollBarPos <toPos){
scrollBarPos + = 0.0200f;
}
}
}
このコードを使用してスムーズなスクロールを作成しましたが、何らかの理由で機能しません。

スクロールソースを提供してください。

(08-25-2019 - 01:56 PM)Smokey_xKoVx Wrote: を変更していない場合は、使用しているスクローラーで呼び出す必要があります。

そのとおり。
Code:
GRAPHICS::DRAW_SPRITE("commonmenu", "gradient_nav", menuXcord, scrollBarPos, 0.23f, 0.035f, 0, 255, 255, 255, 255);

Can I use this scroller?

It doesn't work for me.
This account is currently banned
Ban reason: Leeching/spamming
Reply
#6
(08-26-2019 - 04:35 PM)EL_Dev Wrote:
(08-25-2019 - 03:14 PM)iLLuminder Wrote:
(08-24-2019 - 05:57 PM)EL_Dev Wrote:
Quote:void smoothScroller(){
float toPos;
if(optionCount> maxOptions){
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.0200f){
scrollBarPos = toPos;
}
else {
if(scrollBarPos> toPos){
scrollBarPos-= 0.0200f;
}
else if(scrollBarPos <toPos){
scrollBarPos + = 0.0200f;
}
}
}
このコードを使用してスムーズなスクロールを作成しましたが、何らかの理由で機能しません。

スクロールソースを提供してください。

(08-25-2019 - 01:56 PM)Smokey_xKoVx Wrote: を変更していない場合は、使用しているスクローラーで呼び出す必要があります。

そのとおり。
Code:
GRAPHICS::DRAW_SPRITE("commonmenu", "gradient_nav", menuXcord, scrollBarPos, 0.23f, 0.035f, 0, 255, 255, 255, 255);

Can I use this scroller?

It doesn't work for me.

smoothScroller must be looped.
[Image: a8keeuutawx01.gif]
Reply
#7
(08-26-2019 - 05:52 PM)iLLuminder Wrote:
(08-26-2019 - 04:35 PM)EL_Dev Wrote:
(08-25-2019 - 03:14 PM)iLLuminder Wrote:
(08-24-2019 - 05:57 PM)EL_Dev Wrote:
Quote:void smoothScroller(){
float toPos;
if(optionCount> maxOptions){
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.0200f){
scrollBarPos = toPos;
}
else {
if(scrollBarPos> toPos){
scrollBarPos-= 0.0200f;
}
else if(scrollBarPos <toPos){
scrollBarPos + = 0.0200f;
}
}
}
このコードを使用してスムーズなスクロールを作成しましたが、何らかの理由で機能しません。

スクロールソースを提供してください。

(08-25-2019 - 01:56 PM)Smokey_xKoVx Wrote: を変更していない場合は、使用しているスクローラーで呼び出す必要があります。

そのとおり。
Code:
GRAPHICS::DRAW_SPRITE("commonmenu", "gradient_nav", menuXcord, scrollBarPos, 0.23f, 0.035f, 0, 255, 255, 255, 255);

Can I use this scroller?

It doesn't work for me.

smoothScroller must be looped.
How do you assemble it?
This account is currently banned
Ban reason: Leeching/spamming
Reply
#8
(08-27-2019 - 12:21 PM)EL_Dev Wrote:
(08-26-2019 - 05:52 PM)iLLuminder Wrote:
(08-26-2019 - 04:35 PM)EL_Dev Wrote:
(08-25-2019 - 03:14 PM)iLLuminder Wrote:
(08-24-2019 - 05:57 PM)EL_Dev Wrote: このコードを使用してスムーズなスクロールを作成しましたが、何らかの理由で機能しません。

スクロールソースを提供してください。

(08-25-2019 - 01:56 PM)Smokey_xKoVx Wrote: を変更していない場合は、使用しているスクローラーで呼び出す必要があります。

そのとおり。
Code:
GRAPHICS::DRAW_SPRITE("commonmenu", "gradient_nav", menuXcord, scrollBarPos, 0.23f, 0.035f, 0, 255, 255, 255, 255);

Can I use this scroller?

It doesn't work for me.

smoothScroller must be looped.
How do you assemble it?


[Image: vL8YKeO.png]

There are other ways ...
So smoothScroller will be on all the time.
[Image: a8keeuutawx01.gif]
Reply
#9
(08-24-2019 - 05:57 PM)EL_Dev Wrote:
Quote:void smoothScroller() {
float toPos;
if (optionCount > maxOptions) {
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.0200f) {
scrollBarPos = toPos;
}
else {
if (scrollBarPos > toPos) {
scrollBarPos -= 0.0200f;
}
else if (scrollBarPos < toPos) {
scrollBarPos += 0.0200f;
}
}
}
I used this code to create a smooth scroll but it doesn't work for some reason.

Please provide scroll source.
oof
Reply
#10
(08-27-2019 - 02:45 PM)iLLuminder Wrote:
(08-27-2019 - 12:21 PM)EL_Dev Wrote:
(08-26-2019 - 05:52 PM)iLLuminder Wrote:
(08-26-2019 - 04:35 PM)EL_Dev Wrote:
(08-25-2019 - 03:14 PM)iLLuminder Wrote: そのとおり。
Code:
GRAPHICS::DRAW_SPRITE("commonmenu", "gradient_nav", menuXcord, scrollBarPos, 0.23f, 0.035f, 0, 255, 255, 255, 255);

Can I use this scroller?

It doesn't work for me.

smoothScroller must be looped.
How do you assemble it?


[Image: vL8YKeO.png]

There are other ways ...
So smoothScroller will be on all the time.
Thank you very much!

Try out.
This account is currently banned
Ban reason: Leeching/spamming
Reply

Users browsing: 1 Guest(s)