ctrlEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.5|Game version=
|1.5


|arg= local |Multiplayer Arguments=
|arg= local


|gr1= GUI Control |GROUP1=
|gr1= GUI Control


| Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused.
| Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused.


Read [[Arma: GUI Configuration]] for more information about user dialogs and controls. |DESCRIPTION=
Read [[Arma: GUI Configuration]] for more information about user dialogs and controls.


| [[Boolean]] <nowiki>=</nowiki>  '''ctrlEnabled''' idc |SYNTAX=
| [[Boolean]] <nowiki>=</nowiki>  '''ctrlEnabled''' idc


|p1= idc: [[Number]] - control ID |PARAMETER1=
|p1= idc: [[Number]] - control ID


| [[Boolean]] -   
| [[Boolean]] -   
true if the control is enabled, false if not. |RETURNVALUE=
true if the control is enabled, false if not.


|s2= [[Boolean]] <nowiki>=</nowiki> '''ctrlEnabled''' controlName |Alternative Syntax=
|s2= [[Boolean]] <nowiki>=</nowiki> '''ctrlEnabled''' controlName


|p21=  controlName: [[Control]] |PARAMETER21=
|p21=  controlName: [[Control]] |PARAMETER21=
Line 28: Line 28:
{
{
   ctrlEnable [100, true]
   ctrlEnable [100, true]
};</pre> |EXAMPLE1=
};</pre>


|x2= <pre>_enabled = ctrlEnabled _control</pre> |EXAMPLE2=
|x2= <pre>_enabled = ctrlEnabled _control</pre>


| [[ctrlEnable]] |SEEALSO=
| [[ctrlEnable]]


}}
}}

Revision as of 00:27, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused. Read Arma: GUI Configuration for more information about user dialogs and controls.
Groups:
GUI Control

Syntax

Syntax:
Boolean = ctrlEnabled idc
Parameters:
idc: Number - control ID
Return Value:
Boolean - true if the control is enabled, false if not.

Alternative Syntax

Syntax:
Boolean = ctrlEnabled controlName
Parameters:
controlName: Control
Return Value:
Boolean

Examples

Example 1:
if (!(ctrlEnabled 100)) then
{
  ctrlEnable [100, true]
};
Example 2:
_enabled = ctrlEnabled _control

Additional Information

See also:
ctrlEnable

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Bottom Section