crismar Posted May 2, 2014 Posted May 2, 2014 When I click on a button it works fine, but when I click inside the GUI Window the action from the nearest button is triggered (or well, something like that). Can you explain my why is that ?
DakiLLa Posted May 2, 2014 Posted May 2, 2014 Show us how you attach an event handler to your button.
crismar Posted May 2, 2014 Author Posted May 2, 2014 (edited) addEventHandler("onClientGUIClick", modifyMail, changeMailLocal) addEventHandler("onClientGUIClick", modifyPass, changePasswordLocal) addEventHandler("onClientGUIClick", closeButton, hideDetailsPanel) Could it be because I create like 5 GUI Windows in the same function? Although I make them visibile/invisible with setGuiVisible, therefore I don't know, maybe invisible GUI buttons still work ? >_> Edited May 2, 2014 by Guest
DakiLLa Posted May 2, 2014 Posted May 2, 2014 Put 'false' argument on each addEventHandler function if you attach an event directly to a element, like this: addEventHandler("onClientGUIClick", modifyMail, changeMailLocal, false) -- and so on..
crismar Posted May 2, 2014 Author Posted May 2, 2014 Put 'false' argument on each addEventHandler function if you attach an event directly to a element, like this: addEventHandler("onClientGUIClick", modifyMail, changeMailLocal, false) -- and so on.. Thank you a lot, works like a charm now
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