ctrlClassName: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) 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 | {{Command | ||
| arma3 | | arma3 | ||
|1.26 | |1.26 | ||
|gr1= GUI Control | |gr1= GUI Control | ||
| Returns the class name of a [[Control]] as it is defined in config. If you need config class of a game created [[Display]], it is stored on display itself: | | Returns the class name of a [[Control]] as it is defined in config. If you need config class of a game created [[Display]], it is stored on display itself: | ||
<code>_className <nowiki>=</nowiki> [[findDisplay]] 12 [[getVariable]] ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"</code> | <code>_className <nowiki>=</nowiki> [[findDisplay]] 12 [[getVariable]] ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"</code> | ||
| '''ctrlClassName''' control | | '''ctrlClassName''' control | ||
|p1= control : [[Control]] | |p1= control : [[Control]] | ||
| [[String]] - class name | | [[String]] - class name | ||
Line 21: | Line 21: | ||
_return [[pushBack]] [[format]] ["IDC: %1, className: %2", [[ctrlIDC]] _x, [[ctrlClassName]] _x]; | _return [[pushBack]] [[format]] ["IDC: %1, className: %2", [[ctrlIDC]] _x, [[ctrlClassName]] _x]; | ||
} [[forEach]] ([[allControls]] ([[findDisplay]] 46)); | } [[forEach]] ([[allControls]] ([[findDisplay]] 46)); | ||
[[copyToClipboard]] (_return [[joinString]] [[endl]]);</code> | [[copyToClipboard]] (_return [[joinString]] [[endl]]);</code> | ||
| [[ctrlIDC]], [[ctrlIDD]], [[ctrlType]], [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlPosition]], [[ctrlSetPosition]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]] | | [[ctrlIDC]], [[ctrlIDD]], [[ctrlType]], [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlPosition]], [[ctrlSetPosition]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:30, 18 January 2021
Description
- Description:
- Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:
_className = findDisplay 12 getVariable ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"
- Groups:
- GUI Control
Syntax
Examples
- Example 1:
- List class names of all controls present on display 46:
_return = [] ; { _return pushBack format ["IDC: %1, className: %2", ctrlIDC _x, ctrlClassName _x]; } forEach (allControls (findDisplay 46)); copyToClipboard (_return joinString endl);
Additional Information
- See also:
- ctrlIDCctrlIDDctrlTypectrlCreatectrlDeletectrlModelctrlSetModelctrlPositionctrlSetPositionctrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp
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