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

Filter panel component which is commonly found in content browser, scenarios menu, and other places. More...

Inheritance diagram for SCR_FilterPanelComponent:
[legend]

Public Member Functions

SCR_FilterSet GetFilter ()
 
SCR_EditBoxSearchComponent GetEditBoxSearch ()
 
bool AnyFilterSelected ()
 
bool AnyFilterButtonsVisible ()
 
bool SetEditBoxSearchMessage (string message)
 
void SetItemsFoundMessage (int current, int total, bool enabled=true)
 
void ShowFilterListBox (bool show, bool animate=false)
 Shows either the main content of the panel or the filter.
 
bool GetFilterListBoxShown ()
 
void SelectFilter (SCR_FilterEntry filter, bool select, bool invokeOnChanged=true, bool instant=false)
 Selects or deselects the filter visually.
 
void Save (string tag=string.Empty)
 Saves the filter configuration in user settings.
 
void ResetToDefaultValues ()
 
void EnableFilterButton (bool enable)
 
bool GetFilterButtonEnabled ()
 
bool TryLoad (string tag=string.Empty)
 Tries to load filter values.
 
string GetStorageTag ()
 
bool GetFocused ()
 
void SetFocusOnFirstItem ()
 
SCR_FilterPanelWidgets GetWidgets ()
 
ScriptInvokerFilter GetOnFilterChanged ()
 
ScriptInvokerBool GetOnFilterPanelToggled ()
 
override void HandlerAttached (Widget w)
 
override void HandlerDeattached (Widget w)
 
void FillTooltip (SCR_ScriptedWidgetTooltip tooltip)
 
bool IsTooltipHoverWidgetInHierarchy ()
 
void ResetTooltipInitializationFlags ()
 
- Public Member Functions inherited from SCR_ScriptedWidgetComponent
override void HandlerAttached (Widget w)
 
override bool OnClick (Widget w, int x, int y, int button)
 
Widget GetRootWidget ()
 
bool IsVisible ()
 

Public Attributes

ref SCR_FilterSet m_FilterSet
 
- Public Attributes inherited from SCR_ScriptedWidgetComponent
ref ScriptInvoker m_OnClick = new ScriptInvoker
 

Protected Member Functions

void SetItemsFoundMessageVisible (bool visible)
 
void EnableItemsFoundMessage (bool enabled=false)
 
void Filter_ListBox_EnableFilter (SCR_FilterEntry filter, bool enabled, bool instant=false)
 Enables/disables this filter in the list box.
 
void Filter_ListBox_ResetFiltersInCategory (SCR_FilterCategory category, SCR_FilterEntry filterExclude)
 Resets filters in category, all except for one filter, if it is not null.
 
void Filter_TopBar_DeleteButton (SCR_FilterEntry filter)
 Deletes a button which matches given category and filter.
 
void Filter_TopBar_DeleteButtonsInCategory (SCR_FilterCategory category)
 Deletes all buttons which are linked to filters of given category.
 
void Filter_TopBar_AddButton (SCR_FilterEntry filter)
 Adds a top bar filter button, links it with this filter category and filter.
 
void Filter_TopBar_UpdateButtonsVisibility ()
 Hides latest buttons if there are above m_iMaxFilterButtons buttons.
 
void Filter_InitFilterPanel ()
 Fills the listbox with categories and filters.
 
void SyncUiToInternal ()
 Updates internal values from UI.
 
void SyncInternalToUi ()
 Updates UI from internal values.
 
void ShowFilterListBox_Internal (bool show, bool animate=false)
 Shows either the main content of the panel or the filter.
 
void OnTopBarHighlightCycleCompleted ()
 
void OnTopBarFilterButtonClicked (SCR_ModularButtonComponent comp)
 Called when top bar filter button is clicked Button is deleted, according filter in the listbox is unchecked.
 
void OnTopBarFilterButtonFocused (SCR_ModularButtonComponent comp)
 
void OnTopBarFilterButtonFocusLost (SCR_ModularButtonComponent comp)
 
void OnFilterListBoxChanged (SCR_ListBoxComponent comp, int item, bool newSelected)
 Called when filter listbox selection changes.
 
