escape menu?

Blitz3D Forums/Blitz3D Beginners Area/escape menu?

chwaga(Posted 2007) [#1]
I've created a method in which i can open up a menu by pressing escape, but how would i go about making it close?? everything i've tried so far hasnt worked. (note: the menu doesn't consume the entire screen, just a portion of it in the middle...if that would affect anything)


*(Posted 2007) [#2]
why not have a delay that counts down depending on how fast the computer is (millisecs count), then when the timer is up check for escape again. This will allow you to press escape to open and close then menu


chwaga(Posted 2007) [#3]
that wont work...i need a menu that is functionable, such as you can move the mouse over certain text on it to make the text a different color, so delay won't work...unfortunately.


N(Posted 2007) [#4]
Use a state machine!


*(Posted 2007) [#5]
the delay is just a small variable that counts up it doesnt have to be a 'Delay x' statement. something like:

if var>5000 and keydown( 1 )=1 then closemenu




chwaga(Posted 2007) [#6]
what i'm looking for is a method that i could pop in and out a series of images upon command, that's all.


*(Posted 2007) [#7]
what sort of images? one quick way i find is trying to do an imagerectcollide with a pixel image (1x1 pixels) and the image in question


LarsG(Posted 2007) [#8]
chwaga;
It might be better if you explained how far you've come with what you've got now.. and exactly what you are looking for, in more detail.

Better yet, post some code we can take a look at.. :)


chwaga(Posted 2007) [#9]
i can open up a window, but not close it. If there's a method to draw it OFF the screen, that would be PERFECT. I'm trying to make it "always in exhistance" but not always visible (oh, also, a way to make an image transparent to the 3d behind it would be appreciated too). using the drawimage image,-5000,-5000 didn't work...as i wanted it to, in fact, it didn't even affect it.


Yahfree(Posted 2007) [#10]
Use a veriable to control if its being drawed or not?

like so:

draw=0

If keyhit(1) then
if draw=0
draw=1
else
draw=0
end if
end if

if draw=1 then
drawmenu()
end if



chwaga(Posted 2007) [#11]
works perfectly, thanks a bunch!