Skip to main content

IUIInterface

Interface for handling user interface related functions

Namespace: VNyanInterface

Events​

colorThemeChanged​

Triggers when the color theme is changed by the user

Methods​

getCurrentThemeColor​

Get the color for the specified component in the current VNyan Color Theme

getCurrentThemeColor(ThemeComponent)
ParameterTypeDescription
—ThemeComponent

Returns: an HTML hex code for the provided ThemeComponent in the currently selected theme

registerPluginButton​

Register plugin window button with callback

registerPluginButton(string buttonText, IButtonClickedHandler clickCallback)
ParameterTypeDescription
buttonTextstringButton text
clickCallbackIButtonClickedHandlerCallback class

instantiateUIPrefab​

Instantiates prefab to VNyan's UI canvas

instantiateUIPrefab(object gameObject)
ParameterTypeDescription
gameObjectobjectPrefab to instantiate

Returns: Instantiated GameObject

openSaveFileDialog​

Opens a save file dialog

openSaveFileDialog(string header, string[] extensions)
ParameterTypeDescription
headerstringDialog header text
extensionsstring[]File extensions to support (without the dot)

Returns: Name of the file to save or null if dialog was closed

openLoadFileDialog​

Opens a load file dialog

openLoadFileDialog(string header, string[] extensions)
ParameterTypeDescription
headerstringDialog header text
extensionsstring[]File extensions to support (without the dot)

Returns: Name of the file to load or null if dialog was closed