A GUI control that implements GUI.Button with optional additional textures. More...
Public Member Functions | |
override void | DrawSelf (Vector2 relativeMousePosition) |
Draws the control, but not its children. More... | |
override void | Update () |
Checks if the button has been "clicked" by the trigger key or input button. More... | |
void | Click () |
Clicks the button. More... | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl | |
override void | Awake () |
virtual void | Start () |
void | UseLocalizedText (LocalizedTextTable localizedText) |
void | ApplyAlphaToGUIColor () |
void | RestoreGUIColor () |
virtual void | SetFormattedText (FormattedText formattedText) |
Sets the control's text and formatting. More... | |
void | SetUnformattedText (string text) |
Sets the control's text and formatting using just raw text. More... | |
override void | UpdateLayoutSelf () |
Updates the control's layout but not its children. More... | |
override void | AutoSizeSelf () |
Auto-sizes the control according to the autoSize settings. More... | |
void | PlaySound (AudioClip audioClip) |
Plays an audio clip. More... | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIControl | |
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 | DrawChildren (Vector2 relativeMousePosition) |
Draws the children, taking into account key/controller navigation if enabled. 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... | |
Public Attributes | |
bool | clickable = true |
Is the button clickable (active)? More... | |
GUIImageParams | disabled |
The disabled image. More... | |
GUIImageParams | normal |
The normal image. More... | |
GUIImageParams | hover |
The hover image. More... | |
GUIImageParams | pressed |
The pressed image. More... | |
AudioClip | hoverSound = null |
AudioClip | clickSound = null |
InputTrigger | trigger |
The input that triggers the button (an alternative to using the mouse to click it). More... | |
string | message = "OnClick" |
The message to send to the target when the button is clicked. More... | |
string | parameter |
The parameter for the message sent to the target. More... | |
Transform | target |
The target to send the message to. More... | |
object | data |
The data to send to the target as a parameter to the message. More... | |
Public Attributes inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl | |
LocalizedTextTable | localizedText |
The (optional) localized text table to use. More... | |
string | text |
The text content, or the name of the field in the localized text table. More... | |
string | guiStyleName |
The name of the GUI style to use to draw the text. More... | |
Public Attributes inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIControl | |
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... | |
Properties | |
override GUIStyle | DefaultGUIStyle [get] |
Gets the default GUI style to use for this type of control. More... | |
Properties inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl | |
float | Alpha [get, set] |
Gets or sets the alpha (transparency) value. More... | |
bool | HasAlpha [get] |
Gets a value indicating whether this instance has an alpha that isn't fully opaque. More... | |
virtual GUIStyle | DefaultGUIStyle [get] |
Gets the default GUI style to use for this type of control. More... | |
GUIStyle | GuiStyle [get, set] |
The current GUI style. More... | |
Properties inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIControl | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIVisibleControl | |
void | SetGUIStyle () |
Makes sure the guiStyle property is up-to-date. More... | |
void | ApplyFormatting () |
Applies the formatting recorded in formattingToApply by SetFormattedText(). More... | |
Protected Member Functions inherited from PixelCrushers.DialogueSystem.UnityGUI.GUIControl | |
virtual void | FitSelf () |
Fits the control according to the fit settings. More... | |
A GUI control that implements GUI.Button with optional additional textures.
void PixelCrushers.DialogueSystem.UnityGUI.GUIButton.Click | ( | ) |
Clicks the button.
You can call this manually to simulate a mouse click.
|
virtual |
Draws the control, but not its children.
relativeMousePosition | Relative mouse position within the window containing this control. |
Reimplemented from PixelCrushers.DialogueSystem.UnityGUI.GUIControl.
|
virtual |
Checks if the button has been "clicked" by the trigger key or input button.
Reimplemented from PixelCrushers.DialogueSystem.UnityGUI.GUIControl.
bool PixelCrushers.DialogueSystem.UnityGUI.GUIButton.clickable = true |
Is the button clickable (active)?
AudioClip PixelCrushers.DialogueSystem.UnityGUI.GUIButton.clickSound = null |
object PixelCrushers.DialogueSystem.UnityGUI.GUIButton.data |
The data to send to the target as a parameter to the message.
If this field is assigned, the button will send it. Otherwise, if the parameter string is set, it will send the string. Otherwise, it will send a reference to this button itself.
GUIImageParams PixelCrushers.DialogueSystem.UnityGUI.GUIButton.disabled |
The disabled image.
GUIImageParams PixelCrushers.DialogueSystem.UnityGUI.GUIButton.hover |
The hover image.
AudioClip PixelCrushers.DialogueSystem.UnityGUI.GUIButton.hoverSound = null |
string PixelCrushers.DialogueSystem.UnityGUI.GUIButton.message = "OnClick" |
The message to send to the target when the button is clicked.
GUIImageParams PixelCrushers.DialogueSystem.UnityGUI.GUIButton.normal |
The normal image.
string PixelCrushers.DialogueSystem.UnityGUI.GUIButton.parameter |
The parameter for the message sent to the target.
If the data field (below) is assigned, the button will send the data. Otherwise, if the parameter string is set, it will send the string. Otherwise, it will send a reference to this button itself.
GUIImageParams PixelCrushers.DialogueSystem.UnityGUI.GUIButton.pressed |
The pressed image.
Transform PixelCrushers.DialogueSystem.UnityGUI.GUIButton.target |
The target to send the message to.
InputTrigger PixelCrushers.DialogueSystem.UnityGUI.GUIButton.trigger |
The input that triggers the button (an alternative to using the mouse to click it).
|
getprotected |
Gets the default GUI style to use for this type of control.
It can be overridden on a per-control basis using guiStyleName.
The default GUI style.