PixelCrushers.DialogueSystem.UnityGUI.GUIControl Class Reference

The basic GUI control, which simply contains child controls. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UnityGUI.GUIControl:
Collaboration diagram for PixelCrushers.DialogueSystem.UnityGUI.GUIControl:

Public Member Functions

virtual void Awake ()
 
virtual void OnEnable ()
 Checks if the control needs to enable the first child for key/controller navigation. More...
 
void Draw (Vector2 relativeMousePosition)
 Draw the control and its children. More...
 
virtual void DrawSelf (Vector2 relativeMousePosition)
 Draws the control, but not its children. More...
 
virtual void DrawChildren (Vector2 relativeMousePosition)
 Draws the children, taking into account key/controller navigation if enabled. More...
 
virtual void Update ()
 If navigation is enabled, check if the selection button was pressed. More...
 
virtual void Refresh (Vector2 windowSize)
 Marks a control as needing to update its layout. More...
 
virtual void Refresh ()
 
virtual void UpdateLayout ()
 Updates the layout (size, position, formatting, etc.) of the control and its children. More...
 
virtual void UpdateLayoutSelf ()
 Updates the control's layout but not its children. More...
 
virtual void AutoSizeSelf ()
 Auto-sizes the control according to the autoSize settings. More...
 

Public Attributes

int depth = 0
 The drawing order depth. More...
 
bool depthSortChildren = false
 If true, children are drawn in depth order; otherwise no specific order. More...
 
ScaledRect scaledRect = new ScaledRect(ScaledRect.wholeScreen)
 The scaled rect defining the position of the control. More...
 
AutoSize autoSize
 Auto-size settings. More...
 
Fit fit
 Fit settings. More...
 
Navigation navigation
 Keyboard/controller navigation settings. More...
 
bool visible = true
 If true, this control and its children are visible. More...
 
bool clipChildren = true
 Clip children to the control's bounds? More...
 

Protected Member Functions

virtual void FitSelf ()
 Fits the control according to the fit settings. More...
 

Properties

Rect rect [get, set]
 The pixel rect represented by scaledRect. More...
 
Vector2 Offset [get, set]
 Gets or sets the offset to apply to the screen rect for this control; useful for manual repositioning outside the normal GUI control system. More...
 
List< GUIControlChildren [get]
 The child controls. More...
 
bool NeedToUpdateLayout [get, set]
 When true, the control needs to update its style, size, position, etc. More...
 
Vector2 WindowSize [get, set]
 The size of the window most recently passed to Refresh(). More...
 
bool IsNavigationEnabled [get]
 Gets a value indicating whether keyboard/controller navigation is enabled. More...
 
string FullName [get]
 Gets the full name of the GameObject, used to focus the control when using keyboard/controller navigation. More...
 
Vector2 dRect [get, set]
 Gets or sets dRect, which offsets the rect when the parent window isn't clipping. More...
 

Detailed Description

The basic GUI control, which simply contains child controls.

Member Function Documentation

◆ AutoSizeSelf()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.AutoSizeSelf ( )
virtual

Auto-sizes the control according to the autoSize settings.

Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl.

◆ Awake()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Awake ( )
virtual

◆ Draw()

void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Draw ( Vector2  relativeMousePosition)

Draw the control and its children.

Parameters
relativeMousePositionRelative mouse position within the window containing this control.

◆ DrawChildren()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.DrawChildren ( Vector2  relativeMousePosition)
virtual

Draws the children, taking into account key/controller navigation if enabled.

Parameters
relativeMousePositionRelative mouse position.

Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIScrollView, and PixelCrushers.DialogueSystem.UnityGUI.GUIWindow.

◆ DrawSelf()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.DrawSelf ( Vector2  relativeMousePosition)
virtual

◆ FitSelf()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.FitSelf ( )
protectedvirtual

Fits the control according to the fit settings.

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.OnEnable ( )
virtual

Checks if the control needs to enable the first child for key/controller navigation.

◆ Refresh() [1/2]

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Refresh ( )
virtual

◆ Refresh() [2/2]

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Refresh ( Vector2  windowSize)
virtual

Marks a control as needing to update its layout.

Parameters
windowSizeWindow size.

◆ Update()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Update ( )
virtual

If navigation is enabled, check if the selection button was pressed.

Remember the value so we can check it in DrawChildren.

Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIButton.

◆ UpdateLayout()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.UpdateLayout ( )
virtual

Updates the layout (size, position, formatting, etc.) of the control and its children.

◆ UpdateLayoutSelf()

virtual void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.UpdateLayoutSelf ( )
virtual

Updates the control's layout but not its children.

Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl.

Member Data Documentation

◆ autoSize

AutoSize PixelCrushers.DialogueSystem.UnityGUI.GUIControl.autoSize

Auto-size settings.

These specify whether and how to auto-size to fit the contents.

◆ clipChildren

bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.clipChildren = true

Clip children to the control's bounds?

◆ depth

int PixelCrushers.DialogueSystem.UnityGUI.GUIControl.depth = 0

The drawing order depth.

Higher numbers get drawn after lower numbers.

◆ depthSortChildren

bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.depthSortChildren = false

If true, children are drawn in depth order; otherwise no specific order.

◆ fit

Fit PixelCrushers.DialogueSystem.UnityGUI.GUIControl.fit

Fit settings.

These specify how to fit around other controls.

◆ navigation

Navigation PixelCrushers.DialogueSystem.UnityGUI.GUIControl.navigation

Keyboard/controller navigation settings.

◆ scaledRect

ScaledRect PixelCrushers.DialogueSystem.UnityGUI.GUIControl.scaledRect = new ScaledRect(ScaledRect.wholeScreen)

The scaled rect defining the position of the control.

◆ visible

bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.visible = true

If true, this control and its children are visible.

Property Documentation

◆ Children

List<GUIControl> PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Children
getprotected

The child controls.

◆ dRect

Vector2 PixelCrushers.DialogueSystem.UnityGUI.GUIControl.dRect
getset

Gets or sets dRect, which offsets the rect when the parent window isn't clipping.

◆ FullName

string PixelCrushers.DialogueSystem.UnityGUI.GUIControl.FullName
get

Gets the full name of the GameObject, used to focus the control when using keyboard/controller navigation.

The full name.

◆ IsNavigationEnabled

bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.IsNavigationEnabled
get

Gets a value indicating whether keyboard/controller navigation is enabled.

◆ NeedToUpdateLayout

bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.NeedToUpdateLayout
getset

When true, the control needs to update its style, size, position, etc.

Use the Refresh() method to set this to true.

◆ Offset

Vector2 PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Offset
getset

Gets or sets the offset to apply to the screen rect for this control; useful for manual repositioning outside the normal GUI control system.

The offset.

◆ rect

Rect PixelCrushers.DialogueSystem.UnityGUI.GUIControl.rect
getset

The pixel rect represented by scaledRect.

The pixel rect.

◆ WindowSize

Vector2 PixelCrushers.DialogueSystem.UnityGUI.GUIControl.WindowSize
getsetprotected

The size of the window most recently passed to Refresh().

Used to update the control's layout.


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