FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.UI.CustomComponents.Button Class Reference

A custom button used in FMAR interfaces. Normal Unity buttons don't have the notion of depth, so this button allows visual feedback of how much the button has been pressed. More...

Inheritance diagram for FMAR.UI.CustomComponents.Button:

Public Member Functions

void OnPointerDown (PointerEventData eventData)
 Fired when the pointer is pressed down on the button.
 
void OnPointerUp (PointerEventData eventData)
 Fired when the pointer is released on the button.
 
void OnPointerEnter (PointerEventData eventData)
 Fired when the pointer is hovering over the button.
 
void OnPointerExit (PointerEventData eventData)
 Fired when the pointer is no longer hovering over the button.
 
void SetText (string textContent)
 Sets the text displayed within the button.
 
void SetColors (Color baseColor, float baseAlpha)
 Sets the colors of the button, including the default, mouseover, and pressed colors.
 

Public Attributes

Action onDown
 Event triggered when the button is pressed down.
 
bool interactable = true
 Indicates whether the button is able to be used.
 

Detailed Description

A custom button used in FMAR interfaces. Normal Unity buttons don't have the notion of depth, so this button allows visual feedback of how much the button has been pressed.

Member Function Documentation

◆ OnPointerDown()

void FMAR.UI.CustomComponents.Button.OnPointerDown ( PointerEventData eventData)
inline

Fired when the pointer is pressed down on the button.

Parameters
eventDataPointer event data.

◆ OnPointerEnter()

void FMAR.UI.CustomComponents.Button.OnPointerEnter ( PointerEventData eventData)
inline

Fired when the pointer is hovering over the button.

Parameters
eventDataPointer event data.

◆ OnPointerExit()

void FMAR.UI.CustomComponents.Button.OnPointerExit ( PointerEventData eventData)
inline

Fired when the pointer is no longer hovering over the button.

Parameters
eventDataPointer event data.

◆ OnPointerUp()

void FMAR.UI.CustomComponents.Button.OnPointerUp ( PointerEventData eventData)
inline

Fired when the pointer is released on the button.

Parameters
eventDataPointer event data.

◆ SetColors()

void FMAR.UI.CustomComponents.Button.SetColors ( Color baseColor,
float baseAlpha )
inline

Sets the colors of the button, including the default, mouseover, and pressed colors.

Parameters
baseColorThe base color.
baseAlphaThe base alpha value.

◆ SetText()

void FMAR.UI.CustomComponents.Button.SetText ( string textContent)
inline

Sets the text displayed within the button.

Parameters
textContentThe text content to set.

Member Data Documentation

◆ interactable

bool FMAR.UI.CustomComponents.Button.interactable = true

Indicates whether the button is able to be used.

◆ onDown

Action FMAR.UI.CustomComponents.Button.onDown

Event triggered when the button is pressed down.


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