C# Class RSTUtils.AppLauncherToolBar

Mostra file Open project: KSP-RO/TacLifeSupport Class Usage Examples

Public Methods

Method Description
AppLauncherToolBar ( string toolBarName, string toolBarToolTip, string toolBarTexturePath, ApplicationLauncher VisibleinScenes, UnityEngine appbtnTexON, UnityEngine appbtnTexOFF ) : System

Constructor for AppLauncherToolBar. You need to construct one of these for your Mod Menu/GUI environment.

Destroy ( ) : void

This Class is not using MonoBehaviour but has a Destroy Method that must be called. Call this in your OnDestroy Method for a Mod GUI/Menu Class.

Start ( bool stock ) : void

This Class is not using MonoBehaviour but has a Start Method that must be called. Call this in your Start Method for a Mod GUI/Menu Class.

chgAppIconStockToolBar ( bool stock ) : void

Call this to change from AppLauncher to Toobar or vice-versa. Will Destroy ToolBar or AppLauncher Icon and create a new one.

onAppLaunchToggle ( ) : void
setAppLSceneVisibility ( ApplicationLauncher visibleinScenes ) : void

Sets the Applauncher Icon visible or not. To be extended in future to not require calling from Mod. Currently it is because I haven't incorporated the mod's Setting for Whether the user wants to use Stock AppLauncher or Toolbar.

setAppLauncherTexture ( Texture icontoSet ) : void

Change the AppLauncher Icon Texture - to say change the Icon

setToolBarBtnVisibility ( bool visible ) : void

Sets the ToolBar Icon visible or not. To be extended in future to not require calling from Mod. Currently it is because I haven't incorporated the mod's Setting for Whether the user wants to use Stock AppLauncher or Toolbar.

setToolBarTexturePath ( string icontoSet ) : void

Change the ToolBar TexturePath - to say change the Icon

Private Methods

Method Description
CreateStockButton ( ) : void
CreateToolBar ( ) : void
DestroyStockButton ( ) : void
DestroyToolBar ( ) : void
DummyVoid ( ) : void
GamePaused ( ) : void
GameUnPaused ( ) : void
OnGUIAppLauncherReady ( ) : void
OnGameSceneLoadRequestedForAppLauncher ( GameScenes SceneToLoad ) : void
onHideUI ( ) : void
onHoverOff ( ) : void
onHoverOn ( ) : void
onShowUI ( ) : void

Method Details

AppLauncherToolBar() public method

Constructor for AppLauncherToolBar. You need to construct one of these for your Mod Menu/GUI environment.
public AppLauncherToolBar ( string toolBarName, string toolBarToolTip, string toolBarTexturePath, ApplicationLauncher VisibleinScenes, UnityEngine appbtnTexON, UnityEngine appbtnTexOFF ) : System
toolBarName string A string passed into ToolBar indicating the Name of the Mod
toolBarToolTip string A string passed into ToolBar to use for the Icon ToolTip
toolBarTexturePath string A string in ToolBar expected format of the TexturePath for the ToolBarIcon
VisibleinScenes ApplicationLauncher ApplicationLauncher.AppScenes list - logically OR'd
appbtnTexON UnityEngine Texture reference for the AppLauncher ON Icon
appbtnTexOFF UnityEngine Texture reference for the AppLauncher OFF Icon
return System

Destroy() public method

This Class is not using MonoBehaviour but has a Destroy Method that must be called. Call this in your OnDestroy Method for a Mod GUI/Menu Class.
public Destroy ( ) : void
return void

Start() public method

This Class is not using MonoBehaviour but has a Start Method that must be called. Call this in your Start Method for a Mod GUI/Menu Class.
public Start ( bool stock ) : void
stock bool True if we are to use the Stock Applauncher, False to use ToolBar mod
return void

chgAppIconStockToolBar() public method

Call this to change from AppLauncher to Toobar or vice-versa. Will Destroy ToolBar or AppLauncher Icon and create a new one.
public chgAppIconStockToolBar ( bool stock ) : void
stock bool True if using AppLauncher, False if using ToolBar
return void

onAppLaunchToggle() public method

public onAppLaunchToggle ( ) : void
return void

setAppLSceneVisibility() public method

Sets the Applauncher Icon visible or not. To be extended in future to not require calling from Mod. Currently it is because I haven't incorporated the mod's Setting for Whether the user wants to use Stock AppLauncher or Toolbar.
public setAppLSceneVisibility ( ApplicationLauncher visibleinScenes ) : void
visibleinScenes ApplicationLauncher
return void

setAppLauncherTexture() public method

Change the AppLauncher Icon Texture - to say change the Icon
public setAppLauncherTexture ( Texture icontoSet ) : void
icontoSet UnityEngine.Texture Texture to set Icon to
return void

setToolBarBtnVisibility() public method

Sets the ToolBar Icon visible or not. To be extended in future to not require calling from Mod. Currently it is because I haven't incorporated the mod's Setting for Whether the user wants to use Stock AppLauncher or Toolbar.
public setToolBarBtnVisibility ( bool visible ) : void
visible bool True if set to visible, false will turn it off
return void

setToolBarTexturePath() public method

Change the ToolBar TexturePath - to say change the Icon
public setToolBarTexturePath ( string icontoSet ) : void
icontoSet string string in ToolBar TexturePath format
return void