A component that handles a mouse hover (through a hit box) with a given color. The entry (component):
-
Can play a sound when the user hovers.
-
Can be flagged disabled, and will gain a given color.
-
Support the trigger of a click event.
More...
|
Color | HoverColor = Color.yellow |
| The background color for when the mouse is hovering the component. More...
|
|
Color | DisabledColor = new Color(0.49f, 0.49f, 0.49f) |
| The background color for when the component is flagged as disabled. More...
|
|
|
virtual void | OnClick () |
| An event that gets fired whenever a click occurs. More...
|
|
void | Start () |
| Set-up the component by retrieve every base component of the game object and setting the cursor as visible on the GUI. Then checking if whether or not we should put the disabled color if the button is disabled. More...
|
|
void | ActivateHover () |
| Fired whenever the user starts hovering. This saves the current background color and replace it by the hover one. More...
|
|
void | DeactivateHover () |
| Fired whenever the user stops hovering. This restore the previous background color. More...
|
|
|
bool | IsEnabled = true |
| Whether the component must be in disabled or enabled state (requires restart). More...
|
|
A component that handles a mouse hover (through a hit box) with a given color. The entry (component):
-
Can play a sound when the user hovers.
-
Can be flagged disabled, and will gain a given color.
-
Support the trigger of a click event.
void Components.EntryHover.ActivateHover |
( |
| ) |
|
|
inlineprotected |
Fired whenever the user starts hovering. This saves the current background color and replace it by the hover one.
void Components.EntryHover.DeactivateHover |
( |
| ) |
|
|
inlineprotected |
Fired whenever the user stops hovering. This restore the previous background color.
virtual void Components.EntryHover.OnClick |
( |
| ) |
|
|
inlineprotectedvirtual |
void Components.EntryHover.Start |
( |
| ) |
|
|
inlineprotected |
Set-up the component by retrieve every base component of the game object and setting the cursor as visible on the GUI. Then checking if whether or not we should put the disabled color if the button is disabled.
Color Components.EntryHover.DisabledColor = new Color(0.49f, 0.49f, 0.49f) |
The background color for when the component is flagged as disabled.
Color Components.EntryHover.HoverColor = Color.yellow |
The background color for when the mouse is hovering the component.
bool Components.EntryHover.IsEnabled = true |
|
protected |
Whether the component must be in disabled or enabled state (requires restart).
The documentation for this class was generated from the following file:
- Assets/Scripts/Components/EntryHover.cs