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 / ScrollArea and sprite

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 30th Jun 2014 10:18
Hi

Do you know a way to create a sort of "scroll area" ?

I mean :
- création some buttons inside a surface
- add "cross-bar" to move the area (cross-bar could be sprite of course)
- if we move the cross-bar, the surface inside the area is moved, and some part of buttons are hiden or unhiden.

Do you know a method to do that ?

Thank you.

http://www.dracaena-studio.com
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 30th Jun 2014 10:33
Take a look at SetSpriteScissor(). Hope that helps

My hovercraft is full of eels
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Jun 2014 11:52
Scissors are a good option, like you can define an area on screen then have sprites only draw inside the area.

One option, if it's just buttons on the screen, you could use the view offset, so you'd position your sprites wherever you need them with the offset, then set the view offset to scroll around the area.

I am the one who knocks...
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 30th Jun 2014 16:11
hi

Thank you for your answer.
In fact, it's not only for buttons, it's for gadget like a panel gadget or an scrollarea gadget.

I use SetSpriteScissor() and viewoffset in some my games. I will try to use SetSpriteScissor to see i I can have the result I'm looking for ^^.

http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-11-25 06:32:50
Your offset time is: 2024-11-25 06:32:50