void OnToggleFilterPanelButton (SCR_ModularButtonComponent comp, bool newToggled)
 
void OnSearchConfirm (SCR_EditBoxComponent comp, string value)
 
void OnTooltipShow (SCR_ScriptedWidgetTooltip tooltip)
 
void UpdateItemsFoundTooltip ()
 

Protected Attributes

ResourceName m_sTopBarFilterButtonLayout
 
string m_sTopBarFilterButtonIconName
 
string m_sTopBarFilterButtonIconGlowName
 
string m_sTopBarFilterButtonTooltipTag
 
string m_sTopBarHiddenFiltersTooltipTag
 
string m_sTopBarItemsFoundTooltipTag
 
string m_sTopBarItemsFoundTooltipMessage
 
int m_iMaxFilterButtons
 
bool m_bFilterShownAtStart
 
string m_sFilterSetStorageTag
 
ResourceName m_sElementLayoutMututallyExclusive
 
ResourceName m_sElementLayoutGeneral
 
float m_fTobBarHighlightOpacity
 
float m_fTopBarHighlightAnimationSpeed
 
int m_iTopBarHighlightAnimationCycles
 
EAnimationCurve m_eTopBarHighlightAnimationCurve
 
EAnimationCurve m_eTopBarHighlightAnimationCurveReverse
 
ref SCR_FilterPanelWidgets m_Widgets = new SCR_FilterPanelWidgets()
 
SCR_FilterEntry m_FocusedTopBarFilter
 
ref array< SCR_FilterEntrym_aHiddenFilters = {}
 
int m_iTopBarHighlightCycle
 
WidgetAnimationOpacity m_TopBarAnimation
 
ref ScriptInvokerFilter m_OnFilterChanged
 
ref ScriptInvokerBool m_OnFilterPanelToggled
 
bool m_bItemsFoundMessageEnabled
 
int m_iEntriesFiltered
 
int m_iEntriesTotal
 
SCR_ScriptedWidgetTooltip m_ItemsFoundTooltip
 
bool m_bIsTooltipHoverWidgetInHierarchy
 
bool m_bIsTooltipInitialized
 
SCR_ScriptedWidgetTooltip m_Tooltip
 
- Protected Attributes inherited from SCR_ScriptedWidgetComponent
Widget m_wRoot
 

Static Protected Attributes

const string ITEMS_FOUND_MESSAGE = "#AR-Filters_EntriesFound_Condensed"
 
static ref array< SCR_FilterPanelComponentm_aActiveFilterPanels = {}
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_ScriptedWidgetComponent
static SCR_ScriptedWidgetComponent GetComponent (TypeName componentType, string name, Widget parent, bool searchAllChildren=true)
 Base method for component lookup through the widget library.
 

Detailed Description

Filter panel component which is commonly found in content browser, scenarios menu, and other places.

It controls a filter list box and a set of filter buttons which are added to the top bar when filter items are selected. When we click on these buttons, they are removed and the according filter in the list is disabled.

So, this panel just keeps the list box and buttons synchronized. Use the public API to get selected filters.

Member Function Documentation

◆ AnyFilterButtonsVisible()

bool SCR_FilterPanelComponent.AnyFilterButtonsVisible ( )
Returns

◆ AnyFilterSelected()

bool SCR_FilterPanelComponent.AnyFilterSelected ( )
Returns

◆ EnableFilterButton()

void SCR_FilterPanelComponent.EnableFilterButton ( bool  enable)
Parameters
[in]enable

◆ EnableItemsFoundMessage()

void SCR_FilterPanelComponent.EnableItemsFoundMessage ( bool  enabled = false)
protected

◆ FillTooltip()

void SCR_FilterPanelComponent.FillTooltip ( SCR_ScriptedWidgetTooltip  tooltip)
Parameters
[in]tooltip

◆ Filter_InitFilterPanel()

void SCR_FilterPanelComponent.Filter_InitFilterPanel ( )
protected

Fills the listbox with categories and filters.

◆ Filter_ListBox_EnableFilter()

void SCR_FilterPanelComponent.Filter_ListBox_EnableFilter ( SCR_FilterEntry  filter,
bool  enabled,
bool  instant = false 
)
protected

Enables/disables this filter in the list box.

