ctrlAddEventHandler: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
|1.00|Game version= | |1.00|Game version= | ||
|gr1= GUI Control |=GROUP1 | |||
|gr2= Event Handlers |=GROUP2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 53: | Line 56: | ||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 09:48, 16 September 2020
Description
- Description:
- Add an event handler (User Interface Event Handlers) to the given control. Returns id of the handler or -1 when failed.
- Groups:
- GUI ControlEvent Handlers
Syntax
- Syntax:
- control ctrlAddEventHandler [handler,function]
- Parameters:
- control: Control
- [handler,function]: Array
- handler: String - handler name
- function: String or Code - script
- Return Value:
- Number
Examples
- Example 1:
_map ctrlAddEventHandler ["draw","_this call BIS_fnc_strategicMapOpen_draw"];
- Example 2:
_map ctrlAddEventHandler ["draw",{hintSilent str _this}];
Additional Information
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
Notes
- Posted on October 30, 2013 - 11:14
- Killzone_Kid
- As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]