guiGetVisible | Multi Theft Auto: Wiki Skip to content

guiGetVisible

Client-side
Server-side
Shared

Pair: guiSetVisible

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function determines if a GUI element is visible.

Syntax

guiGetVisible ( )

Code Examples

client

This example toggles the visibility of myWindow.

function guiToggleVisible ( )
if ( guiGetVisible ( myWindow ) == true ) then -- check if the gui element is visible
guiSetVisible ( myWindow, false ) -- if it is, we hide it
else
guiSetVisible ( myWindow, true ) -- if not, we make it visible
end
end
myWindow = guiCreateWindow ( 0, 0, .5, .5, "my window", true ) -- Create the gui window
bindKey ( "space", "down", guiToggleVisible ) --bind the player's spacebar to the function guiToggleVisible

See Also

GUI Functions