crismar Posted May 2, 2014 Share 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 ? Link to comment
DakiLLa Posted May 2, 2014 Share Posted May 2, 2014 Show us how you attach an event handler to your button. Link to comment
crismar Posted May 2, 2014 Author Share 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 Link to comment
DakiLLa Posted May 2, 2014 Share 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.. Link to comment
crismar Posted May 2, 2014 Author Share 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 Link to comment
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