Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_RadialMenu Interface Reference

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...

Inheritance diagram for SCR_RadialMenu:
[legend]

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_SelectionMenuEntryGetEntries ()
 
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)
 

Protected Attributes

vector m_vMenuCenterPos
 
float m_fEntriesAngleDistance
 
float m_fEntryAngleOffset
 
float m_fPointingAngle
 
bool m_bIsPointingToCenter
 
float m_fDynamicMouseSelectionTreshold
 
bool m_bActivateContext
 
bool m_bPreventSelectionContext
 
SCR_RadialMenuInputs m_RadialInputs
 
SCR_RadialMenuControllerInputs m_RadialControllerInputs
 
string m_sActionHint
 
ref ScriptInvoker< SCR_RadialMenu, float > m_OnDisplaySizeChange
 
ref ScriptInvoker< SCR_RadialMenu, string > m_OnSetActionHint
 
- Protected Attributes inherited from SCR_SelectionMenu
ref SCR_SelectionMenuInputs m_Inputs
 
string m_sOpenSound
 
string m_sCloseSound
 
string m_sSelectionSound
 
string m_sPerformSound
 
string m_sEnterCategorySound
 
string m_sLeaveCategorySound
 
SCR_SelectionMenuDisplay m_Display
 
ref array< ref SCR_SelectionMenuEntrym_aRootEntries = {}
 
ref array< ref SCR_SelectionMenuEntrym_aEntries = {}
 
SCR_SelectionMenuEntry m_SelectedEntry
 
int m_iSelectedEntryId
 
ref SCR_SelectionMenuControllerInputs m_ControllerInputs
 
bool m_bOpened
 
bool m_bEntryPerformed
 
bool m_bUsingAlternativeToggle
 
bool m_bClosingMenu
 
bool m_bOpenedForTime
 
ref array< SCR_SelectionMenuCategoryEntrym_aSelectedCategories = {}
 
ref ScriptInvoker< SCR_SelectionMenum_OnBeforeOpen
 
ref ScriptInvoker< SCR_SelectionMenum_OnOpen
 
ref ScriptInvoker< SCR_SelectionMenum_OnClose
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuEntry, int > m_OnSelect
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuEntrym_OnPerform
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuCategoryEntry, int > m_OnOpenCategory
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuEntrym_OnAddEntry
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuEntrym_OnRemoveEntry
 
ref ScriptInvoker< SCR_SelectionMenu, array< ref SCR_SelectionMenuEntry > > m_OnUpdateEntries
 
ref ScriptInvoker< SCR_SelectionMenu, SCR_SelectionMenuControllerInputsm_OnControllerChanged
 
ref ScriptInvoker< SCR_SelectionMenu, SelectionMenuFailReason > m_OnOpenFailed
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SCR_RadialMenu()

void SCR_RadialMenu.SCR_RadialMenu ( )

◆ ~SCR_RadialMenu()

void SCR_RadialMenu.~SCR_RadialMenu ( )

Member Function Documentation

◆ AddActionListeners()

override void SCR_RadialMenu.AddActionListeners ( )
protected

Add 1-9 quick actions.

Implements SCR_SelectionMenu.

◆ AdjustDistanceWithResolution()

float SCR_RadialMenu.AdjustDistanceWithResolution ( float  distance)
protected

Multiply selection distance from center with ratio of reference resolution to current resoluution Should fix distance being calculated same for various resolutions.

◆ ChangeDisplaySize()

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.

◆ DeselectEntry()

void SCR_RadialMenu.DeselectEntry ( )
protected

◆ GetEntriesAngleDistance()

float SCR_RadialMenu.GetEntriesAngleDistance ( )

◆ GetOnDisplaySizeChange()

ScriptInvoker SCR_RadialMenu.GetOnDisplaySizeChange ( )

◆ GetOnSetActionHint()

ScriptInvoker SCR_RadialMenu.GetOnSetActionHint ( )

◆ GetOpenedRadialMenu()

static SCR_RadialMenu SCR_RadialMenu.GetOpenedRadialMenu ( )
static

Find and get reference to global redial menu.

◆ GetPointingAngle()

float SCR_RadialMenu.GetPointingAngle ( )

◆ GetPreventSelectionContext()

bool SCR_RadialMenu.GetPreventSelectionContext ( )

◆ GetSelectedElementIndex()

int SCR_RadialMenu.GetSelectedElementIndex ( float  angle,
int  elementCount 
)
protected

◆ GetUseQuickActions()

bool SCR_RadialMenu.GetUseQuickActions ( )

◆ GlobalRadialMenu()

static SCR_RadialMenu SCR_RadialMenu.GlobalRadialMenu ( )
static

Find and get reference to global redial menu.

◆ HandleSelection()

SCR_SelectionMenuEntry SCR_RadialMenu.HandleSelection ( out int  id)
protected

◆ HideActionHint()

void SCR_RadialMenu.HideActionHint ( )

◆ InvokeOnDisplaySizeChange()

void SCR_RadialMenu.InvokeOnDisplaySizeChange ( float  size)
protected

◆ InvokeOnSetActionHint()

void SCR_RadialMenu.InvokeOnSetActionHint ( string  action)
protected

◆ InvokeOnUpdateEntries()

override void SCR_RadialMenu.InvokeOnUpdateEntries ( array< ref SCR_SelectionMenuEntry entries)
protected

Implements SCR_SelectionMenu.

◆ IsPointingToCenter()

bool SCR_RadialMenu.IsPointingToCenter ( )

