ice_brasil Posted June 8, 2013 Share Posted June 8, 2013 (edited) worked Edited June 8, 2013 by Guest Link to comment
Dealman Posted June 8, 2013 Share Posted June 8, 2013 Because the variable is set as GUIEditor.window[1] not window. function showGUI() if(guiGetVisible(GUIEditor.window[1]) == true) showCursor(false) guiSetVisible(GUIEditor.window[1], false) else showCursor(true) guiSetVisible(GUIEditor.window[1],true) end end bindKey("F2", "down", showGUI) Personally I'd suggest that you rename each and every variable for the GUI Elements. You can also get rid of this unless you want it to be stored in tables; GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } Link to comment
ice_brasil Posted June 8, 2013 Author Share Posted June 8, 2013 is giving error in show cursor or GuiGetVisible Link to comment
xXMADEXx Posted June 8, 2013 Share Posted June 8, 2013 is giving error in show cursor or GuiGetVisible Try this: bindKey ( "F2", "down", function ( ) local tostate = not guiGetVisible ( GUIEditor.window[1] ) guiSetVisible ( GUIEditor.window[1], tostate ) showCursor ( tostate ) end ) And, what is the error? 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