|
NGUI: Next-Gen UI kit
3.7.2
|
Similar to UIButtonColor, but adds a 'disabled' state based on whether the collider is enabled or not. More...
Public Member Functions | |
| override void | SetState (State state, bool immediate) |
| Change the visual state. More... | |
Public Member Functions inherited from UIButtonColor | |
| void | ResetDefaultColor () |
| Reset the default color to what the button started with. More... | |
| void | UpdateColor (bool instant) |
| Update the button's color. Call this method after changing the colors of the button at run-time. More... | |
Public Attributes | |
| bool | dragHighlight = false |
| Whether the button will highlight when you drag something over it. More... | |
| string | hoverSprite |
| Name of the hover state sprite. More... | |
| string | pressedSprite |
| Name of the pressed sprite. More... | |
| string | disabledSprite |
| Name of the disabled sprite. More... | |
| UnityEngine.Sprite | hoverSprite2D |
| Name of the hover state sprite. More... | |
| UnityEngine.Sprite | pressedSprite2D |
| Name of the pressed sprite. More... | |
| UnityEngine.Sprite | disabledSprite2D |
| Name of the disabled sprite. More... | |
| bool | pixelSnap = false |
| Whether the sprite changes will elicit a call to MakePixelPerfect() or not. More... | |
| List< EventDelegate > | onClick = new List<EventDelegate>() |
| Click event listener. More... | |
Public Attributes inherited from UIButtonColor | |
| GameObject | tweenTarget |
| Target with a widget, renderer, or light that will have its color tweened. More... | |
| Color | hover = new Color(225f / 255f, 200f / 255f, 150f / 255f, 1f) |
| Color to apply on hover event (mouse only). More... | |
| Color | pressed = new Color(183f / 255f, 163f / 255f, 123f / 255f, 1f) |
| Color to apply on the pressed event. More... | |
| Color | disabledColor = Color.grey |
| Color that will be applied when the button is disabled. More... | |
| float | duration = 0.2f |
| Duration of the tween process. More... | |
Static Public Attributes | |
| static UIButton | current |
| Current button that sent out the onClick event. More... | |
Protected Member Functions | |
| override void | OnInit () |
| Cache the sprite we'll be working with. More... | |
| override void | OnEnable () |
| Set the initial state. More... | |
| override void | OnDragOver () |
| Drag over state logic is a bit different for the button. More... | |
| override void | OnDragOut () |
| Drag out state logic is a bit different for the button. More... | |
| virtual void | OnClick () |
| Call the listener function. More... | |
| void | SetSprite (string sp) |
| Convenience function that changes the sprite. More... | |
| void | SetSprite (UnityEngine.Sprite sp) |
| Convenience function that changes the sprite. More... | |
Protected Member Functions inherited from UIButtonColor | |
| virtual void | OnDisable () |
| Reset the initial state. More... | |
| virtual void | OnHover (bool isOver) |
| Set the hover state. More... | |
| virtual void | OnPress (bool isPressed) |
| Set the pressed state. More... | |
| virtual void | OnSelect (bool isSelected) |
| Set the selected state. More... | |
Properties | |
| override bool | isEnabled [get, set] |
| Whether the button should be enabled. More... | |
| string | normalSprite [get, set] |
| Convenience function that changes the normal sprite. More... | |
| UnityEngine.Sprite | normalSprite2D [get, set] |
| Convenience function that changes the normal sprite. More... | |
Properties inherited from UIButtonColor | |
| State | state [get, set] |
| Button's current state. More... | |
| Color | defaultColor [get, set] |
| UIButtonColor's default (starting) color. It's useful to be able to change it, just in case. More... | |
| virtual bool | isEnabled [get, set] |
| Whether the script should be active or not. More... | |
Additional Inherited Members | |
Public Types inherited from UIButtonColor | |
| enum | State { State.Normal, State.Hover, State.Pressed, State.Disabled } |
Protected Attributes inherited from UIButtonColor | |
| Color | mStartingColor |
| Color | mDefaultColor |
| bool | mInitDone = false |
| UIWidget | mWidget |
| State | mState = State.Normal |
Similar to UIButtonColor, but adds a 'disabled' state based on whether the collider is enabled or not.
|
protectedvirtual |
Call the listener function.
|
protectedvirtual |
Drag out state logic is a bit different for the button.
Reimplemented from UIButtonColor.
|
protectedvirtual |
Drag over state logic is a bit different for the button.
Reimplemented from UIButtonColor.
|
protectedvirtual |
Set the initial state.
Reimplemented from UIButtonColor.
|
protectedvirtual |
Cache the sprite we'll be working with.
Reimplemented from UIButtonColor.
|
protected |
Convenience function that changes the sprite.
|
protected |
Convenience function that changes the sprite.
|
virtual |
Change the visual state.
Reimplemented from UIButtonColor.
|
static |
Current button that sent out the onClick event.
| string UIButton.disabledSprite |
Name of the disabled sprite.
| UnityEngine.Sprite UIButton.disabledSprite2D |
Name of the disabled sprite.
| bool UIButton.dragHighlight = false |
Whether the button will highlight when you drag something over it.
| string UIButton.hoverSprite |
Name of the hover state sprite.
| UnityEngine.Sprite UIButton.hoverSprite2D |
Name of the hover state sprite.
| List<EventDelegate> UIButton.onClick = new List<EventDelegate>() |
Click event listener.
| bool UIButton.pixelSnap = false |
Whether the sprite changes will elicit a call to MakePixelPerfect() or not.
| string UIButton.pressedSprite |
Name of the pressed sprite.
| UnityEngine.Sprite UIButton.pressedSprite2D |
Name of the pressed sprite.
|
getset |
Whether the button should be enabled.
|
getset |
Convenience function that changes the normal sprite.
|
getset |
Convenience function that changes the normal sprite.