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

Scripted base for selection menu used in HUD. More...

Inheritance diagram for SCR_SelectionMenu:
[legend]

Public Member Functions

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

Protected Member Functions

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

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

const int OPEN_DELAY = 200
 

Detailed Description

Scripted base for selection menu used in HUD.

Member Function Documentation

◆ AddActionListeners()

void SCR_SelectionMenu.AddActionListeners ( )
protected

Add all action listeners for basic menu control.

Implemented in SCR_RadialMenu.

◆ AddCategoryEntry()

void SCR_SelectionMenu.AddCategoryEntry ( SCR_SelectionMenuCategoryEntry  category = null)

Add empty or custom category entry.

◆ AddEntries()

void SCR_SelectionMenu.AddEntries ( notnull array< ref SCR_SelectionMenuEntry entries,
bool  replace = false 
)

Add multiple entries in array Replace true will clear menu and use given entries.

◆ AddEntry()

void SCR_SelectionMenu.AddEntry ( SCR_SelectionMenuEntry  entry = null)

Add new entry into menu root Entries update is notified only if menu is opened in root level.

◆ AllowClosing()

void SCR_SelectionMenu.AllowClosing ( )
protected

Allow closing after some time in order to have alternative toggle action with double press.

◆ ClearEntries()

void SCR_SelectionMenu.ClearEntries ( )

Clear all entries and invoke data update.

◆ Close()

void SCR_SelectionMenu.Close ( )

Callback when close is requested.

◆ CurrentCategory()

SCR_SelectionMenuCategoryEntry SCR_SelectionMenu.CurrentCategory ( )

Return current opened category entry Null means menu is in root.

◆ DebugPrint()

void SCR_SelectionMenu.DebugPrint ( string  method,
string  msg 
)
protected

◆ GetControllerInputs()

SCR_SelectionMenuControllerInputs SCR_SelectionMenu.GetControllerInputs ( )

◆ GetEntries()

array< ref SCR_SelectionMenuEntry > SCR_SelectionMenu.GetEntries ( )

◆ GetEntryCount()

int SCR_SelectionMenu.GetEntryCount ( )

◆ GetEntryPerformed()

bool SCR_SelectionMenu.GetEntryPerformed ( )

◆ GetOnAddEntry()

ScriptInvoker SCR_SelectionMenu.GetOnAddEntry ( )

◆ GetOnBeforeOpen()

ScriptInvoker SCR_SelectionMenu.GetOnBeforeOpen ( )

◆ GetOnClose()

ScriptInvoker SCR_SelectionMenu.GetOnClose ( )

◆ GetOnControllerChanged()

ScriptInvoker SCR_SelectionMenu.GetOnControllerChanged ( )

◆ GetOnOpen()

ScriptInvoker SCR_SelectionMenu.GetOnOpen ( )

◆ GetOnOpenCategory()

ScriptInvoker SCR_SelectionMenu.GetOnOpenCategory ( )

◆ GetOnOpenFailed()

ScriptInvoker SCR_SelectionMenu.GetOnOpenFailed ( )

◆ GetOnPerform()

ScriptInvoker SCR_SelectionMenu.GetOnPerform ( )

◆ GetOnRemoveEntry()

ScriptInvoker SCR_SelectionMenu.GetOnRemoveEntry ( )

◆ GetOnSelect()

ScriptInvoker SCR_SelectionMenu.GetOnSelect ( )

◆ GetOnUpdateEntries()

ScriptInvoker SCR_SelectionMenu.GetOnUpdateEntries ( )

◆ GetSelectedEntryId()

int SCR_SelectionMenu.GetSelectedEntryId ( )

◆ GetSelectionEntry()

SCR_SelectionMenuEntry SCR_SelectionMenu.GetSelectionEntry ( )

◆ HasDisplay()

bool SCR_SelectionMenu.HasDisplay ( )

◆ Init()

void SCR_SelectionMenu.Init ( )

◆ InvokeOnAddEntry()

void SCR_SelectionMenu.InvokeOnAddEntry ( SCR_SelectionMenuEntry  entry)
protected

◆ InvokeOnBeforeOpen()

void SCR_SelectionMenu.InvokeOnBeforeOpen ( )
protected

◆ InvokeOnClose()

