DoopelPonger
Public Member Functions | Public Attributes | List of all members
UIControlConfigurableButton Class Reference

Button in the main menu used to change the keys the player presses to play the game. This class doesn't handle the change of the KeyCodes but only handles what text is displayed on the button. More...

Inheritance diagram for UIControlConfigurableButton:
Inheritance graph
[legend]
Collaboration diagram for UIControlConfigurableButton:
Collaboration graph
[legend]

Public Member Functions

void Awake ()
 
void ListenForNewButton ()
 Change the state of the button to show it has been clicked. More...
 
void OnPointerEnter (PointerEventData eventData)
 Called when the mouse have moved over the button. More...
 
void ResetKeyCode ()
 Set the text of the button based on the KeyCode that matches the action. More...
 
InputActionMapper.Action UpdateKeyCode (KeyCode keyCode)
 Set the text of the button and in the ActionMapper to the new KeyCode. More...
 

Public Attributes

InputActionMapper.Action action
 
UIControlsButtonManager buttonManager
 
Color pressedColor
 

Detailed Description

Button in the main menu used to change the keys the player presses to play the game. This class doesn't handle the change of the KeyCodes but only handles what text is displayed on the button.

Member Function Documentation

◆ Awake()

void UIControlConfigurableButton.Awake ( )

Initialize references and hooks into the event manager.

◆ ListenForNewButton()

void UIControlConfigurableButton.ListenForNewButton ( )

Change the state of the button to show it has been clicked.

◆ OnPointerEnter()

void UIControlConfigurableButton.OnPointerEnter ( PointerEventData  eventData)

Called when the mouse have moved over the button.

Parameters
eventDataMisc. information about the mouse hovering the button.

◆ ResetKeyCode()

void UIControlConfigurableButton.ResetKeyCode ( )

Set the text of the button based on the KeyCode that matches the action.

◆ UpdateKeyCode()

InputActionMapper.Action UIControlConfigurableButton.UpdateKeyCode ( KeyCode  keyCode)

Set the text of the button and in the ActionMapper to the new KeyCode.

Parameters
keyCodeNew KeyCode for the action.
Returns
The Action that had its KeyCode overwritten.

Member Data Documentation

◆ action

InputActionMapper.Action UIControlConfigurableButton.action

Action the button applies to.

◆ buttonManager

UIControlsButtonManager UIControlConfigurableButton.buttonManager

The manager that listens for button presses.

◆ pressedColor

Color UIControlConfigurableButton.pressedColor

Color the button should change when the button is pressed.


The documentation for this class was generated from the following file: