Is there a command to let the program know when the user hits the 'Close window' button?
Blitz3D Forums/Blitz3D Beginners Area/Is there a command to let the program know when the user hits the 'Close window' button?
| ||
The big 'X' in the corner I mean. I'll eventually be using full-screen, but while debugging I'm using Windowed mode and it keeps confusing me when I hit the exit button instead of hitting escape to get out of my program. My program needs to know when the client has logged out of my networked game. Is there a command to recognise this? |
| ||
Is there a command to let the program know when the user hits the 'Close window' button? IF your using Blitz3d this line at the beginning of your program might help: AppTitle "My Game","Are you sure your want to Quit?"There is no way (as far as I know) to recognise Window Gadgets using the standard Blitz3d command set (someone else might be able to point you the direction of an extension library though.) My program needs to know when the client has logged out of my networked game. Is there a command to recognise this? Couldn't you use NetMsgType() and NetMsgFrom() to detirmine this? |
| ||
"My program needs to know when the client has logged out of my networked game." You should never assume that you'll know when the client has logged out, because even if your game is designed to fix things up, you still have to watch out for lost internet connections or crashing PC's. So you should have the server clean stuff up and remove the client if it hasn't heard from them in a minute or so. |
| ||
Well I'm using Blitzplay Pro, just got it yesterday. I think it'll handle it very easily, I just wanted to fix this minor prob. It's ok though, I'll just remember to hit escape for now :) |