Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Scrolling containers

Author
Message
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 24th Feb 2014 20:54
How would i go about creating scrolling containers, for example, a container containing a list of all levels to select from that can be scrolled up and down (or left and right) using touch controls.

I'm trying to think of a way to do this but keep coming up short since there isn't any way to contain sprites to a specific area so they would be visible outside the container when scrolling.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 24th Feb 2014 21:08
Actually, you can restrict sprites to a rendering rectangle, using SETSPRITESCISSOR - sorry I don't know the specifics, but look it up. For each sprite you could set the same rectangular area on the screen, and the sprites would only be displayed inside that.

I am the one who knocks...
wargasmic
18
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 25th Feb 2014 01:37
Ah ok, thanks Van B I will give that a go.
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 26th Feb 2014 15:57
Wargasmic

Van is correct, using a scissor clips a rectangle so sprites will ONLY render in that rectangle. All you then have to do is code a routine to feed your text/sprites at the top or bottom whilst keeping track of whats clicked on (with sprites that is easy with the spritehit command)

www.bitmanip.com
All the juicy you could ever dream of!

Login to post a reply

Server time is: 2024-11-25 02:32:30
Your offset time is: 2024-11-25 02:32:30