void SCR_SelectionMenu.InvokeOnClose ( )
protected

◆ InvokeOnControllerChanged()

void SCR_SelectionMenu.InvokeOnControllerChanged ( SCR_SelectionMenuControllerInputs  inputs)
protected

◆ InvokeOnOpen()

void SCR_SelectionMenu.InvokeOnOpen ( )
protected

◆ InvokeOnOpenCategory()

void SCR_SelectionMenu.InvokeOnOpenCategory ( SCR_SelectionMenuCategoryEntry  entry,
int  level 
)
protected

◆ InvokeOnPerform()

void SCR_SelectionMenu.InvokeOnPerform ( SCR_SelectionMenuEntry  entry)
protected

◆ InvokeOnRemoveEntry()

void SCR_SelectionMenu.InvokeOnRemoveEntry ( SCR_SelectionMenuEntry  entry)
protected

◆ InvokeOnSelect()

void SCR_SelectionMenu.InvokeOnSelect ( SCR_SelectionMenuEntry  entry,
int  id 
)
protected

◆ InvokeOnUpdateEntries()

void SCR_SelectionMenu.InvokeOnUpdateEntries ( array< ref SCR_SelectionMenuEntry entries)
protected

Implemented in SCR_RadialMenu.

◆ IsOpened()

bool SCR_SelectionMenu.IsOpened ( )

◆ LeaveCategory()

void SCR_SelectionMenu.LeaveCategory ( )
protected

◆ OnAlternativeToggleInput()

void SCR_SelectionMenu.OnAlternativeToggleInput ( )
protected

◆ OnBackInput()

void SCR_SelectionMenu.OnBackInput ( )
protected

◆ OnClose()

void SCR_SelectionMenu.OnClose ( )
protected

Empty method called on close ready for override.

Implemented in SCR_RadialMenu.

◆ OnOpen()

void SCR_SelectionMenu.OnOpen ( )
protected

Empty method called on open ready for override.

Implemented in SCR_RadialMenu.

◆ OnOpenInputRelease()

void SCR_SelectionMenu.OnOpenInputRelease ( float  value,
EActionTrigger  reason 
)
protected

On open input handle menu closing.

◆ OnPerformInput()

void SCR_SelectionMenu.OnPerformInput ( )
protected

On select input handle entry selection and moving into layers.

Implemented in SCR_RadialMenu.

◆ OnUpdate()

void SCR_SelectionMenu.OnUpdate ( float  timeSlice)
protected

Empty method called on update ready for override.

Implemented in SCR_RadialMenu.

◆ Open()

void SCR_SelectionMenu.Open ( )

◆ OpenCategoryEntry()

void SCR_SelectionMenu.OpenCategoryEntry ( notnull SCR_SelectionMenuCategoryEntry  category)
protected

Specific peform action for category to change menu content.

◆ OpenInRoot()

void SCR_SelectionMenu.OpenInRoot ( )
protected

Clear open categories and use entries from root.

◆ PerformEntry()

void SCR_SelectionMenu.PerformEntry ( notnull SCR_SelectionMenuEntry  entry)

◆ PlaySound()

void SCR_SelectionMenu.PlaySound ( string  sound)
protected

◆ RemoveActionListeners()

void SCR_SelectionMenu.RemoveActionListeners ( )
protected

Remove all action listeners for basic menu control.

Implemented in SCR_RadialMenu.

◆ RemoveEntry()

void SCR_SelectionMenu.RemoveEntry ( notnull SCR_SelectionMenuEntry  entry)

Remove selected entry and invoke data update.

◆ SelectEntry()

void SCR_SelectionMenu.SelectEntry ( )
protected

Generic method for custom entry selection based on used interface.

Implemented in SCR_RadialMenu.

◆ SetController()

void SCR_SelectionMenu.SetController ( IEntity  owner,
SCR_SelectionMenuControllerInputs  controls 
)

Set controller entity and controls.

Implemented in SCR_RadialMenu.

◆ SetMenuDisplay()

void SCR_SelectionMenu.SetMenuDisplay ( SCR_SelectionMenuDisplay  display = null)

Find and setup display used for menu.

Implemented in SCR_RadialMenu.

◆ Update()

void SCR_SelectionMenu.Update ( float  timeSlice)

Implemented in SCR_RadialMenu.

