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 / [DBPro] Sprite GUI

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Oct 2005 01:04 Edited at: 19th Oct 2005 01:10
I decided to make some proper GUI functions recently, and actually try to make some half descent GUI Functions that are made of sprites, and return data using arrays (to return lots of different kinds of data i.e. normal, clicked etc..)

We'll here is a Button Function that I made, it works just fine, use it if you like... the only problem is it shows the backdrop... any help appreciated..




You can also load images to use as the buttons..

You can either load separate images... or do what I do, load a bitmap that has all button images...

The bitmap an be any size you want, but I find the bigger it is the better.. the bitmap must have 4 button images, going from the top of the bitmap to the bottom... I'll attach one later.

here's the code to split the bitmap into 4 bits..




[edit]

Okay, a simple button bitmap is attached

(the bitmap has the same name as the code above calls for, so there's no need to change anything)


Attachments

Login to view attachments
Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 3rd Nov 2005 22:10 Edited at: 3rd Nov 2005 22:11
these are good toaster

Edit:

Opps sorry i didn't realise this was dead

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Nov 2005 19:42
thanks

btw, these aren't dead, but noone's actually replyed for some reason


Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th Nov 2005 14:45
here's something better, this has windows with it too... and you can move them, they're not fully done because, well, you'll see




Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 6th Nov 2005 16:53
cool but they need splitting up so you can take bit's out of them

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Nov 2005 17:24
just copy everything apart from the main loop, and go from there


Login to post a reply

Server time is: 2024-11-23 10:52:07
Your offset time is: 2024-11-23 10:52:07