DDraceNetwork Docs
CTouchControls::CBindTouchButtonBehavior Class Reference
Inheritance diagram for CTouchControls::CBindTouchButtonBehavior:
[legend]
Collaboration diagram for CTouchControls::CBindTouchButtonBehavior:
[legend]

Public Member Functions

 CBindTouchButtonBehavior (const char *pLabel, CButtonLabel::EType LabelType, const char *pCommand)
 
CButtonLabel GetLabel () const override
 
void OnActivate () override
 
void OnDeactivate () override
 
void OnUpdate () override
 
void WriteToConfiguration (CJsonWriter *pWriter) override
 
- Public Member Functions inherited from CTouchControls::CTouchButtonBehavior
virtual ~CTouchButtonBehavior ()=default
 
virtual void Init (CTouchButton *pTouchButton)
 
void Reset ()
 
void SetActive (const IInput::CTouchFingerState &FingerState)
 
void SetInactive ()
 
bool IsActive () const
 
bool IsActive (const IInput::CTouchFinger &Finger) const
 
virtual CButtonLabel GetLabel () const =0
 
virtual void OnActivate ()
 
virtual void OnDeactivate ()
 
virtual void OnUpdate ()
 
virtual void WriteToConfiguration (CJsonWriter *pWriter)=0
 

Static Public Attributes

static constexpr const char *const BEHAVIOR_TYPE = "bind"
 

Private Attributes

std::string m_Label
 
CButtonLabel::EType m_LabelType
 
std::string m_Command
 
bool m_Repeating = false
 
std::chrono::nanoseconds m_LastUpdateTime
 
std::chrono::nanoseconds m_AccumulatedRepeatingTime
 

Additional Inherited Members

- Public Attributes inherited from CTouchControls::CTouchButtonBehavior
CTouchButtonm_pTouchButton
 
CTouchControlsm_pTouchControls
 
bool m_Active
 
IInput::CTouchFinger m_Finger
 
vec2 m_ActivePosition
 
vec2 m_AccumulatedDelta
 
std::chrono::nanoseconds m_ActivationStartTime
 

Detailed Description

Generic behavior implementation that executes a console command like a bind.

Constructor & Destructor Documentation

◆ CBindTouchButtonBehavior()

CTouchControls::CBindTouchButtonBehavior::CBindTouchButtonBehavior ( const char *  pLabel,
CButtonLabel::EType  LabelType,
const char *  pCommand 
)
inline

Member Function Documentation

◆ GetLabel()

CTouchControls::CButtonLabel CTouchControls::CBindTouchButtonBehavior::GetLabel ( ) const
overridevirtual

◆ OnActivate()

void CTouchControls::CBindTouchButtonBehavior::OnActivate ( )
overridevirtual

◆ OnDeactivate()

void CTouchControls::CBindTouchButtonBehavior::OnDeactivate ( )
overridevirtual

◆ OnUpdate()

void CTouchControls::CBindTouchButtonBehavior::OnUpdate ( )
overridevirtual

◆ WriteToConfiguration()

void CTouchControls::CBindTouchButtonBehavior::WriteToConfiguration ( CJsonWriter pWriter)
overridevirtual

Member Data Documentation

◆ BEHAVIOR_TYPE

constexpr const char* const CTouchControls::CBindTouchButtonBehavior::BEHAVIOR_TYPE = "bind"
staticconstexpr

◆ m_AccumulatedRepeatingTime

std::chrono::nanoseconds CTouchControls::CBindTouchButtonBehavior::m_AccumulatedRepeatingTime
private

◆ m_Command

std::string CTouchControls::CBindTouchButtonBehavior::m_Command
private

◆ m_Label

std::string CTouchControls::CBindTouchButtonBehavior::m_Label
private

◆ m_LabelType

CButtonLabel::EType CTouchControls::CBindTouchButtonBehavior::m_LabelType
private

◆ m_LastUpdateTime

std::chrono::nanoseconds CTouchControls::CBindTouchButtonBehavior::m_LastUpdateTime
private

◆ m_Repeating

bool CTouchControls::CBindTouchButtonBehavior::m_Repeating = false
private

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