GuiWindowIsMovable: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added OOP Variable + Counterpart Information)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{New feature/item|3.0156|1.5.6||This function checks if a GUI window is movable.}}
{{New feature/item|3.0156|1.5.5|13823|This function checks if a GUI window is movable.}}


==Syntax==  
==Syntax==  
Line 7: Line 7:
bool guiWindowIsMovable ( gui-window guiWindow )
bool guiWindowIsMovable ( gui-window guiWindow )
</syntaxhighlight>  
</syntaxhighlight>  
 
{{OOP|||movable|guiWindowSetMovable}}
===Required Arguments===  
===Required Arguments===  
*'''guiWindow:''' the window to check the movable flag of
*'''guiWindow:''' the window to check the movable flag of

Latest revision as of 18:21, 6 August 2019

This function checks if a GUI window is movable.

Syntax

bool guiWindowIsMovable ( gui-window guiWindow )

OOP Syntax Help! I don't understand this!

Variable: .movable
Counterpart: guiWindowSetMovable


Required Arguments

  • guiWindow: the window to check the movable flag of

Returns

Returns true if the window is movable, false if not, nil if an invalid window was provided.

Example

addEventHandler( "onClientResourceStart", resourceRoot,
    function( )
        local window = guiCreateWindow( 0.5, 0.5, 0.22, 0.22, "isMovable window", true )
        guiWindowSetMovable( window, false ) -- make it unmovable
        addCommandHandler( "isMovable",
            function( )
                local movable = guiWindowIsMovable( window ) -- check the window movable flag
                outputChatBox( "Window is " .. ( movable and "movable" or "unmovable" ) ) -- show info about the window
            end
        )
    end
)

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI