Sprite Candy

Blitz3D Forums/Blitz3D Beginners Area/Sprite Candy

YellBellzDotCom(Posted 2006) [#1]
My game uses a 3d terrain and selectable objects, I coded my GUI so that when I press ESC it brings up the options window. If I press ESC again it closes the options window. This is accomplished using the following code...





The problem is that I cant seem to click the close button or a help button on that option window when its open. I run a CheckWindow function every loop before the HUD_Update and GUI_Update functions to see if the user clicked the close window X button. It works sometimes, but mostly not at all. Im wondering if things that are happening in the back ground are causing the window to lose focus? I tried to keep that from happening by Checking if the Options window was open in the CheckWindow Function, if the window was open I use

If EscKey = 1 Then GUI_WindowToFront Win(1)

which I thought brought the window to the front of everything and basically gave it the focus.
I have been trying things for a few hours now and I cannot seem to get this going.

Any help would be greatly appreciated!


Dreamora(Posted 2006) [#2]
Do you have any KeyHit MouseHit in your mainloop of the game instead of the Down functions? this could perhaps cause some problems. (don't know out of my head if SC uses hit or down to check)

As well make sure you are the Update method at the right place because otherwise it won't react to input. (thats described in the help file)


YellBellzDotCom(Posted 2006) [#3]
Ahhh, sorry for the late response. I sent an email to Mike and theres going to be an update to SC that contains some new commands for handeling situations like mine. I created a temp work around for now until I get back to the core of this issue, I'll implement the new commands.

I appreciate the response.

I do love Sprite Candy! Man, I created in 1 day what took me over a week to draw and code. And its skinnable! I love it!