Parameters
[in]filter
[in]enabled

◆ Filter_ListBox_ResetFiltersInCategory()

void SCR_FilterPanelComponent.Filter_ListBox_ResetFiltersInCategory ( SCR_FilterCategory  category,
SCR_FilterEntry  filterExclude 
)
protected

Resets filters in category, all except for one filter, if it is not null.

Parameters
[in]category
[in]filterExclude

◆ Filter_TopBar_AddButton()

void SCR_FilterPanelComponent.Filter_TopBar_AddButton ( SCR_FilterEntry  filter)
protected

Adds a top bar filter button, links it with this filter category and filter.

Parameters
[in]filter

◆ Filter_TopBar_DeleteButton()

void SCR_FilterPanelComponent.Filter_TopBar_DeleteButton ( SCR_FilterEntry  filter)
protected

Deletes a button which matches given category and filter.

Parameters
[in]filter

◆ Filter_TopBar_DeleteButtonsInCategory()

void SCR_FilterPanelComponent.Filter_TopBar_DeleteButtonsInCategory ( SCR_FilterCategory  category)
protected

Deletes all buttons which are linked to filters of given category.

Parameters
[in]category

◆ Filter_TopBar_UpdateButtonsVisibility()

void SCR_FilterPanelComponent.Filter_TopBar_UpdateButtonsVisibility ( )
protected

Hides latest buttons if there are above m_iMaxFilterButtons buttons.

Also updates the text of extra button count.

◆ GetEditBoxSearch()

SCR_EditBoxSearchComponent SCR_FilterPanelComponent.GetEditBoxSearch ( )
Returns
the component of the search edit box

◆ GetFilter()

SCR_FilterSet SCR_FilterPanelComponent.GetFilter ( )
Returns

◆ GetFilterButtonEnabled()

bool SCR_FilterPanelComponent.GetFilterButtonEnabled ( )
Returns

◆ GetFilterListBoxShown()

bool SCR_FilterPanelComponent.GetFilterListBoxShown ( )
Returns

◆ GetFocused()

bool SCR_FilterPanelComponent.GetFocused ( )
Returns
true when anything inside the filter panel is focused

◆ GetOnFilterChanged()

ScriptInvokerFilter SCR_FilterPanelComponent.GetOnFilterChanged ( )
Returns

◆ GetOnFilterPanelToggled()

ScriptInvokerBool SCR_FilterPanelComponent.GetOnFilterPanelToggled ( )
Returns

◆ GetStorageTag()

string SCR_FilterPanelComponent.GetStorageTag ( )
Returns

◆ GetWidgets()

SCR_FilterPanelWidgets SCR_FilterPanelComponent.GetWidgets ( )
Returns

◆ HandlerAttached()

override void SCR_FilterPanelComponent.HandlerAttached ( Widget  w)

◆ HandlerDeattached()

override void SCR_FilterPanelComponent.HandlerDeattached ( Widget  w)

◆ IsTooltipHoverWidgetInHierarchy()

bool SCR_FilterPanelComponent.IsTooltipHoverWidgetInHierarchy ( )
Returns

◆ OnFilterListBoxChanged()

void SCR_FilterPanelComponent.OnFilterListBoxChanged ( SCR_ListBoxComponent  comp,
int  item,
bool  newSelected 
)
protected

Called when filter listbox selection changes.

Parameters
[in]comp
[in]item
[in]newSelected

◆ OnSearchConfirm()

void SCR_FilterPanelComponent.OnSearchConfirm ( SCR_EditBoxComponent  comp,
string  value 
)
protected

◆ OnToggleFilterPanelButton()

void SCR_FilterPanelComponent.OnToggleFilterPanelButton ( SCR_ModularButtonComponent  comp,
bool  newToggled 
)
protected

◆ OnTooltipShow()

void SCR_FilterPanelComponent.OnTooltipShow ( SCR_ScriptedWidgetTooltip  tooltip)
protected

◆ OnTopBarFilterButtonClicked()

void SCR_FilterPanelComponent.OnTopBarFilterButtonClicked ( SCR_ModularButtonComponent  comp)
protected

Called when top bar filter button is clicked Button is deleted, according filter in the listbox is unchecked.

