Skip to main content

FeedbackInteractionPoint

A class in Root.Township, Alta.UserInterface.

A labelled interact point whose box changes colour when pressed and when disabled.

Constructors​

MemberWhat it is
FeedbackInteractionPoint()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private Color baseColorThe box's colour at enable time.
private Renderer boxRendererRenderer of the box that changes colour.
private Color disabledColorColour while disabled (grey by default).
private Color interactedColorColour while pressed.
private Material materialThe box's material instance.

Methods​

MemberWhat it is
protected override void OnButtonDisabled()Shows the disabled colour, or the base colour when enabled again.
protected override void OnEnable()Gets the box material and its base colour and hooks the press and release events.
2 private and internal methods
MemberWhat it is
private void OnInteracted()Shows the pressed colour.
private void OnReleased()Goes back to the base colour.