monday Posted November 8, 2014 Posted November 8, 2014 Is it a bug or that's how it should be? I don't know why but when I click on the window it automatically "clicks" all the buttons inside it. I added event handlers "onClientGUIClick" only for the buttons and left the main window without any functions "onclick"
Saml1er Posted November 8, 2014 Posted November 8, 2014 * sees your code magically and finds a solution for your problem* Sorry dude , can't help you like that. Please show us your code.
Enargy, Posted November 8, 2014 Posted November 8, 2014 when you add the event into the gui-function check if you have boolean ( boolean is a data type either whose value can be true or false) addEventHandler ( "onClientGUIClick", anybutton, theFunction, false) --- in this case is false.
Enargy, Posted November 8, 2014 Posted November 8, 2014 EXAMPLE: function theFunction() gui = guiCreateWindow(float x, float y, float z, "EXAMPLE", false) anybutton = guiCreateButton(float x, float y, float z, "CLOSE", false) showCursor(true) addEventHandler ( "onClientGUIClick", anybutton, close, false) end addEventHandler ( "onClientResourceStart", resourceRoot, theFunction) function close() guiSetVisible(gui , false) showCursor(guiGetVisible(gui)) end .
monday Posted November 8, 2014 Author Posted November 8, 2014 Thank you very much, I didn't put any true/false there before @Saml1er The code is very long and not clear because I used guieditor. I thought that describing the issue would be better than just posting the whole thing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now