Table of Contents

Class UIToggleButton

Namespace
PAC.UI
public class UIToggleButton : MonoBehaviour
Inheritance
UIToggleButton

Fields

height

public float height

Field Value

float

hoverBackgroundTint

public Color hoverBackgroundTint

Field Value

Color

width

public float width

Field Value

float

Properties

hoverImage

public Sprite hoverImage { get; }

Property Value

Sprite

inToggleGroup

public bool inToggleGroup { get; }

Property Value

bool

offBackgroundColour

public Color offBackgroundColour { get; set; }

Property Value

Color

offImage

public Sprite offImage { get; }

Property Value

Sprite

on

public bool on { get; }

Property Value

bool

onBackgroundColour

public Color onBackgroundColour { get; set; }

Property Value

Color

onImage

public Sprite onImage { get; }

Property Value

Sprite

pressedBackgroundColour

public Color pressedBackgroundColour { get; set; }

Property Value

Color

pressedImage

public Sprite pressedImage { get; }

Property Value

Sprite

toggleGroup

public UIToggleGroup toggleGroup { get; }

Property Value

UIToggleGroup

toggleName

public string toggleName { get; set; }

Property Value

string

Methods

JoinToggleGroup(UIToggleGroup)

public void JoinToggleGroup(UIToggleGroup toggleGroup)

Parameters

toggleGroup UIToggleGroup

LeaveToggleGroup()

public void LeaveToggleGroup()

Press()

public void Press()

RightClick()

public void RightClick()

SetImages(Sprite, Sprite, Sprite, Sprite)

public void SetImages(Sprite offImage, Sprite onImage, Sprite hoverImage, Sprite pressedImage)

Parameters

offImage Sprite
onImage Sprite
hoverImage Sprite
pressedImage Sprite

SetOnOff(bool)

public void SetOnOff(bool on)

Parameters

on bool

SetText(string)

public void SetText(string text)

Parameters

text string

SetTextAlignment(TextAnchor)

public void SetTextAlignment(TextAnchor textAlignment)

Parameters

textAlignment TextAnchor

SubscribeToHover(UnityAction)

public void SubscribeToHover(UnityAction call)

Parameters

call UnityAction

SubscribeToLeftClick(UnityAction)

public void SubscribeToLeftClick(UnityAction call)

Parameters

call UnityAction

SubscribeToRightClick(UnityAction)

public void SubscribeToRightClick(UnityAction call)

Parameters

call UnityAction

SubscribeToTurnOff(UnityAction)

public void SubscribeToTurnOff(UnityAction call)

Parameters

call UnityAction

SubscribeToTurnOn(UnityAction)

public void SubscribeToTurnOn(UnityAction call)

Parameters

call UnityAction

UpdateDisplay()

public void UpdateDisplay()