Rhythm
Game Engines Final Project
Loading...
Searching...
No Matches
components::menu_controls::ComponentMenuControls Class Reference

A component that handles menu controls for a game object. More...

Inheritance diagram for components::menu_controls::ComponentMenuControls:

Public Member Functions

 this (GameObject *owner)
 Constructor for ComponentMenuControls.
 
override void Input ()
 Handles keyboard input for menu controls.
 
void SetInputKey (int key)
 Sets the input key for menu control.
 
 typeof (this) OnMenuChange(void delegate(int) callback)
 Registers a callback to be called when the menu changes.
 

Detailed Description

A component that handles menu controls for a game object.

Constructor & Destructor Documentation

◆ this()

components::menu_controls::ComponentMenuControls::this ( GameObject * owner)
inline

Constructor for ComponentMenuControls.

Parameters
ownerPointer to the GameObject that owns this component.

Member Function Documentation

◆ Input()

override void components::menu_controls::ComponentMenuControls::Input ( )
inline

Handles keyboard input for menu controls.

Checks if a specific key is pressed and triggers the registered callbacks.

◆ SetInputKey()

void components::menu_controls::ComponentMenuControls::SetInputKey ( int key)
inline

Sets the input key for menu control.

Parameters
keyThe SDL scancode of the key to be used for menu control.

◆ typeof()

components::menu_controls::ComponentMenuControls::typeof ( this )
inline

Registers a callback to be called when the menu changes.

Parameters
callbackThe callback function to be registered.
Returns
The current instance of ComponentMenuControls.

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