Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Components.EntryHover Class Reference

A component that handles a mouse hover (through a hit box) with a given color. The entry (component):

More...

Inheritance diagram for Components.EntryHover:
Components.ClickAndExit Components.ClickAndLoadScene Menu.ContinueButton Menu.NewGameButton Menu.OptionsButton

Public Attributes

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...
 

Protected Member Functions

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...
 

Protected Attributes

bool IsEnabled = true
 Whether the component must be in disabled or enabled state (requires restart). More...
 

Detailed Description

A component that handles a mouse hover (through a hit box) with a given color. The entry (component):

Member Function Documentation

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

An event that gets fired whenever a click occurs.

Reimplemented in Menu.ContinueButton, Menu.NewGameButton, Menu.OptionsButton, Components.ClickAndLoadScene, and Components.ClickAndExit.

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.

Member Data Documentation

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: