|
Post by u9 on Jun 21, 2006 4:38:38 GMT -5
The way one handles the callback function in a GUI should be changed. Instead of having to call your procedure the name of the button + _click you should have an input parameter specifying the name of the procedure. As it is now, I wonder what will happen if I e.g. put the controls in an array. What would the procedure be called? I would like a function telling whether the Brutus window has focus or not. That way I can pause the game and it won't react to user input when it in reality shouldn't as it doesn't have the focus.
|
|
|
Post by Guilect on Jun 21, 2006 7:42:12 GMT -5
Unless I miss understand, I think the GUI callback is the way that you are suggesting.
hbtnTest = GUI.CreateControl("button", "nameofmyprocedure", 0,0,50,40, "Button Text")
Is it not? You can name the procedure. You can not change the window event. In this case Click.
I can look into the got focus idea.
|
|
|
Post by u9 on Jun 21, 2006 8:21:30 GMT -5
Yes you're right. I'm sorry I didn't look closely enough. I just browsed through the documentation
|
|