Event Handlers/inGameUISetEventHandler – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(dedicated page)
 
m (Some wiki formatting)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-------------------------------------------------------------------------------------->
{{TOC|side}}
= In Game UI Event Handlers =
In Game UI Event Handlers trigger when user scrolls or activates in game action menu. Additionally a [[Boolean]] or [[Nothing]] is expected to be returned by the assigned code. If the assigned EH code returns [[true]], default engine action is overridden. For all other available EHs see the [[Arma_3:_Event_Handlers|main page]].
 
{{Feature|important|Arguments were introduced with {{GVI|arma3|1.50}}.}}


== Description ==
In Game UI Event Handlers trigger when user scrolls or activates in game action menu. Additionally a [[Boolean]] or [[Nothing]] is expected to be returned by the assigned code. If the assigned EH code returns [[true]], default engine action is overridden. For all other available EHs see the [[Arma_3:_Event_Handlers|main page]].


== Related Commands ==
== Related Commands ==
* [[inGameUISetEventHandler]]
* [[inGameUISetEventHandler]]


== Examples ==
== Examples ==
<code>[[inGameUISetEventHandler]] ["Action", "hint 'Lights, Camera, Action!'"]; // add EH
 
[[inGameUISetEventHandler]] ["Action", ""]; // remove EH</code>
<sqf>
inGameUISetEventHandler ["Action", "hint 'Lights, Camera, Action!'"]; // add EH
inGameUISetEventHandler ["Action", ""]; // remove EH
</sqf>
 


== Events ==
== Events ==
{| class="wikitable sortable"
 
{| class="wikitable"
! Class
! Class
! class="unsortable" | Description
! Description
! class="unsortable" | Arguments
! Arguments - since {{GVI|arma3|1.50}}
! Since


|-
|-
| <!-- Title -->
|
==== PrevAction ====
==== PrevAction ====
| <!-- Description -->
| Triggers on mouse wheel scroll up.
Triggers on mouse wheel scroll up.
| rowspan="3" |
| <!-- Arguments -->
<sqf>params ["_target", "_caller", "_index", "_name", "_text", "_priority", "_showWindow", "_hideOnUse", "_shortcut", "_visibility", "_eventName"];</sqf>
Since {{GVI|arma3|1.50}}
* [[Object]] - target object to which action is attached
* [[Object]] - target object to which action is attached
* [[Object]] - caller object, basically [[player]]
* [[Object]] - caller object, basically [[player]]
Line 37: Line 42:
* [[Boolean]] - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
* [[Boolean]] - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
* [[String]] - EH event name
* [[String]] - EH event name
| <!-- Since -->
{{GVI|arma|1.0}}


|-
|-
| <!-- Title -->
|
==== Action ====
==== Action ====
| <!-- Description -->
| Triggers on action key press.
Triggers on action key press.
| <!-- Arguments -->
Since {{GVI|arma3|1.50}}
* [[Object]] - target object to which action is attached
* [[Object]] - caller object, basically [[player]]
* [[Number]] - index of the action in action menu (0 - top most)
* [[String]] - engine based action name ("User" for user added actions)
* [[String]] - [[localize]]d action plain text as seen by the caller
* [[Number]] - action ''priority'' value
* [[Boolean]] - action ''showWindow'' value
* [[Boolean]] - action ''hideOnUse'' value
* [[String]] - action ''shortcut'' name or ""
* [[Boolean]] - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
* [[String]] - EH event name
| <!-- Since -->
{{GVI|arma|1.0}}


|-
|-
| <!-- Title -->
|
==== NextAction ====
==== NextAction ====
| <!-- Description -->
| Triggers on mouse wheel scroll down.
Triggers on mouse wheel scroll down.  
| <!-- Arguments -->
Since {{GVI|arma3|1.50}}
* [[Object]] - target object to which action is attached
* [[Object]] - caller object, basically [[player]]
* [[Number]] - index of the action in action menu (0 - top most)
* [[String]] - engine based action name ("User" for user added actions)
* [[String]] - [[localize]]d action plain text as seen by the caller
* [[Number]] - action ''priority'' value
* [[Boolean]] - action ''showWindow'' value
* [[Boolean]] - action ''hideOnUse'' value
* [[String]] - action ''shortcut'' name or ""
* [[Boolean]] - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
* [[String]] - EH event name
| <!-- Since -->
{{GVI|arma|1.0}}


|}
|}
[[Category:Introduced with Armed Assault version 1.00]]

Latest revision as of 23:47, 21 July 2022

In Game UI Event Handlers trigger when user scrolls or activates in game action menu. Additionally a Boolean or Nothing is expected to be returned by the assigned code. If the assigned EH code returns true, default engine action is overridden. For all other available EHs see the main page.

Arguments were introduced with Arma 3 logo black.png1.50.


Related Commands


Examples

inGameUISetEventHandler ["Action", "hint 'Lights, Camera, Action!'"]; // add EH inGameUISetEventHandler ["Action", ""]; // remove EH


Events

Class Description Arguments - since Arma 3 logo black.png1.50

PrevAction

Triggers on mouse wheel scroll up.

params ["_target", "_caller", "_index", "_name", "_text", "_priority", "_showWindow", "_hideOnUse", "_shortcut", "_visibility", "_eventName"];

  • Object - target object to which action is attached
  • Object - caller object, basically player
  • Number - index of the action in action menu (0 - top most)
  • String - engine based action name ("User" for user added actions)
  • String - localized action plain text as seen by the caller
  • Number - action priority value
  • Boolean - action showWindow value
  • Boolean - action hideOnUse value
  • String - action shortcut name or ""
  • Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
  • String - EH event name

Action

Triggers on action key press.

NextAction

Triggers on mouse wheel scroll down.