Arma Reforger Script API
|
Radial menu class specifing behavior and interaction for circular interface Can distrubute and select entries in set angle in distace Can be interacted with mouse or gamepad thumbsticks. More...
Public Member Functions | |
ScriptInvoker | GetOnDisplaySizeChange () |
ScriptInvoker | GetOnSetActionHint () |
override void | Update (float timeSlice) |
override void | SetMenuDisplay (SCR_SelectionMenuDisplay display=null) |
Radial menu set menu display will auto find HUD manager radial menu display if display is null. | |
override void | SetController (IEntity owner, SCR_SelectionMenuControllerInputs controls) |
Set controller entity and controls. | |
void | ChangeDisplaySize (bool useLarge=true, float customSize=-1) |
Call to influence size of radial menu display layout useLarge = true will use predefined size for large menu radius (SIZE_LARGE) Custom size will ignore useLarge. | |
void | SetActionHint (string action) |
Set current hint to display and send invoke it so radial menu display will show the hint. | |
void | HideActionHint () |
void | SetMenuCenterPos (vector centerPos) |
float | GetEntriesAngleDistance () |
float | GetPointingAngle () |
bool | IsPointingToCenter () |
void | SCR_RadialMenu () |
void | ~SCR_RadialMenu () |
void | SetPreventSelectionContext (bool enable) |
bool | GetPreventSelectionContext () |
bool | GetUseQuickActions () |
Public Member Functions inherited from SCR_SelectionMenu | |
ScriptInvoker | GetOnBeforeOpen () |
ScriptInvoker | GetOnOpen () |
ScriptInvoker | GetOnClose () |
ScriptInvoker | GetOnSelect () |
ScriptInvoker | GetOnOpenFailed () |
ScriptInvoker | GetOnPerform () |
ScriptInvoker | GetOnOpenCategory () |
ScriptInvoker | GetOnAddEntry () |
ScriptInvoker | GetOnRemoveEntry () |
ScriptInvoker | GetOnUpdateEntries () |
ScriptInvoker | GetOnControllerChanged () |
void | Open () |
void | Close () |
Callback when close is requested. | |
void | Update (float timeSlice) |
void | Init () |
void | PerformEntry (notnull SCR_SelectionMenuEntry entry) |
void | AddEntry (SCR_SelectionMenuEntry entry=null) |
Add new entry into menu root Entries update is notified only if menu is opened in root level. | |
void | AddCategoryEntry (SCR_SelectionMenuCategoryEntry category=null) |
Add empty or custom category entry. | |
void | AddEntries (notnull array< ref SCR_SelectionMenuEntry > entries, bool replace=false) |
Add multiple entries in array Replace true will clear menu and use given entries. | |
void | UpdateEntries () |
Invoke data update for all entries. | |
void | UpdateSelectedEntries (notnull array< ref SCR_SelectionMenuEntry > entries) |
Invoke data update for selected entries. | |
void | RemoveEntry (notnull SCR_SelectionMenuEntry entry) |
Remove selected entry and invoke data update. | |
void | ClearEntries () |
Clear all entries and invoke data update. | |
SCR_SelectionMenuCategoryEntry | CurrentCategory () |
Return current opened category entry Null means menu is in root. | |
void | SetMenuDisplay (SCR_SelectionMenuDisplay display=null) |
Find and setup display used for menu. | |
bool | IsOpened () |
void | SetController (IEntity owner, SCR_SelectionMenuControllerInputs controls) |
Set controller entity and controls. | |
SCR_SelectionMenuControllerInputs | GetControllerInputs () |
SCR_SelectionMenuEntry | GetSelectionEntry () |
int | GetSelectedEntryId () |
bool | GetEntryPerformed () |
array< ref SCR_SelectionMenuEntry > | GetEntries () |
int | GetEntryCount () |
bool | HasDisplay () |
Static Public Member Functions | |
static SCR_RadialMenu | GlobalRadialMenu () |
Find and get reference to global redial menu. | |
static SCR_RadialMenu | GetOpenedRadialMenu () |
Find and get reference to global redial menu. | |
Public Attributes | |
SCR_ERadialMenuType | m_eRadialType = SCR_ERadialMenuType.DEFAULT |
Static Public Attributes | |
const float | SIZE_LARGE = 580 |
Protected Member Functions | |
void | InvokeOnDisplaySizeChange (float size) |
void | InvokeOnSetActionHint (string action) |
void | OnMenuOpened (ChimeraMenuBase menu) |
override void | OnOpen () |
Empty method called on open ready for override. | |
override void | OnClose () |
Empty method called on close ready for override. | |
void | ReleaseContext () |
override void | OnUpdate (float timeSlice) |
Empty method called on update ready for override. | |
override void | SelectEntry () |
For gamepad - based on direction of stick. | |
override void | InvokeOnUpdateEntries (array< ref SCR_SelectionMenuEntry > entries) |
override void | OnPerformInput () |
On select input handle entry selection and moving into layers. | |
override void | AddActionListeners () |
Add 1-9 quick actions. | |
override void | RemoveActionListeners () |
Remove 1-9 quick actions. | |
void | OnQuickAction1 () |
void | OnQuickAction2 () |
void | OnQuickAction3 () |
void | OnQuickAction4 () |
void | OnQuickAction5 () |
void | OnQuickAction6 () |
void | OnQuickAction7 () |
void | OnQuickAction8 () |
void | OnQuickAction9 () |
void | QuickActionUse (int id) |
int | GetSelectedElementIndex (float angle, int elementCount) |
float | AdjustDistanceWithResolution (float distance) |
Multiply selection distance from center with ratio of reference resolution to current resoluution Should fix distance being calculated same for various resolutions. | |
SCR_SelectionMenuEntry | HandleSelection (out int id) |
void | DeselectEntry () |
void | ReactQuickInput () |
Check quick 1-10 actions and perform entry on action trigger. | |
Protected Member Functions inherited from SCR_SelectionMenu | |
void | InvokeOnBeforeOpen () |
void | InvokeOnOpen () |
void | InvokeOnClose () |
void | InvokeOnSelect (SCR_SelectionMenuEntry entry, int id) |
void | InvokeOnPerform (SCR_SelectionMenuEntry entry) |
void | InvokeOnOpenCategory (SCR_SelectionMenuCategoryEntry entry, int level) |
void | InvokeOnAddEntry (SCR_SelectionMenuEntry entry) |
void | InvokeOnRemoveEntry (SCR_SelectionMenuEntry entry) |
void | InvokeOnUpdateEntries (array< ref SCR_SelectionMenuEntry > entries) |
void | InvokeOnControllerChanged (SCR_SelectionMenuControllerInputs inputs) |
void | AllowClosing () |
Allow closing after some time in order to have alternative toggle action with double press. | |
void | OnOpen () |
Empty method called on open ready for override. | |
void | OnClose () |
Empty method called on close ready for override. | |
void | OnUpdate (float timeSlice) |
Empty method called on update ready for override. | |
void | PlaySound (string sound) |
void | SelectEntry () |
Generic method for custom entry selection based on used interface. | |
void | OpenCategoryEntry (notnull SCR_SelectionMenuCategoryEntry category) |
Specific peform action for category to change menu content. | |
void | LeaveCategory () |
void | OpenInRoot () |
Clear open categories and use entries from root. | |
void | AddActionListeners () |
Add all action listeners for basic menu control. | |
void | RemoveActionListeners () |
Remove all action listeners for basic menu control. | |
void | OnOpenInputRelease (float value, EActionTrigger reason) |
On open input handle menu closing. | |
void | OnPerformInput () |
On select input handle entry selection and moving into layers. | |
void | OnBackInput () |
void | OnAlternativeToggleInput () |
void | DebugPrint (string method, string msg) |
Static Protected Attributes | |
static SCR_RadialMenu | m_GlobalRadialMenu |
static SCR_RadialMenu | m_OpenedRadialMenu |
const float | SIZE_SMALL = 400 |
Static Protected Attributes inherited from SCR_SelectionMenu | |
const int | OPEN_DELAY = 200 |
Radial menu class specifing behavior and interaction for circular interface Can distrubute and select entries in set angle in distace Can be interacted with mouse or gamepad thumbsticks.
void SCR_RadialMenu.SCR_RadialMenu | ( | ) |
void SCR_RadialMenu.~SCR_RadialMenu | ( | ) |
|
protected |
Add 1-9 quick actions.
Implements SCR_SelectionMenu.
|
protected |
Multiply selection distance from center with ratio of reference resolution to current resoluution Should fix distance being calculated same for various resolutions.
void SCR_RadialMenu.ChangeDisplaySize | ( | bool | useLarge = true , |
float | customSize = -1 |
||
) |
Call to influence size of radial menu display layout useLarge = true will use predefined size for large menu radius (SIZE_LARGE) Custom size will ignore useLarge.
|
protected |
float SCR_RadialMenu.GetEntriesAngleDistance | ( | ) |
ScriptInvoker SCR_RadialMenu.GetOnDisplaySizeChange | ( | ) |
ScriptInvoker SCR_RadialMenu.GetOnSetActionHint | ( | ) |
|
static |
Find and get reference to global redial menu.
float SCR_RadialMenu.GetPointingAngle | ( | ) |
bool SCR_RadialMenu.GetPreventSelectionContext | ( | ) |
|
protected |
bool SCR_RadialMenu.GetUseQuickActions | ( | ) |
|
static |
Find and get reference to global redial menu.
|
protected |
void SCR_RadialMenu.HideActionHint | ( | ) |
|
protected |
|
protected |
|
protected |
Implements SCR_SelectionMenu.
bool SCR_RadialMenu.IsPointingToCenter | ( | ) |
|
protected |
Empty method called on close ready for override.
Implements SCR_SelectionMenu.
|
protected |
|
protected |
Empty method called on open ready for override.
Implements SCR_SelectionMenu.
|
protected |
On select input handle entry selection and moving into layers.
Implements SCR_SelectionMenu.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Empty method called on update ready for override.
Implements SCR_SelectionMenu.
|
protected |
|
protected |
Check quick 1-10 actions and perform entry on action trigger.
|
protected |
|
protected |
Remove 1-9 quick actions.
Implements SCR_SelectionMenu.
|
protected |
For gamepad - based on direction of stick.
Implements SCR_SelectionMenu.
void SCR_RadialMenu.SetActionHint | ( | string | action | ) |
Set current hint to display and send invoke it so radial menu display will show the hint.
override void SCR_RadialMenu.SetController | ( | IEntity | owner, |
SCR_SelectionMenuControllerInputs | controls | ||
) |
Set controller entity and controls.
Implements SCR_SelectionMenu.
void SCR_RadialMenu.SetMenuCenterPos | ( | vector | centerPos | ) |
override void SCR_RadialMenu.SetMenuDisplay | ( | SCR_SelectionMenuDisplay | display = null | ) |
Radial menu set menu display will auto find HUD manager radial menu display if display is null.
Implements SCR_SelectionMenu.
void SCR_RadialMenu.SetPreventSelectionContext | ( | bool | enable | ) |
override void SCR_RadialMenu.Update | ( | float | timeSlice | ) |
Implements SCR_SelectionMenu.
|
protected |
|
protected |
|
protected |
SCR_ERadialMenuType SCR_RadialMenu.m_eRadialType = SCR_ERadialMenuType.DEFAULT |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
staticprotected |