Table of Contents

Class UIButton

Namespace
PAC.UI
public class UIButton : MonoBehaviour
Inheritance
UIButton

Fields

backgroundColour

public Color backgroundColour

Field Value

Color

backgroundHoverColour

public Color backgroundHoverColour

Field Value

Color

backgroundPressedColour

public Color backgroundPressedColour

Field Value

Color

Properties

height

public float height { get; set; }

Property Value

float

hoverImage

public Sprite hoverImage { get; }

Property Value

Sprite

image

public Sprite image { get; }

Property Value

Sprite

isPressed

public bool isPressed { get; }

Property Value

bool

pressedImage

public Sprite pressedImage { get; }

Property Value

Sprite

width

public float width { get; set; }

Property Value

float

Methods

Press()

public void Press()

RightClick()

public void RightClick()

SetImages(Sprite, Sprite, Sprite)

public void SetImages(Sprite image, Sprite hoverImage, Sprite pressedImage)

Parameters

image Sprite
hoverImage Sprite
pressedImage Sprite

SetSortingLayer(string)

public void SetSortingLayer(string sortingLayer)

Parameters

sortingLayer string

SetSortingLayer(string, int)

public void SetSortingLayer(string sortingLayer, int sortingOrder)

Parameters

sortingLayer string
sortingOrder int

SetSortingOrder(int)

public void SetSortingOrder(int sortingOrder)

Parameters

sortingOrder int

SetText(string)

public void SetText(string text)

Parameters

text string

SubscribeToClick(UnityAction)

public void SubscribeToClick(UnityAction call)

Parameters

call UnityAction

SubscribeToHover(UnityAction)

public void SubscribeToHover(UnityAction call)

Parameters

call UnityAction

SubscribeToIdle(UnityAction)

public void SubscribeToIdle(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

UpdateDisplay()

public void UpdateDisplay()