FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.UI.Widgets.Widget Class Reference

Base widget class for FMAR UI widgets. Meant to be inherited from to add any additional desired functionality. More...

Inheritance diagram for FMAR.UI.Widgets.Widget:
CameraRendererWidget FMAR.UI.Widgets.CPRTrainer.CprTrainer FMAR.UI.Widgets.CarDriverSearch.CarDriverSearch FMAR.UI.Widgets.Console.Console FMAR.UI.Widgets.EMS.PatientInfo.PatientInfo FMAR.UI.Widgets.EMS.TraumaTreatment.TraumaTreatment FMAR.UI.Widgets.Inspector.Inspector FMAR.UI.Widgets.Keyboard.Keyboard FMAR.UI.Widgets.Map.Map FMAR.UI.Widgets.Notifications.Notifications FMAR.UI.Widgets.PointsOfInterest.PointsOfInterest FMAR.UI.Widgets.Procedures.Procedures FMAR.UI.Widgets.ServerBrowser.ServerBrowser FMAR.UI.Widgets.VitalsMonitor.MultiPulseVitalsMonitor FMAR.UI.Widgets.VitalsMonitor.VitalsMonitor FireControlsWidget StatsWidget VoiceComms

Public Member Functions

virtual void SetWidgetContainer (WidgetContainer widgetContainer)
 Called when the widget is moved into a new container. Handles widget resizing and repositioning. Can be overridden to provide additional functionality.
 
void SetBorderPositions (Vector2 size)
 Sets the border positions.
 
void UpdateBorderTransparency ()
 Updates the border transparency based on the widget container's border transparency.
 
void DetachFromContainer ()
 Detaches the widget from the widget container.
 
void PlaySound (AudioClip clip)
 Plays a sound localized to the widget.
 
bool TryMove ()
 Tries to move the widget out of the widget container.
 
void SetBackgroundEnabled (bool enabled)
 Sets the background's enabled state.
 

Public Attributes

Sprite widgetIcon
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void Update ()
 
void CreateBorder (Vector2 size)
 Creates a border for the widget, around the edges.
 

Protected Attributes

Image bg
 
RectTransform rt
 
AudioSource aud
 

Properties

WidgetContainer WidgetContainer [get]
 
Vector2 PreferredFloatingDisplaySize [get]
 
Color BackgroundBaseColor [get]
 
RectTransform Rt [get]
 
bool Locked [get]
 

Detailed Description

Base widget class for FMAR UI widgets. Meant to be inherited from to add any additional desired functionality.

Member Function Documentation

◆ Awake()

◆ CreateBorder()

void FMAR.UI.Widgets.Widget.CreateBorder ( Vector2 size)
inlineprotected

Creates a border for the widget, around the edges.

Parameters
sizeThe size of the border.

◆ DetachFromContainer()

void FMAR.UI.Widgets.Widget.DetachFromContainer ( )
inline

Detaches the widget from the widget container.

◆ PlaySound()

void FMAR.UI.Widgets.Widget.PlaySound ( AudioClip clip)
inline

Plays a sound localized to the widget.

Parameters
clipThe clip to play.

◆ SetBackgroundEnabled()

void FMAR.UI.Widgets.Widget.SetBackgroundEnabled ( bool enabled)
inline

Sets the background's enabled state.

Parameters
enabledWhether the background should be enabled.

◆ SetBorderPositions()

void FMAR.UI.Widgets.Widget.SetBorderPositions ( Vector2 size)
inline

Sets the border positions.

Parameters
sizeThe size of the border.

◆ SetWidgetContainer()

◆ Start()

◆ TryMove()

bool FMAR.UI.Widgets.Widget.TryMove ( )
inline

Tries to move the widget out of the widget container.

Returns
Whether the widget was moved.

◆ Update()

◆ UpdateBorderTransparency()

void FMAR.UI.Widgets.Widget.UpdateBorderTransparency ( )
inline

Updates the border transparency based on the widget container's border transparency.

Member Data Documentation

◆ aud

AudioSource FMAR.UI.Widgets.Widget.aud
protected

◆ bg

Image FMAR.UI.Widgets.Widget.bg
protected

◆ rt

RectTransform FMAR.UI.Widgets.Widget.rt
protected

◆ widgetIcon

Sprite FMAR.UI.Widgets.Widget.widgetIcon

Property Documentation

◆ BackgroundBaseColor

Color FMAR.UI.Widgets.Widget.BackgroundBaseColor
get

◆ Locked

bool FMAR.UI.Widgets.Widget.Locked
get

◆ PreferredFloatingDisplaySize

Vector2 FMAR.UI.Widgets.Widget.PreferredFloatingDisplaySize
get

◆ Rt

RectTransform FMAR.UI.Widgets.Widget.Rt
get

◆ WidgetContainer

WidgetContainer FMAR.UI.Widgets.Widget.WidgetContainer
get

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