Difference between revisions of "VN fnc module UI gestureMenu KeyHandler"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - " |a= " to " |author= ")
m (Some wiki formatting)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
{{Function
 
{{Function
  
 
|v= 1.00
 
|v= 1.00
  
|author=  
+
|author= Dscha
  
|e=
+
|a=
 +
 
 +
|e= local
  
 
|g1= gesture_menu
 
|g1= gesture_menu
  
|d= <pre>/* ----------------------------------------------------------------------------
+
|d= {{Biki|User_Interface_Event_Handlers#onKeyUp|"keyUp" UI Eventhandler}} function, runs code and blocks standard key. Default key: Y (on a QWERTY keyboard).
Function: vn_fnc_module_UI_gestureMenu_KeyHandler
+
Uses [[VN_fnc_kbm_getKey]].
  
Description:
+
|s= [display, key, shift, ctrl, alt] call [[VN_fnc_module_UI_gestureMenu_KeyHandler]]
- Eventhandler Function!
 
- Checks Z/Y (The one between "T" and "U"...) and executes (+blocks) it
 
  
Parameters:
+
|p1n= display
["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];
+
|p1t= {{Biki|Display}} or {{Biki|Control}}
0 - DISPLAY - NOT USED - The Display (or control) it was executed on
+
|p1d= EH display or control, unused
1 - INTEGER - Pressed Button
+
|p1v= {{Biki|nil}}
2 - BOOL - NOT USED - SHIFT pressed?
 
3 - BOOL - NOT USED - CTRL pressed?
 
4 - BOOL - NOT USED - ALT pressed?
 
  
Example:
+
|p2n= key
(findDisplay 46) displayAddEventHandler ["KeyUp", {call vn_fnc_module_UI_gestureMenu_KeyHandler;}];
+
|p2t= number
 
+
|p2d= pressed key
Returns:
+
|p2v=
- Nothing
 
  
Author:
+
|p3n= shift
Dscha
+
|p3t= boolean
---------------------------------------------------------------------------- */
+
|p3d= is shift key pressed
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
+
|p3v=
  
|s= [] call [[VN_fnc_module_UI_gestureMenu_KeyHandler]];
+
|p4n= ctrl
 +
|p4t= boolean
 +
|p4d= is ctrl key pressed
 +
|p4v=
  
|p1n=
+
|p5n= alt
|p1t=
+
|p5t= boolean
|p1d=
+
|p5d= is alt key pressed
|p1v=
+
|p5v=
 
 
|p2n=
 
|p2t=
 
|p2d=
 
|p2v=
 
  
 
|r1t=
 
|r1t=
 
|r1d=
 
|r1d=
  
|x1= <code>-</code>
+
|x1= <code>(findDisplay 46) displayAddEventHandler ["KeyUp", { call [[VN_fnc_module_UI_gestureMenu_KeyHandler]]; }];</code>
 
}}
 
}}

Latest revision as of 20:17, 26 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Dscha
Argument(s): n/a
Effect(s): local

Description

"keyUp" UI Eventhandler function, runs code and blocks standard key. Default key: Y (on a QWERTY keyboard). Uses VN_fnc_kbm_getKey.

Syntax

Syntax
[display, key, shift, ctrl, alt] call VN_fnc_module_UI_gestureMenu_KeyHandler
Parameters
display: Display or Control - (Optional, default nil) EH display or control, unused
key: Number - pressed key
shift: Boolean - is shift key pressed
ctrl: Boolean - is ctrl key pressed
alt: Boolean - is alt key pressed
Return value
Nothing

Examples

Example 1
(findDisplay 46) displayAddEventHandler ["KeyUp", { call VN_fnc_module_UI_gestureMenu_KeyHandler; }];