◆ OnClose()

override void SCR_RadialMenu.OnClose ( )
protected

Empty method called on close ready for override.

Implements SCR_SelectionMenu.

◆ OnMenuOpened()

void SCR_RadialMenu.OnMenuOpened ( ChimeraMenuBase  menu)
protected

◆ OnOpen()

override void SCR_RadialMenu.OnOpen ( )
protected

Empty method called on open ready for override.

Implements SCR_SelectionMenu.

◆ OnPerformInput()

override void SCR_RadialMenu.OnPerformInput ( )
protected

On select input handle entry selection and moving into layers.

Implements SCR_SelectionMenu.

◆ OnQuickAction1()

void SCR_RadialMenu.OnQuickAction1 ( )
protected

◆ OnQuickAction2()

void SCR_RadialMenu.OnQuickAction2 ( )
protected

◆ OnQuickAction3()

void SCR_RadialMenu.OnQuickAction3 ( )
protected

◆ OnQuickAction4()

void SCR_RadialMenu.OnQuickAction4 ( )
protected

◆ OnQuickAction5()

void SCR_RadialMenu.OnQuickAction5 ( )
protected

◆ OnQuickAction6()

void SCR_RadialMenu.OnQuickAction6 ( )
protected

◆ OnQuickAction7()

void SCR_RadialMenu.OnQuickAction7 ( )
protected

◆ OnQuickAction8()

void SCR_RadialMenu.OnQuickAction8 ( )
protected

◆ OnQuickAction9()

void SCR_RadialMenu.OnQuickAction9 ( )
protected

◆ OnUpdate()

override void SCR_RadialMenu.OnUpdate ( float  timeSlice)
protected

Empty method called on update ready for override.

Implements SCR_SelectionMenu.

◆ QuickActionUse()

void SCR_RadialMenu.QuickActionUse ( int  id)
protected

◆ ReactQuickInput()

void SCR_RadialMenu.ReactQuickInput ( )
protected

Check quick 1-10 actions and perform entry on action trigger.

◆ ReleaseContext()

void SCR_RadialMenu.ReleaseContext ( )
protected

◆ RemoveActionListeners()

override void SCR_RadialMenu.RemoveActionListeners ( )
protected

Remove 1-9 quick actions.

Implements SCR_SelectionMenu.

◆ SelectEntry()

override void SCR_RadialMenu.SelectEntry ( )
protected

For gamepad - based on direction of stick.

Implements SCR_SelectionMenu.

◆ SetActionHint()

void SCR_RadialMenu.SetActionHint ( string  action)

Set current hint to display and send invoke it so radial menu display will show the hint.

◆ SetController()

override void SCR_RadialMenu.SetController ( IEntity  owner,
SCR_SelectionMenuControllerInputs  controls 
)

Set controller entity and controls.

Implements SCR_SelectionMenu.

◆ SetMenuCenterPos()

void SCR_RadialMenu.SetMenuCenterPos ( vector  centerPos)

◆ SetMenuDisplay()

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.

◆ SetPreventSelectionContext()

void SCR_RadialMenu.SetPreventSelectionContext ( bool  enable)

◆ Update()

override void SCR_RadialMenu.Update ( float  timeSlice)

Implements SCR_SelectionMenu.

Member Data Documentation

◆ m_bActivateContext

bool SCR_RadialMenu.m_bActivateContext
protected

◆ m_bIsPointingToCenter

bool SCR_RadialMenu.m_bIsPointingToCenter
protected

◆ m_bPreventSelectionContext

bool SCR_RadialMenu.m_bPreventSelectionContext
protected

◆ m_eRadialType

SCR_ERadialMenuType SCR_RadialMenu.m_eRadialType = SCR_ERadialMenuType.DEFAULT

◆ m_fDynamicMouseSelectionTreshold

float SCR_RadialMenu.m_fDynamicMouseSelectionTreshold
protected

◆ m_fEntriesAngleDistance

float SCR_RadialMenu.m_fEntriesAngleDistance
protected

◆ m_fEntryAngleOffset

float SCR_RadialMenu.m_fEntryAngleOffset
protected

◆ m_fPointingAngle

float SCR_RadialMenu.m_fPointingAngle
protected

◆ m_GlobalRadialMenu

SCR_RadialMenu SCR_RadialMenu.m_GlobalRadialMenu
staticprotected

◆ m_OnDisplaySizeChange

ref ScriptInvoker<SCR_RadialMenu, float> SCR_RadialMenu.m_OnDisplaySizeChange
protected

◆ m_OnSetActionHint

ref ScriptInvoker<SCR_RadialMenu, string> SCR_RadialMenu.m_OnSetActionHint
protected

◆ m_OpenedRadialMenu

SCR_RadialMenu SCR_RadialMenu.m_OpenedRadialMenu
staticprotected

◆ m_RadialControllerInputs

SCR_RadialMenuControllerInputs SCR_RadialMenu.m_RadialControllerInputs
protected

◆ m_RadialInputs

SCR_RadialMenuInputs SCR_RadialMenu.m_RadialInputs
protected

◆ m_sActionHint

string SCR_RadialMenu.m_sActionHint
protected

◆ m_vMenuCenterPos

vector SCR_RadialMenu.m_vMenuCenterPos
protected

◆ SIZE_LARGE

const float SCR_RadialMenu.SIZE_LARGE = 580
static

◆ SIZE_SMALL

const float SCR_RadialMenu.SIZE_SMALL = 400
staticprotected

The documentation for this interface was generated from the following file: