Steam
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | Events | List of all members
LapinerTools.Steam.UI.SteamWorkshopUIUpload Class Reference

This class manages the uGUI of the Steam Workshop upload item menu. It registers to events of SteamWorkshopMain class, e.g. SteamWorkshopMain.OnUploaded. SteamWorkshopUIUpload 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.

Public Member Functions

virtual void SetItemData (WorkshopItemUpdate p_itemData)
 Call SetItemData to refresh the item UI. More...
 

Protected Member Functions

virtual void Start ()
 
virtual void LateUpdate ()
 
virtual void OnDestroy ()
 
virtual void OnEditName (string p_name)
 
virtual void OnEditDescription (string p_description)
 
virtual void OnScreenshotButtonClick ()
 
virtual void OnUploadButtonClick ()
 
virtual void ShowSuccessMessage (WorkshopItemUpdateEventArgs p_successArgs)
 
virtual void ShowErrorMessage (ErrorEventArgs p_errorArgs)
 
virtual void InvokeEventHandlerSafely< T > (System.Action< T > p_handler, T p_data)
 
virtual IEnumerator ShowUploadProgress ()
 
virtual IEnumerator SetDescriptionSafe (string p_description)
 A Unity bug going through various Unity versions does not allow to set the text of a multiline InputField directly after creation... See: https://forum.unity3d.com/threads/inputfield-argumentoutofrangeexception.295840/ More...
 
virtual IEnumerator LoadIcon (string p_filePath)
 

Protected Attributes

int ICON_WIDTH = 512
 
int ICON_HEIGHT = 512
 
InputField NAME_INPUT = null
 
InputField DESCRIPTION_INPUT = null
 
RawImage ICON = null
 
Button SCREENSHOT_BUTTON = null
 
Button UPLOAD_BUTTON = null
 
bool m_improveNavigationFocus = true
 
bool m_isUploading = false
 
WWW m_pendingImageDownload = null
 
WorkshopItemUpdate m_itemData = new WorkshopItemUpdate()
 

Static Protected Attributes

static SteamWorkshopUIUpload s_instance
 

Properties

static SteamWorkshopUIUpload Instance [get]
 You can use the static Instance property to access the SteamWorkshopUIUpload class from wherever you need it in your code. Use this property only if you know that you have a static SteamWorkshopUIUpload uGUI in your scene. If you use the SteamWorkshopPopupUpload, then there is no guarantee that the SteamWorkshopUIUpload was already created. More...
 

Events

System.Action< string > OnNameSet
 Invoked when the name InputField (NAME_INPUT) is committed. More...
 
System.Action< string > OnDescriptionSet
 Invoked when the description InputField (DESCRIPTION_INPUT) is committed. More...
 
System.Action< string > OnIconFilePathSet
 Invoked when the item icon was rendered and is available on disk. More...
 
System.Action< Texture2D > OnIconTextureSet
 Invoked when the item icon was rendered and the Textured2D instance is ready to be used. More...
 
System.Action< WorkshopItemUpdateEventArgsOnStartedUpload
 Invoked when the upload process is started. More...
 
System.Action< WorkshopItemUpdateEventArgsOnFinishedUpload
 Invoked when the upload process is finished successfully. More...
 

Detailed Description

This class manages the uGUI of the Steam Workshop upload item menu. It registers to events of SteamWorkshopMain class, e.g. SteamWorkshopMain.OnUploaded. SteamWorkshopUIUpload 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.

Member Function Documentation

◆ InvokeEventHandlerSafely< T >()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.InvokeEventHandlerSafely< T > ( System.Action< T >  p_handler,
p_data 
)
protectedvirtual

◆ LateUpdate()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.LateUpdate ( )
protectedvirtual

◆ LoadIcon()

virtual IEnumerator LapinerTools.Steam.UI.SteamWorkshopUIUpload.LoadIcon ( string  p_filePath)
protectedvirtual

◆ OnDestroy()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnDestroy ( )
protectedvirtual

◆ OnEditDescription()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnEditDescription ( string  p_description)
protectedvirtual

◆ OnEditName()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnEditName ( string  p_name)
protectedvirtual

◆ OnScreenshotButtonClick()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnScreenshotButtonClick ( )
protectedvirtual

◆ OnUploadButtonClick()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnUploadButtonClick ( )
protectedvirtual

◆ SetDescriptionSafe()