Parameters
[in]comp

◆ OnTopBarFilterButtonFocused()

void SCR_FilterPanelComponent.OnTopBarFilterButtonFocused ( SCR_ModularButtonComponent  comp)
protected

◆ OnTopBarFilterButtonFocusLost()

void SCR_FilterPanelComponent.OnTopBarFilterButtonFocusLost ( SCR_ModularButtonComponent  comp)
protected

◆ OnTopBarHighlightCycleCompleted()

void SCR_FilterPanelComponent.OnTopBarHighlightCycleCompleted ( )
protected

◆ ResetToDefaultValues()

void SCR_FilterPanelComponent.ResetToDefaultValues ( )

◆ ResetTooltipInitializationFlags()

void SCR_FilterPanelComponent.ResetTooltipInitializationFlags ( )

◆ Save()

void SCR_FilterPanelComponent.Save ( string  tag = string::Empty)

Saves the filter configuration in user settings.

Parameters
[in]tagoptional parameter, a tag used for saving the filter. if tag is not provided, the internal m_sFilterSetStorageTag is used from the attribute.

◆ SelectFilter()

void SCR_FilterPanelComponent.SelectFilter ( SCR_FilterEntry  filter,
bool  select,
bool  invokeOnChanged = true,
bool  instant = false 
)

Selects or deselects the filter visually.

!!! Does not update the internal state of the filter. You still need to call filter.SetSelected();

Parameters
[in]filter
[in]select
[in]invokeOnChanged

◆ SetEditBoxSearchMessage()

bool SCR_FilterPanelComponent.SetEditBoxSearchMessage ( string  message)
Parameters
[in]message
Returns

◆ SetFocusOnFirstItem()

void SCR_FilterPanelComponent.SetFocusOnFirstItem ( )

◆ SetItemsFoundMessage()

void SCR_FilterPanelComponent.SetItemsFoundMessage ( int  current,
int  total,
bool  enabled = true 
)
Parameters
[in]current
[in]total
[in]enabled

◆ SetItemsFoundMessageVisible()

void SCR_FilterPanelComponent.SetItemsFoundMessageVisible ( bool  visible)
protected

◆ ShowFilterListBox()

void SCR_FilterPanelComponent.ShowFilterListBox ( bool  show,
bool  animate = false 
)

Shows either the main content of the panel or the filter.

Parameters
[in]show
[in]animate

◆ ShowFilterListBox_Internal()

void SCR_FilterPanelComponent.ShowFilterListBox_Internal ( bool  show,
bool  animate = false 
)
protected

Shows either the main content of the panel or the filter.

Parameters
[in]show
[in]animate

◆ SyncInternalToUi()

void SCR_FilterPanelComponent.SyncInternalToUi ( )
protected

Updates UI from internal values.

◆ SyncUiToInternal()

void SCR_FilterPanelComponent.SyncUiToInternal ( )
protected

Updates internal values from UI.

◆ TryLoad()

bool SCR_FilterPanelComponent.TryLoad ( string  tag = string::Empty)

Tries to load filter values.

If fails, it restores the filter to default state.

Parameters
[in]tagoptional parameter, a tag used for saving the filter. if tag is not provided, the internal m_sFilterSetStorageTag is used from the attribute.
Returns

◆ UpdateItemsFoundTooltip()

void SCR_FilterPanelComponent.UpdateItemsFoundTooltip ( )
protected

Member Data Documentation

◆ ITEMS_FOUND_MESSAGE

const string SCR_FilterPanelComponent.ITEMS_FOUND_MESSAGE = "#AR-Filters_EntriesFound_Condensed"
staticprotected

◆ m_aActiveFilterPanels

ref array<SCR_FilterPanelComponent> SCR_FilterPanelComponent.m_aActiveFilterPanels = {}
staticprotected

◆ m_aHiddenFilters

ref array<SCR_FilterEntry> SCR_FilterPanelComponent.m_aHiddenFilters = {}
protected

◆ m_bFilterShownAtStart

bool SCR_FilterPanelComponent.m_bFilterShownAtStart
protected

◆ m_bIsTooltipHoverWidgetInHierarchy

bool SCR_FilterPanelComponent.m_bIsTooltipHoverWidgetInHierarchy
protected

