Latest SOTW Winner
Newest Featured
Random Featured
Affiliates
|
Content
Description
This set of functions should help you to create your own mouse buttons. Great for a mouse-click user-interface such as a scripted subscreen, mini-game, title or mode-selection screen or similar.
It's quite advanced in terms of usage. If you're capable of manipulating arrays and the built in self-declared pointers quite well, you should be able to use it fine. It's probably reasonably accessible to users with less experience too though. It's meant to work a little like a button class, but obviously we don't have Object Oriented Programing in ZScript, so it's written completely differently to how I would write it in C++. It works in a similar(ish) way though, and you deal with buttons by making an integer which works (quite a bit) like a pointer-to-button, and then manipulating it with the functions provided in the 'library'. Because of this, if you're not careful with the way you deal with your 'pointers to button', you may well have stray buttons displayed on the screen that you have lost access to (in a similar way to how you can leak memory). If this happens, you can regain access to all buttons with a call to 'BTN_RemoveAllButtons()', but careful useage of your buttons is a much better method. You can change variables and use the 'private' functions within the .zh file directly seeing as there's no way of making them truly private, but it's un-recommended and might well break things - especially if you don't know what you're doing. The functions included should deal with all cases in which you need to deal with the buttons, and there are two constants you'll want to use. Rather than changing the values within the file directly it'd be much better to either write a function that does it (and let me know so I can distribute it with the rest of the functions), or request for me to write one - which I'll be quite happy to do. Especially in the case of the 'private' functions, the 'public' functions include idiot-proofing and the like but the 'private' ones don't so you'd be much better off using the public ones (I can't see any reason for anyone to need to use the private functions anyway, they're only really to reduce the size of the file because I call them from within the other functions). I've included a lot more information on how to use the functions, plus a proper explanation of each one in the example file.
Comments
No Comments Have been Posted |
||||||||||||||||||
|
Statistics
Who's Online [Complete List]
10 users active in the past 15 minutes (0 members, 0 of whom are invisible, and 10 guests).
Chatroom (irc.sixlabrats.com:6667 » #ZCR) — Join Chat
Sorry, chat statistics are not available at this time.
Database Statistics
There is currently a total of 282 submissions on the database.
There are 37 quests, 27 demos, 17 tiles, 5 tilesets, 14 scripts, and 182 screenshots. |
|||||||||||||||||||