virtual IEnumerator LapinerTools.Steam.UI.SteamWorkshopUIUpload.SetDescriptionSafe ( string  p_description)
protectedvirtual

A Unity bug going through various Unity versions does not allow to set the text of a multiline InputField directly after creation... See: https://forum.unity3d.com/threads/inputfield-argumentoutofrangeexception.295840/

◆ SetItemData()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.SetItemData ( WorkshopItemUpdate  p_itemData)
virtual

Call SetItemData to refresh the item UI.

Parameters
p_itemDataitem update data to be visualized.

◆ ShowErrorMessage()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.ShowErrorMessage ( ErrorEventArgs  p_errorArgs)
protectedvirtual

◆ ShowSuccessMessage()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.ShowSuccessMessage ( WorkshopItemUpdateEventArgs  p_successArgs)
protectedvirtual

◆ ShowUploadProgress()

virtual IEnumerator LapinerTools.Steam.UI.SteamWorkshopUIUpload.ShowUploadProgress ( )
protectedvirtual

◆ Start()

virtual void LapinerTools.Steam.UI.SteamWorkshopUIUpload.Start ( )
protectedvirtual

Member Data Documentation

◆ DESCRIPTION_INPUT

InputField LapinerTools.Steam.UI.SteamWorkshopUIUpload.DESCRIPTION_INPUT = null
protected

◆ ICON

RawImage LapinerTools.Steam.UI.SteamWorkshopUIUpload.ICON = null
protected

◆ ICON_HEIGHT

int LapinerTools.Steam.UI.SteamWorkshopUIUpload.ICON_HEIGHT = 512
protected

◆ ICON_WIDTH

int LapinerTools.Steam.UI.SteamWorkshopUIUpload.ICON_WIDTH = 512
protected

◆ m_improveNavigationFocus

bool LapinerTools.Steam.UI.SteamWorkshopUIUpload.m_improveNavigationFocus = true
protected

◆ m_isUploading

bool LapinerTools.Steam.UI.SteamWorkshopUIUpload.m_isUploading = false
protected

◆ m_itemData

WorkshopItemUpdate LapinerTools.Steam.UI.SteamWorkshopUIUpload.m_itemData = new WorkshopItemUpdate()
protected

◆ m_pendingImageDownload

WWW LapinerTools.Steam.UI.SteamWorkshopUIUpload.m_pendingImageDownload = null
protected

◆ NAME_INPUT

InputField LapinerTools.Steam.UI.SteamWorkshopUIUpload.NAME_INPUT = null
protected

◆ s_instance

SteamWorkshopUIUpload LapinerTools.Steam.UI.SteamWorkshopUIUpload.s_instance
staticprotected

◆ SCREENSHOT_BUTTON

Button LapinerTools.Steam.UI.SteamWorkshopUIUpload.SCREENSHOT_BUTTON = null
protected

◆ UPLOAD_BUTTON

Button LapinerTools.Steam.UI.SteamWorkshopUIUpload.UPLOAD_BUTTON = null
protected

Property Documentation

◆ Instance

SteamWorkshopUIUpload LapinerTools.Steam.UI.SteamWorkshopUIUpload.Instance
staticget

You can use the static Instance property to access the SteamWorkshopUIUpload class from wherever you need it in your code. Use this property only if you know that you have a static SteamWorkshopUIUpload uGUI in your scene. If you use the SteamWorkshopPopupUpload, then there is no guarantee that the SteamWorkshopUIUpload was already created.

Event Documentation

◆ OnDescriptionSet

System.Action<string> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnDescriptionSet

Invoked when the description InputField (DESCRIPTION_INPUT) is committed.

◆ OnFinishedUpload

System.Action<WorkshopItemUpdateEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnFinishedUpload

Invoked when the upload process is finished successfully.

◆ OnIconFilePathSet

System.Action<string> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnIconFilePathSet

Invoked when the item icon was rendered and is available on disk.

◆ OnIconTextureSet

System.Action<Texture2D> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnIconTextureSet

Invoked when the item icon was rendered and the Textured2D instance is ready to be used.

◆ OnNameSet

System.Action<string> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnNameSet

Invoked when the name InputField (NAME_INPUT) is committed.

◆ OnStartedUpload

System.Action<WorkshopItemUpdateEventArgs> LapinerTools.Steam.UI.SteamWorkshopUIUpload.OnStartedUpload

Invoked when the upload process is started.


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