◆ m_bIsTooltipInitialized

bool SCR_FilterPanelComponent.m_bIsTooltipInitialized
protected

◆ m_bItemsFoundMessageEnabled

bool SCR_FilterPanelComponent.m_bItemsFoundMessageEnabled
protected

◆ m_eTopBarHighlightAnimationCurve

EAnimationCurve SCR_FilterPanelComponent.m_eTopBarHighlightAnimationCurve
protected

◆ m_eTopBarHighlightAnimationCurveReverse

EAnimationCurve SCR_FilterPanelComponent.m_eTopBarHighlightAnimationCurveReverse
protected

◆ m_FilterSet

ref SCR_FilterSet SCR_FilterPanelComponent.m_FilterSet

◆ m_FocusedTopBarFilter

SCR_FilterEntry SCR_FilterPanelComponent.m_FocusedTopBarFilter
protected

◆ m_fTobBarHighlightOpacity

float SCR_FilterPanelComponent.m_fTobBarHighlightOpacity
protected

◆ m_fTopBarHighlightAnimationSpeed

float SCR_FilterPanelComponent.m_fTopBarHighlightAnimationSpeed
protected

◆ m_iEntriesFiltered

int SCR_FilterPanelComponent.m_iEntriesFiltered
protected

◆ m_iEntriesTotal

int SCR_FilterPanelComponent.m_iEntriesTotal
protected

◆ m_iMaxFilterButtons

int SCR_FilterPanelComponent.m_iMaxFilterButtons
protected

◆ m_ItemsFoundTooltip

SCR_ScriptedWidgetTooltip SCR_FilterPanelComponent.m_ItemsFoundTooltip
protected

◆ m_iTopBarHighlightAnimationCycles

int SCR_FilterPanelComponent.m_iTopBarHighlightAnimationCycles
protected

◆ m_iTopBarHighlightCycle

int SCR_FilterPanelComponent.m_iTopBarHighlightCycle
protected

◆ m_OnFilterChanged

ref ScriptInvokerFilter SCR_FilterPanelComponent.m_OnFilterChanged
protected

◆ m_OnFilterPanelToggled

ref ScriptInvokerBool SCR_FilterPanelComponent.m_OnFilterPanelToggled
protected

◆ m_sElementLayoutGeneral

ResourceName SCR_FilterPanelComponent.m_sElementLayoutGeneral
protected

◆ m_sElementLayoutMututallyExclusive

ResourceName SCR_FilterPanelComponent.m_sElementLayoutMututallyExclusive
protected

◆ m_sFilterSetStorageTag

string SCR_FilterPanelComponent.m_sFilterSetStorageTag
protected

◆ m_sTopBarFilterButtonIconGlowName

string SCR_FilterPanelComponent.m_sTopBarFilterButtonIconGlowName
protected

◆ m_sTopBarFilterButtonIconName

string SCR_FilterPanelComponent.m_sTopBarFilterButtonIconName
protected

◆ m_sTopBarFilterButtonLayout

ResourceName SCR_FilterPanelComponent.m_sTopBarFilterButtonLayout
protected

◆ m_sTopBarFilterButtonTooltipTag

string SCR_FilterPanelComponent.m_sTopBarFilterButtonTooltipTag
protected

◆ m_sTopBarHiddenFiltersTooltipTag

string SCR_FilterPanelComponent.m_sTopBarHiddenFiltersTooltipTag
protected

◆ m_sTopBarItemsFoundTooltipMessage

string SCR_FilterPanelComponent.m_sTopBarItemsFoundTooltipMessage
protected

◆ m_sTopBarItemsFoundTooltipTag

string SCR_FilterPanelComponent.m_sTopBarItemsFoundTooltipTag
protected

◆ m_Tooltip

SCR_ScriptedWidgetTooltip SCR_FilterPanelComponent.m_Tooltip
protected

◆ m_TopBarAnimation

WidgetAnimationOpacity SCR_FilterPanelComponent.m_TopBarAnimation
protected

◆ m_Widgets

ref SCR_FilterPanelWidgets SCR_FilterPanelComponent.m_Widgets = new SCR_FilterPanelWidgets()
protected

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