Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Chunks.Interface.MenuPanel Class Reference

A surface with interactive graphical user interface controls displayed on it. More...

Inheritance diagram for Chunks.Interface.MenuPanel:

Public Member Functions

 MenuPanel ()
 
void EaseToTransform (Vector localPosition, Geometry.Quaternion localRotation, float localScale)
 
void EmitSound (ResourceName name)
 
void Hide ()
 
void Show ()
 
TControl SetRootControl< TControl > ()
 Replaces the top level control of this MenuPanel with a new instance of the specified Control type. More...
 
Control SetRootControl (ResourceName resourceName)
 Replaces the top level control of this MenuPanel with a new instance using layout data loaded from a control layout resource with the given name. More...
 
bool Raycast (Geometry.Ray ray, bool ignoreReverse, out MenuPanelRaycastHit hit)
 Tests to see if a ray will hit this MenuPanel, and outputs some information about it if a hit is detected. More...
 

Public Attributes

Entities.Transform ControlParent => _behaviour.GetControlParent()
 The transform of the Entity that Control instances are attached to. More...
 
Vector PanelSize => new Vector(Properties.WidthPixels, Properties.HeightPixels)/Properties.PixelsPerMetre
 World space width and height of the panel before scaling. More...
 

Protected Member Functions

override void OnInitialize ()
 Called only once, when the component is first attached to an entity and is ready to add or retrieve other components. More...
 
override void OnEnable ()
 
override void OnDisable ()
 
override void OnDestroy ()
 Called when this component is removed, or the parent entity is destroyed. More...
 

Properties

MenuPanelProperties Properties [get]
 
MenuParent MenuParent [get]
 
SoundEmitter SoundEmitter [get]
 
Wand CurrentlyHoldingWand [get, set]
 
Control RootControl [get]
 Gets the current top-level control of the GUI attached to this MenuPanel. More...
 

Detailed Description

A surface with interactive graphical user interface controls displayed on it.

Constructor & Destructor Documentation

Chunks.Interface.MenuPanel.MenuPanel ( )

Member Function Documentation

void Chunks.Interface.MenuPanel.EaseToTransform ( Vector  localPosition,
Geometry.Quaternion  localRotation,
float  localScale 
)
void Chunks.Interface.MenuPanel.EmitSound ( ResourceName  name)
void Chunks.Interface.MenuPanel.Hide ( )
override void Chunks.Interface.MenuPanel.OnDestroy ( )
protected

Called when this component is removed, or the parent entity is destroyed.

override void Chunks.Interface.MenuPanel.OnDisable ( )
protected
override void Chunks.Interface.MenuPanel.OnEnable ( )
protected
override void Chunks.Interface.MenuPanel.OnInitialize ( )
protected

Called only once, when the component is first attached to an entity and is ready to add or retrieve other components.

bool Chunks.Interface.MenuPanel.Raycast ( Geometry.Ray  ray,
bool  ignoreReverse,
out MenuPanelRaycastHit  hit 
)

Tests to see if a ray will hit this MenuPanel, and outputs some information about it if a hit is detected.

Parameters
rayRay to test for a hit with.
hitOutputs information if a hit is found.
ignoreReverseIf true, only cases where the ray hits the inside surface are considered.
Control Chunks.Interface.MenuPanel.SetRootControl ( ResourceName  resourceName)

Replaces the top level control of this MenuPanel with a new instance using layout data loaded from a control layout resource with the given name.

Parameters
resourceNameName of the control layout resource to use.

Replaces the top level control of this MenuPanel with a new instance of the specified Control type.

Template Parameters
TControlType of Control to create.
Type Constraints
TControl :Control 
TControl :new() 
void Chunks.Interface.MenuPanel.Show ( )

Member Data Documentation

Entities.Transform Chunks.Interface.MenuPanel.ControlParent => _behaviour.GetControlParent()

The transform of the Entity that Control instances are attached to.

Vector Chunks.Interface.MenuPanel.PanelSize => new Vector(Properties.WidthPixels, Properties.HeightPixels)/Properties.PixelsPerMetre

World space width and height of the panel before scaling.

Property Documentation

Wand Chunks.Interface.MenuPanel.CurrentlyHoldingWand
getset
MenuParent Chunks.Interface.MenuPanel.MenuParent
get
MenuPanelProperties Chunks.Interface.MenuPanel.Properties
get
Control Chunks.Interface.MenuPanel.RootControl
get

Gets the current top-level control of the GUI attached to this MenuPanel.

SoundEmitter Chunks.Interface.MenuPanel.SoundEmitter
get

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