Arma Reforger Script API
|
Filter panel component which is commonly found in content browser, scenarios menu, and other places. More...
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 () |
Static Protected Attributes | |
const string | ITEMS_FOUND_MESSAGE = "#AR-Filters_EntriesFound_Condensed" |
static ref array< SCR_FilterPanelComponent > | m_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. | |
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.
bool SCR_FilterPanelComponent.AnyFilterButtonsVisible | ( | ) |
bool SCR_FilterPanelComponent.AnyFilterSelected | ( | ) |
void SCR_FilterPanelComponent.EnableFilterButton | ( | bool | enable | ) |
[in] | enable |
|
protected |
void SCR_FilterPanelComponent.FillTooltip | ( | SCR_ScriptedWidgetTooltip | tooltip | ) |
[in] | tooltip |
|
protected |
Fills the listbox with categories and filters.
|
protected |
Enables/disables this filter in the list box.
[in] | filter | |
[in] | enabled |
|
protected |
Resets filters in category, all except for one filter, if it is not null.
[in] | category | |
[in] | filterExclude |
|
protected |
Adds a top bar filter button, links it with this filter category and filter.
[in] | filter |
|
protected |
Deletes a button which matches given category and filter.
[in] | filter |
|
protected |
Deletes all buttons which are linked to filters of given category.
[in] | category |
|
protected |
Hides latest buttons if there are above m_iMaxFilterButtons buttons.
Also updates the text of extra button count.
SCR_EditBoxSearchComponent SCR_FilterPanelComponent.GetEditBoxSearch | ( | ) |
SCR_FilterSet SCR_FilterPanelComponent.GetFilter | ( | ) |
bool SCR_FilterPanelComponent.GetFilterButtonEnabled | ( | ) |
bool SCR_FilterPanelComponent.GetFilterListBoxShown | ( | ) |
bool SCR_FilterPanelComponent.GetFocused | ( | ) |
ScriptInvokerFilter SCR_FilterPanelComponent.GetOnFilterChanged | ( | ) |
ScriptInvokerBool SCR_FilterPanelComponent.GetOnFilterPanelToggled | ( | ) |
string SCR_FilterPanelComponent.GetStorageTag | ( | ) |
SCR_FilterPanelWidgets SCR_FilterPanelComponent.GetWidgets | ( | ) |
override void SCR_FilterPanelComponent.HandlerAttached | ( | Widget | w | ) |
Implements SCR_ScriptedWidgetComponent.
override void SCR_FilterPanelComponent.HandlerDeattached | ( | Widget | w | ) |
bool SCR_FilterPanelComponent.IsTooltipHoverWidgetInHierarchy | ( | ) |
|
protected |
Called when filter listbox selection changes.
[in] | comp | |
[in] | item | |
[in] | newSelected |
|
protected |
|
protected |
|
protected |
|
protected |
Called when top bar filter button is clicked Button is deleted, according filter in the listbox is unchecked.
[in] | comp |
|
protected |
|
protected |
|
protected |
void SCR_FilterPanelComponent.ResetToDefaultValues | ( | ) |
void SCR_FilterPanelComponent.ResetTooltipInitializationFlags | ( | ) |
void SCR_FilterPanelComponent.Save | ( | string | tag = string::Empty | ) |
Saves the filter configuration in user settings.
[in] | tag | optional parameter, a tag used for saving the filter. if tag is not provided, the internal m_sFilterSetStorageTag is used from the attribute. |
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();
[in] | filter | |
[in] | select | |
[in] | invokeOnChanged |
bool SCR_FilterPanelComponent.SetEditBoxSearchMessage | ( | string | message | ) |
[in] | message |
void SCR_FilterPanelComponent.SetFocusOnFirstItem | ( | ) |
void SCR_FilterPanelComponent.SetItemsFoundMessage | ( | int | current, |
int | total, | ||
bool | enabled = true |
||
) |
[in] | current | |
[in] | total | |
[in] | enabled |
|
protected |
void SCR_FilterPanelComponent.ShowFilterListBox | ( | bool | show, |
bool | animate = false |
||
) |
Shows either the main content of the panel or the filter.
[in] | show | |
[in] | animate |
|
protected |
Shows either the main content of the panel or the filter.
[in] | show | |
[in] | animate |
|
protected |
Updates UI from internal values.
|
protected |
Updates internal values from UI.
bool SCR_FilterPanelComponent.TryLoad | ( | string | tag = string::Empty | ) |
Tries to load filter values.
If fails, it restores the filter to default state.
[in] | tag | optional parameter, a tag used for saving the filter. if tag is not provided, the internal m_sFilterSetStorageTag is used from the attribute. |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
ref SCR_FilterSet SCR_FilterPanelComponent.m_FilterSet |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |