Steam
|
This class manages the uGUI of the Steam Workshop browse items menu. It registers to events of SteamWorkshopMain class, e.g. SteamWorkshopMain.OnItemListLoaded. SteamWorkshopUIBrowse also receives UI callbacks from uGUI buttons and other elements. You can replace this class with your own UI e.g. NGUI. In this case you need to take care of registering to events and calling methods of the SteamWorkshopMain class from your new implementation. More...
Inherits MonoBehaviour.
Classes | |
class | SortingConfig |
Defines the available item list sorting modes. Used to generate the sort modes dropdown. See SteamWorkshopMain.Sorting for more details. More... | |
Public Member Functions | |
void | InvokeOnPlayButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnPlayButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnVoteUpButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnVoteUpButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnVoteDownButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnVoteDownButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnSubscribeButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnSubscribeButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnUnsubscribeButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnUnsubscribeButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnAddFavoriteButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnAddFavoriteButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnRemoveFavoriteButtonClick (WorkshopItem p_clickedItem) |
Internal method triggering the SteamWorkshopUIBrowse.OnRemoveFavoriteButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | InvokeOnItemDataSet (WorkshopItem p_itemData, SteamWorkshopItemNode p_itemUI) |
Internal method triggering the SteamWorkshopUIBrowse.OnItemDataSet event with exception handling. Required to ensure code execution even if your code throws exceptions. More... | |
void | SetItems (WorkshopItemList p_itemList) |
Call SetItems to refresh the item selection UI. Calling this method will remove all currently visible items and replace them with those passed in the p_itemList argument. More... | |
void | LoadItems (int p_page) |
The same as SteamWorkshopMain.GetItemList with an additional loading popup. More... | |
void | Search (string p_searchText) |
Search items containing p_searchText. Will reload the item list if the search text has changed. More... | |
Protected Member Functions | |
void | SetPage (int p_page) |
virtual void | Start () |
virtual void | OnDestroy () |
virtual void | ShowErrorMessage (ErrorEventArgs p_errorArgs) |
virtual void | SetItems (WorkshopItemListEventArgs p_itemListArgs) |
virtual uMyGUI_TreeBrowser.Node [] | ConvertItemsToNodes (WorkshopItem[] p_items) |
This method will convert the gives Steam items to UI nodes, which can be passed to the item browser. More... | |
virtual void | InitSorting () |
virtual void | InitSearch () |
virtual void | InvokeEventHandlerSafely< T > (System.Action< T > p_handler, T p_data) |
Protected Attributes | |
uMyGUI_TreeBrowser | ITEM_BROWSER = null |
uMyGUI_PageBox | PAGE_SELCTOR = null |
SortingConfig | SORTING = null |
InputField | SEARCH_INPUT = null |
Button | SEARCH_BUTTON = null |
Dictionary< uMyGUI_TreeBrowser.Node, WorkshopItem > | m_uiNodeToSteamItem = new Dictionary<uMyGUI_TreeBrowser.Node, WorkshopItem>() |
Static Protected Attributes | |
static SteamWorkshopUIBrowse | s_instance |
Properties | |
static SteamWorkshopUIBrowse | Instance [get] |
You can use the static Instance property to access the SteamWorkshopUIBrowse class from wherever you need it in your code. Use this property only if you know that you have a static SteamWorkshopUIBrowse uGUI in your scene. If you use the SteamWorkshopPopupBrowse, then there is no guarantee that the SteamWorkshopUIBrowse was already created. More... | |
Events | |
System.Action< WorkshopSortModeEventArgs > | OnSortModeChanged |
Invoked when the sort mode was changed. More... | |
System.Action< string > | OnSearchButtonClick |
Invoked when the search button is clicked or the search text is committed. More... | |
System.Action< int > | OnPageChanged |
Invoked when the item list page was changed. More... | |
System.Action< WorkshopItemEventArgs > | OnPlayButtonClick |
Invoked when the play button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnVoteUpButtonClick |
Invoked when the vote up button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnVoteDownButtonClick |
Invoked when the vote down button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnSubscribeButtonClick |
Invoked when the subscribe button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnUnsubscribeButtonClick |
Invoked when the unsubscribe button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnAddFavoriteButtonClick |
Invoked when the add to favorites button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< WorkshopItemEventArgs > | OnRemoveFavoriteButtonClick |
Invoked when the remove from favorites button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked. More... | |
System.Action< SteamWorkshopItemNode.ItemDataSetEventArgs > | OnItemDataSet |
Invoked when the data of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is updated. You can use this event to initialize fields of your custom UI. For example, you could add a highscore text to the WorkshopItemListEntry prefab. Then you would search the highscore uGUI text object and set the value when this event is triggered. More... | |
This class manages the uGUI of the Steam Workshop browse items menu. It registers to events of SteamWorkshopMain class, e.g. SteamWorkshopMain.OnItemListLoaded. SteamWorkshopUIBrowse also receives UI callbacks from uGUI buttons and other elements. You can replace this class with your own UI e.g. NGUI. In this case you need to take care of registering to events and calling methods of the SteamWorkshopMain class from your new implementation.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnAddFavoriteButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnAddFavoriteButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnItemDataSet | ( | WorkshopItem | p_itemData, |
SteamWorkshopItemNode | p_itemUI | ||
) |
Internal method triggering the SteamWorkshopUIBrowse.OnItemDataSet event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnPlayButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnPlayButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnRemoveFavoriteButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnRemoveFavoriteButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnSubscribeButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnSubscribeButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnUnsubscribeButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnUnsubscribeButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnVoteDownButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnVoteDownButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.InvokeOnVoteUpButtonClick | ( | WorkshopItem | p_clickedItem | ) |
Internal method triggering the SteamWorkshopUIBrowse.OnVoteUpButtonClick event with exception handling. Required to ensure code execution even if your code throws exceptions.
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.LoadItems | ( | int | p_page | ) |
The same as SteamWorkshopMain.GetItemList with an additional loading popup.
p_page | item list page to load, starts with 1. |
|
protectedvirtual |
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.Search | ( | string | p_searchText | ) |
Search items containing p_searchText. Will reload the item list if the search text has changed.
p_searchText | text to search. |
void LapinerTools.Steam.UI.SteamWorkshopUIBrowse.SetItems | ( | WorkshopItemList | p_itemList | ) |
Call SetItems to refresh the item selection UI. Calling this method will remove all currently visible items and replace them with those passed in the p_itemList argument.
p_itemList | list of items to be visualized. |
|
protectedvirtual |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticget |
You can use the static Instance property to access the SteamWorkshopUIBrowse class from wherever you need it in your code. Use this property only if you know that you have a static SteamWorkshopUIBrowse uGUI in your scene. If you use the SteamWorkshopPopupBrowse, then there is no guarantee that the SteamWorkshopUIBrowse was already created.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnAddFavoriteButtonClick |
Invoked when the add to favorites button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<SteamWorkshopItemNode.ItemDataSetEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnItemDataSet |
Invoked when the data of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is updated. You can use this event to initialize fields of your custom UI. For example, you could add a highscore text to the WorkshopItemListEntry prefab. Then you would search the highscore uGUI text object and set the value when this event is triggered.
System.Action<int> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnPageChanged |
Invoked when the item list page was changed.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnPlayButtonClick |
Invoked when the play button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnRemoveFavoriteButtonClick |
Invoked when the remove from favorites button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<string> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnSearchButtonClick |
Invoked when the search button is clicked or the search text is committed.
System.Action<WorkshopSortModeEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnSortModeChanged |
Invoked when the sort mode was changed.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnSubscribeButtonClick |
Invoked when the subscribe button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnUnsubscribeButtonClick |
Invoked when the unsubscribe button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnVoteDownButtonClick |
Invoked when the vote down button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.
System.Action<WorkshopItemEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIBrowse.OnVoteUpButtonClick |
Invoked when the vote up button of the WorkshopItemListEntry prefab (SteamWorkshopItemNode class) is clicked.