Dealman Posted June 8, 2013 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 = {} }
ice_brasil Posted June 8, 2013 Author Posted June 8, 2013 is giving error in show cursor or GuiGetVisible
xXMADEXx Posted June 8, 2013 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?
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