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 / Some simple button functions

Author
Message
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 22nd Feb 2005 04:03
I've seen quite a few people asking how to make buttons/guis so here are some useful functions to help.
MakeButton(ButtonName$,Left,Top,Right,Bottom) - Adds a button
MouseOver(ButtonName$) - Returns a 1 if the mouse is over the button
DeleteButton(ButtonName$) - Deletes the button
DeleteAllButtons() - Deletes all buttons
gosub InitialiseMenu - A sub routine that must be called before you can use any other functions
gosub StoreMouseData - A sub routine that must be called at the start of your main loop
Here are the functions in an example:

I plan to add updates for drop down menus and right click menus etc. I've already made them just not as simple functions.
As mentioned in the example, feel free to use this as much as you want but please give me credit.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 22nd Feb 2005 04:36
Thanks for this code, it really helps,now i can make actual games,lol. I usually just make menu's for things.

Thx

Working for ELB software on Realms of Tutopia!
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 22nd Feb 2005 04:51
Glad it helps.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 23rd Feb 2005 02:05 Edited at: 23rd Feb 2005 02:07
Since You are probably the only one reading here andrew so i was wondering once we finish Realms Of Tutopia culd we maybe make an add-on to MSN - like a simey maker....? it might not help you but I know tonnes of people will use it!
Just a thought....

And also it will teach me drop-down menu's.
Because I don't know how to do those....

Working for ELB software on Realms of Tutopia!
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 23rd Feb 2005 20:43
Quote: "Since You are probably the only one reading here andrew "

Thanks for rubbing it in!
Maybe. We'll see when we get there.
I'll try and make the drop down menu functions.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 23rd Feb 2005 21:26 Edited at: 23rd Feb 2005 21:33
lol, wansn't meant to rub in just saying that usually people just read the first code snippet copy and move on.... I don't mean to be harsh!

Working for ELB software on Realms of Tutopia!
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Feb 2005 22:23
Nah! I was only messing around!
I'm glad someone finds it useful.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
squirrel 890
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location: aaaaaaaaaaaaaaaaaaaaa i remeber i forgot
Posted: 25th Feb 2005 03:50
i read um and i find this verry useful
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 25th Feb 2005 20:29
Thanks.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk

Login to post a reply

Server time is: 2024-11-23 14:05:42
Your offset time is: 2024-11-23 14:05:42