ID:268315
Jun 8 2004, 6:56 pm
|
|
is there any way to do a check to see if an input box is open? Just curious, as I do a lot of menu icons (I use Click() a lot) which opens up input boxes consecutively, and I don't want people to click 2 different menu items and get 2 different inputs in a row...
|
In response to Slipknight
|
|
you have however I thought of this already... I guess I was just hoping of an easier method. It just so happens I didn't think of this when I was making my menu icons so now I have to go through a TON of code and put the var=0 whenever I use a return...
sigh, I'll give it one more day to see if someone comes up with a better way. :) |
Jon Snow wrote:
is there any way to do a check to see if an input box is open? Just curious, as I do a lot of menu icons (I use Click() a lot) which opens up input boxes consecutively, and I don't want people to click 2 different menu items and get 2 different inputs in a row... When an object is deleted, any procedure related to it will instantly stop. You can use this to your advantage, to keep input boxes open for a certain time period, or to check for the existance of input. A system might be something like this: query Now just override the get_input() procedure to ask for input: query/mcdonalds The above already prevents asking multiple times. You just have to remember to delete the /query after asking. A way of calling it: var/query/Q = new/query/mcdonalds(src) Granted this might be a bit overkill for your specific needs, but its a suggestion nontheless :) This was written on-the-fly, so there might be something I didn't account for or catch. Im sort of in a hurry, on the way to an exam. But it should be workable. Good luck, Alathon |
Quite obviously, you'd have 'var' set to 0, initially. Then, when someone clicks on an option it sets it to 1. They do all their stuff, then its set back to 0.
Example time,
In this manner, people should only be able to have one input box open at a time, provided you remember to simply add the 'if ()' check there at the top.
Anyway, I hope I've been of any help.
-- Slipknight