Hi,
I haven't found out yet, how you guys make those scroll bars which affect to variables? I've tried different things, but nothing seems to work. :/
And how you limit their moving in a small area?
y = yprevious;//or y = what you want it to be.
if(x < 0)x = 0;
if(x > 100)x = 100;
myVar = x *2.5;
x = xprevious;//or x = what you want it to be.
if(y < -100)y = -100;
if(y > 0)y = 0;
myVar = -y *2.5;
y = yprevious;
if(x < 0)x = 0;
if(x > 100)x = 100;
kuva.r = x *1;
xscreen = what-you-want-it-to-be;
if(yscreen < 25)yscreen = 25;
if(yscreen > 280)yscreen = 280;
kruva.r = yscreen - 25;
xscreen = what-you-want-it-to-be;
if(yscreen < 25)yscreen = 25;
if(yscreen > 280)yscreen = 280;
kruva.r = (yscreen*2.5) - 25;
xscreen = XSCR_POS;
if(yscreen < MIN_YSCREEN)yscreen = MIN_YSCREEN;
if(yscreen > MIN_YSCREEN + 100)yscreen = MIN_YSCREEN + 100;
kruva.r = (yscreen*2.5) - MIN_YSCREEN;
XSCR_POS = what-you-want-it-to-be;
MIN_YSCREEN = what-you-want-the-minimum-yscreen-limit-to-be;
y = palkki.y - height / 2;
population = (x + 100) * 5;
if(x < -100)x = -100;
if(x > 100)x = 100;
;
Users browsing this forum: No registered users and 1 guest