Jump to content

[help] guiGetVisible


Recommended Posts

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...