Lloyd Logan Posted January 4, 2013 Share Posted January 4, 2013 Hi, I created a login panel with dxDrawImage in the GUI panel, when i click login, all elements are destroyed, which is what i want with destroyElement, but the dxDrawImage is there? How, when i press login (buLogin) can i get rid of dxDrawImage? Thanks Lloyd. Link to comment
Baseplate Posted January 4, 2013 Share Posted January 4, 2013 use guiSetVisible instead of destroyElement. Link to comment
Lloyd Logan Posted January 4, 2013 Author Share Posted January 4, 2013 use guiSetVisible instead of destroyElement. So guiSetVisible when button buLogin is clicked? Link to comment
Baseplate Posted January 4, 2013 Share Posted January 4, 2013 Yes addEventHandler("onClientGUIClick", buLogin, function () guiSetVisible(guiElementVariable, false) end end) Link to comment
Lloyd Logan Posted January 4, 2013 Author Share Posted January 4, 2013 Yes addEventHandler("onClientGUIClick", buLogin, function () guiSetVisible(guiElementVariable, false) end end) Thank you Link to comment
Baseplate Posted January 4, 2013 Share Posted January 4, 2013 No problem, did it work?? Link to comment
Lloyd Logan Posted January 4, 2013 Author Share Posted January 4, 2013 No problem, did it work?? It hasn't , is this because of maybe on client render? I am going out, but i will look into this, it should be so simple! Link to comment
Blaawee Posted January 4, 2013 Share Posted January 4, 2013 i think you should remove the event handler Link to comment
Lloyd Logan Posted January 4, 2013 Author Share Posted January 4, 2013 i think you should remove the event handler I am not too sure by what you mean here, If you are meaning to remove the removeEventHandler for the other Elements, i'll try, but if you mean removeEventHandler on the dxDrawImage, that is not what i am currently doing? Link to comment
uhm Posted January 4, 2013 Share Posted January 4, 2013 yes the latter is what he means for example, if you did this to add the eventhandler: function drawSomething() dxDrawImage3D(vx,vy,vz, 3, 3, face, tocolor(255,255,255,255),0, ax,ay,az ) end addEventHandler("onClientRender", root, drawSomething ); then you remove it by doing removeEventHandler("onClientRender", root, drawSomething ); Link to comment
Lloyd Logan Posted January 4, 2013 Author Share Posted January 4, 2013 yes the latter is what he means for example, if you did this to add the eventhandler: function drawSomething() dxDrawImage3D(vx,vy,vz, 3, 3, face, tocolor(255,255,255,255),0, ax,ay,az ) end addEventHandler("onClientRender", root, drawSomething ); then you remove it by doing removeEventHandler("onClientRender", root, drawSomething ); Yes, thanks alot! 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