The basic GUI control, which simply contains child controls. More...
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< GUIControl > | Children [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... | |
The basic GUI control, which simply contains child controls.
|
virtual |
Auto-sizes the control according to the autoSize settings.
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl.
|
virtual |
void PixelCrushers.DialogueSystem.UnityGUI.GUIControl.Draw | ( | Vector2 | relativeMousePosition | ) |
Draw the control and its children.
relativeMousePosition | Relative mouse position within the window containing this control. |
|
virtual |
Draws the children, taking into account key/controller navigation if enabled.
relativeMousePosition | Relative mouse position. |
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIScrollView, and PixelCrushers.DialogueSystem.UnityGUI.GUIWindow.
|
virtual |
Draws the control, but not its children.
relativeMousePosition | Relative mouse position within the window containing this control. |
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUILabel, PixelCrushers.DialogueSystem.UnityGUI.GUIButton, PixelCrushers.DialogueSystem.UnityGUI.GUITextField, PixelCrushers.DialogueSystem.UnityGUI.GUIProgressBar, PixelCrushers.DialogueSystem.UnityGUI.GUIWindow, and PixelCrushers.DialogueSystem.UnityGUI.GUIImage.
|
protectedvirtual |
Fits the control according to the fit settings.
|
virtual |
Checks if the control needs to enable the first child for key/controller navigation.
|
virtual |
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUILabel, and PixelCrushers.DialogueSystem.UnityGUI.GUIImage.
|
virtual |
Marks a control as needing to update its layout.
windowSize | Window size. |
|
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.
|
virtual |
Updates the layout (size, position, formatting, etc.) of the control and its children.
|
virtual |
Updates the control's layout but not its children.
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl.
AutoSize PixelCrushers.DialogueSystem.UnityGUI.GUIControl.autoSize |
Auto-size settings.
These specify whether and how to auto-size to fit the contents.
bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.clipChildren = true |
Clip children to the control's bounds?
int PixelCrushers.DialogueSystem.UnityGUI.GUIControl.depth = 0 |
The drawing order depth.
Higher numbers get drawn after lower numbers.
bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.depthSortChildren = false |
If true
, children are drawn in depth order; otherwise no specific order.
Fit PixelCrushers.DialogueSystem.UnityGUI.GUIControl.fit |
Fit settings.
These specify how to fit around other controls.
Navigation PixelCrushers.DialogueSystem.UnityGUI.GUIControl.navigation |
Keyboard/controller navigation settings.
ScaledRect PixelCrushers.DialogueSystem.UnityGUI.GUIControl.scaledRect = new ScaledRect(ScaledRect.wholeScreen) |
The scaled rect defining the position of the control.
bool PixelCrushers.DialogueSystem.UnityGUI.GUIControl.visible = true |
If true
, this control and its children are visible.
|
getprotected |
The child controls.
|
getset |
Gets or sets dRect, which offsets the rect when the parent window isn't clipping.
|
get |
Gets the full name of the GameObject, used to focus the control when using keyboard/controller navigation.
The full name.
|
get |
Gets a value indicating whether keyboard/controller navigation is enabled.
|
getset |
When true
, the control needs to update its style, size, position, etc.
Use the Refresh() method to set this to true
.
|
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.
|
getset |
The pixel rect represented by scaledRect.
The pixel rect.
|
getsetprotected |
The size of the window most recently passed to Refresh().
Used to update the control's layout.