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.

Code Snippets / [DBP] - Scrolling items

Author
Message
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 19th Mar 2013 20:47
Hi guys,
this snippet is about scrolling items/images, it could be used for a hotbar or inventory(that's my intention).For base i used few stuff but i wrote most of it.I used image block tutorial thread from here : http://forum.thegamecreators.com/?m=forum_view&t=110437&b=1 and phaelax's scrollbar example from here : http://forum.thegamecreators.com/?m=forum_view&t=196148&b=4

There is more work that can be done to drawing calls to make it easier but it's good for the purpose of the demo.I optimized it as i can so it should be ok even with many images on the screen.Be aware that it's not pixel perfect some time it doesn't draw first line of the image or the last line, this doesen't bother me at all because my images are transparent there.I position images manually here but intend to use a grid in the future, feel free to do it.



Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Login to post a reply

Server time is: 2024-03-29 08:03:26
Your offset time is: 2024-03-29 08:03:26