IsConsoleActive: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 7: Line 7:
bool isConsoleActive ()
bool isConsoleActive ()
</syntaxhighlight>  
</syntaxhighlight>  
{{OOP||[[GUI widgets|GuiElement]]:isConsoleActive|consoleActive|}}


===Returns===
===Returns===
Line 15: Line 16:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function consoleactiveCommand(arg)
function consoleactiveCommand(arg)
     local active = "not active."
     local active = (isConsoleActive() and "active.") or "not active."
    if (isConsoleActive()) then active = "active." end
     outputChatBox("Your console is " .. active)
     outputChatBox("Your console is " .. active)
end
end
Line 24: Line 24:
==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
[[Category:Needs Example]]
{{GUI_events}}

Latest revision as of 17:21, 21 November 2018

This function returns whether the ingame console window is visible or not.

Syntax

bool isConsoleActive ()

OOP Syntax Help! I don't understand this!

Method: GuiElement:isConsoleActive(...)
Variable: .consoleActive


Returns

Returns true if the console is visible, false if not.

Example

This example does...

function consoleactiveCommand(arg)
    local active = (isConsoleActive() and "active.") or "not active."
    outputChatBox("Your console is " .. active)
end
addCommandHandler("consoleactive", consoleactiveCommand)

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