displaySetEventHandler: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|") |
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
||
Line 50: | Line 50: | ||
</pre> | </pre> | ||
| [[ListOfKeyCodes]], [[displayAddEventHandler]], [[displayRemoveEventHandler]], [[displayRemoveAllEventHandlers]], [[ctrlSetEventHandler]], [[User_Interface_Event_Handlers|UI Event Handlers]], [[DIK_KeyCodes|DIK KeyCodes]], [[keyName]] | |seealso= [[ListOfKeyCodes]], [[displayAddEventHandler]], [[displayRemoveEventHandler]], [[displayRemoveAllEventHandlers]], [[ctrlSetEventHandler]], [[User_Interface_Event_Handlers|UI Event Handlers]], [[DIK_KeyCodes|DIK KeyCodes]], [[keyName]] | ||
}} | }} | ||
Revision as of 23:42, 16 February 2021
Description
- Description:
- Description needed
- Groups:
- GUI Control - Event HandlersEvent Handlers
Syntax
- Syntax:
- Syntax needed
- Parameters:
- display: Display
- [handlerName, function]: Array
- handlerName: String
- function: String. {Code}
- Return Value:
- Return value needed
Examples
- Example 1:
_control displaySetEventHandler ["KeyDown", ""]
- Example 2:
- init.sqf
keyspressed.sqfkeyspressed = compile preprocessFile "keyspressed.sqf"; _display = findDisplay 46; _display displaySetEventHandler ["KeyDown","_this call keyspressed"];
private['_handled']; _handled = false; switch (_this select 1) do { //F key case 33: { // code here _handled = true; }; }; _handled;
Additional Information
- See also:
- ListOfKeyCodesdisplayAddEventHandlerdisplayRemoveEventHandlerdisplayRemoveAllEventHandlersctrlSetEventHandlerUI Event HandlersDIK KeyCodeskeyName
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
- Posted on Nov 25, 2009
- kju
- Always use displayAddEventHandler instead, as DSetEH overwrites other (peoples') DEH.