BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
CPadObj Class Reference

Class for managing a gamepad's input and state. More...

#include <pad.h>

Inheritance diagram for CPadObj:
CObj

Public Member Functions

u32 GetCntHold (EPad epad_) const
 Get the hold count for a specific button.
 
u32 GetCntRelease (EPad epad_) const
 Get the release count for a specific button.
 
 CPadObj (u32 idx_, const CfgNesCtrl *pcfg_=nullptr)
 Construct a new CPadObj object.
 
virtual ~CPadObj ()
 Destroy the CPadObj object.
 
- Public Member Functions inherited from CObj
u32 GetId () const
 Get the ID of the object.
 
HObj GetHandle () const
 Get the handle of the object.
 
void SetHandle (HObj hObj_)
 Set the handle of the object.
 
void SetPriority (u32 priority_)
 Set the priority of the object.
 
u32 GetPriority () const
 Get the priority of the object.
 
void ReqKill ()
 Request to kill the object.
 
bool IsReqKill () const
 Check if the object is requested to be killed.
 
u32 GetTypeId ()
 Get the type ID of the object.
 
bool IsTypeOf (u32 type_id_)
 Check if the object is of a specific type.
 

Additional Inherited Members

- Protected Member Functions inherited from CObj
void SetTypeId (u32 type_id_)
 Set the type ID of the object.
 

Detailed Description

Class for managing a gamepad's input and state.

The CPadObj class tracks the state of gamepad buttons, integrates with NES controller emulation, and provides drawing functionalities for visual feedback.

Constructor & Destructor Documentation

◆ CPadObj()

CPadObj::CPadObj ( u32 idx_,
const CfgNesCtrl * pcfg_ = nullptr )

Construct a new CPadObj object.

Parameters
idx_The index of the gamepad.
pcfg_Pointer to the NES controller configuration.

Member Function Documentation

◆ GetCntHold()

u32 CPadObj::GetCntHold ( EPad epad_) const
inline

Get the hold count for a specific button.

Parameters
epad_The button to check.
Returns
The count of frames the button has been held.

◆ GetCntRelease()

u32 CPadObj::GetCntRelease ( EPad epad_) const
inline

Get the release count for a specific button.

Parameters
epad_The button to check.
Returns
The count of frames the button has been released.

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