◆ UpdateEntries()

void SCR_SelectionMenu.UpdateEntries ( )

Invoke data update for all entries.

◆ UpdateSelectedEntries()

void SCR_SelectionMenu.UpdateSelectedEntries ( notnull array< ref SCR_SelectionMenuEntry entries)

Invoke data update for selected entries.

Member Data Documentation

◆ m_aEntries

ref array<ref SCR_SelectionMenuEntry> SCR_SelectionMenu.m_aEntries = {}
protected

◆ m_aRootEntries

ref array<ref SCR_SelectionMenuEntry> SCR_SelectionMenu.m_aRootEntries = {}
protected

◆ m_aSelectedCategories

ref array<SCR_SelectionMenuCategoryEntry> SCR_SelectionMenu.m_aSelectedCategories = {}
protected

◆ m_bClosingMenu

bool SCR_SelectionMenu.m_bClosingMenu
protected

◆ m_bEntryPerformed

bool SCR_SelectionMenu.m_bEntryPerformed
protected

◆ m_bOpened

bool SCR_SelectionMenu.m_bOpened
protected

◆ m_bOpenedForTime

bool SCR_SelectionMenu.m_bOpenedForTime
protected

◆ m_bUsingAlternativeToggle

bool SCR_SelectionMenu.m_bUsingAlternativeToggle
protected

◆ m_ControllerInputs

ref SCR_SelectionMenuControllerInputs SCR_SelectionMenu.m_ControllerInputs
protected

◆ m_Display

SCR_SelectionMenuDisplay SCR_SelectionMenu.m_Display
protected

◆ m_Inputs

ref SCR_SelectionMenuInputs SCR_SelectionMenu.m_Inputs
protected

◆ m_iSelectedEntryId

int SCR_SelectionMenu.m_iSelectedEntryId
protected

◆ m_OnAddEntry

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuEntry> SCR_SelectionMenu.m_OnAddEntry
protected

◆ m_OnBeforeOpen

ref ScriptInvoker<SCR_SelectionMenu> SCR_SelectionMenu.m_OnBeforeOpen
protected

◆ m_OnClose

ref ScriptInvoker<SCR_SelectionMenu> SCR_SelectionMenu.m_OnClose
protected

◆ m_OnControllerChanged

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuControllerInputs> SCR_SelectionMenu.m_OnControllerChanged
protected

◆ m_OnOpen

ref ScriptInvoker<SCR_SelectionMenu> SCR_SelectionMenu.m_OnOpen
protected

◆ m_OnOpenCategory

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuCategoryEntry, int> SCR_SelectionMenu.m_OnOpenCategory
protected

◆ m_OnOpenFailed

ref ScriptInvoker<SCR_SelectionMenu, SelectionMenuFailReason> SCR_SelectionMenu.m_OnOpenFailed
protected

◆ m_OnPerform

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuEntry> SCR_SelectionMenu.m_OnPerform
protected

◆ m_OnRemoveEntry

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuEntry> SCR_SelectionMenu.m_OnRemoveEntry
protected

◆ m_OnSelect

ref ScriptInvoker<SCR_SelectionMenu, SCR_SelectionMenuEntry, int> SCR_SelectionMenu.m_OnSelect
protected

◆ m_OnUpdateEntries

ref ScriptInvoker<SCR_SelectionMenu, array<ref SCR_SelectionMenuEntry> > SCR_SelectionMenu.m_OnUpdateEntries
protected

◆ m_sCloseSound

string SCR_SelectionMenu.m_sCloseSound
protected

◆ m_SelectedEntry

SCR_SelectionMenuEntry SCR_SelectionMenu.m_SelectedEntry
protected

◆ m_sEnterCategorySound

string SCR_SelectionMenu.m_sEnterCategorySound
protected

◆ m_sLeaveCategorySound

string SCR_SelectionMenu.m_sLeaveCategorySound
protected

◆ m_sOpenSound

string SCR_SelectionMenu.m_sOpenSound
protected

◆ m_sPerformSound

string SCR_SelectionMenu.m_sPerformSound
protected

◆ m_sSelectionSound

string SCR_SelectionMenu.m_sSelectionSound
protected

◆ OPEN_DELAY

const int SCR_SelectionMenu.OPEN_DELAY = 200
staticprotected

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