Highroad Engine v1.3
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.Tools.MMDebugMenuSpriteReplace Class Reference

A class to add to an image to have it act like a button with a different sprite for on and off states More...

Inheritance diagram for MoreMountains.Tools.MMDebugMenuSpriteReplace:
MoreMountains.Tools.MMDebugMenuRadioButton

Public Member Functions

virtual void Initialization ()
 On init, we grab our image component, and set our sprite in its initial state More...
 
virtual void Swap ()
 A public method to change the sprite More...
 
virtual void SwitchToOffSprite ()
 a public method to switch to off sprite directly More...
 
virtual void SwitchToOnSprite ()
 a public method to switch to on sprite directly More...
 

Public Attributes

Sprite OnSprite
 the sprite to use when in the "on" state More...
 
Sprite OffSprite
 the sprite to use when in the "off" state More...
 
bool StartsOn = true
 if this is true, the button will start if "on" state More...
 

Protected Member Functions

virtual void Awake ()
 On Start we initialize our button More...
 
virtual void SpriteOff ()
 sets the image's sprite to off More...
 
virtual void SpriteOn ()
 sets the image's sprite to on More...
 

Protected Attributes

Image _image
 
MMTouchButton _mmTouchButton
 

Properties

bool CurrentValue [get]
 the current state of the button More...
 

Detailed Description

A class to add to an image to have it act like a button with a different sprite for on and off states

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.Awake ( )
protectedvirtual

On Start we initialize our button

◆ Initialization()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.Initialization ( )
virtual

On init, we grab our image component, and set our sprite in its initial state

Reimplemented in MoreMountains.Tools.MMDebugMenuRadioButton.

◆ SpriteOff()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.SpriteOff ( )
protectedvirtual

sets the image's sprite to off

◆ SpriteOn()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.SpriteOn ( )
protectedvirtual

sets the image's sprite to on

Reimplemented in MoreMountains.Tools.MMDebugMenuRadioButton.

◆ Swap()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.Swap ( )
virtual

A public method to change the sprite

◆ SwitchToOffSprite()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.SwitchToOffSprite ( )
virtual

a public method to switch to off sprite directly

◆ SwitchToOnSprite()

virtual void MoreMountains.Tools.MMDebugMenuSpriteReplace.SwitchToOnSprite ( )
virtual

a public method to switch to on sprite directly

Member Data Documentation

◆ _image

Image MoreMountains.Tools.MMDebugMenuSpriteReplace._image
protected

◆ _mmTouchButton

MMTouchButton MoreMountains.Tools.MMDebugMenuSpriteReplace._mmTouchButton
protected

◆ OffSprite

Sprite MoreMountains.Tools.MMDebugMenuSpriteReplace.OffSprite

the sprite to use when in the "off" state

◆ OnSprite

Sprite MoreMountains.Tools.MMDebugMenuSpriteReplace.OnSprite

the sprite to use when in the "on" state

◆ StartsOn

bool MoreMountains.Tools.MMDebugMenuSpriteReplace.StartsOn = true

if this is true, the button will start if "on" state

Property Documentation

◆ CurrentValue

bool MoreMountains.Tools.MMDebugMenuSpriteReplace.CurrentValue
get

the current state of the button


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