Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::GAME::IFeatureButton Class Referenceabstract

A GUI button in a feature list (IFeatureList) More...

#include <IConfigurationWindow.h>

Inheritance diagram for KODI::GAME::IFeatureButton:
KODI::GAME::CGUIFeatureButton KODI::GAME::CGUICardinalFeatureButton KODI::GAME::CGUIScalarFeatureButton KODI::GAME::CGUISelectKeyButton KODI::GAME::CGUIThrottleButton KODI::GAME::CGUIWheelButton

Public Member Functions

virtual ~IFeatureButton ()=default
 
virtual const CPhysicalFeatureFeature (void) const =0
 Get the feature represented by this button.
 
virtual bool AllowWizard () const
 Allow the wizard to include this feature in a list of buttons to map.
 
virtual bool PromptForInput (CEvent &waitEvent)=0
 Prompt the user for a single input element.
 
virtual bool IsFinished (void) const =0
 Check if the button supports further calls to PromptForInput()
 
virtual INPUT::CARDINAL_DIRECTION GetCardinalDirection (void) const =0
 Get the direction of the next analog stick or relative pointer prompt.
 
virtual JOYSTICK::WHEEL_DIRECTION GetWheelDirection (void) const =0
 Get the direction of the next wheel prompt.
 
virtual JOYSTICK::THROTTLE_DIRECTION GetThrottleDirection (void) const =0
 Get the direction of the next throttle prompt.
 
virtual bool NeedsKey () const
 True if the button is waiting for a key press.
 
virtual void SetKey (const CPhysicalFeature &key)
 Set the pressed key that the user will be prompted to map.
 
virtual void Reset (void)=0
 Reset button after prompting for input has finished.
 

Detailed Description

A GUI button in a feature list (IFeatureList)

Constructor & Destructor Documentation

◆ ~IFeatureButton()

virtual KODI::GAME::IFeatureButton::~IFeatureButton ( )
virtualdefault

Member Function Documentation

◆ AllowWizard()

virtual bool KODI::GAME::IFeatureButton::AllowWizard ( ) const
inlinevirtual

Allow the wizard to include this feature in a list of buttons to map.

Reimplemented in KODI::GAME::CGUISelectKeyButton.

◆ Feature()

virtual const CPhysicalFeature & KODI::GAME::IFeatureButton::Feature ( void ) const
pure virtual

Get the feature represented by this button.

Implemented in KODI::GAME::CGUIFeatureButton, and KODI::GAME::CGUISelectKeyButton.

◆ GetCardinalDirection()

virtual INPUT::CARDINAL_DIRECTION KODI::GAME::IFeatureButton::GetCardinalDirection ( void ) const
pure virtual

Get the direction of the next analog stick or relative pointer prompt.

Returns
The next direction to be prompted, or UNKNOWN if this isn't a cardinal feature or the prompt is finished

Implemented in KODI::GAME::CGUICardinalFeatureButton, and KODI::GAME::CGUIFeatureButton.

◆ GetThrottleDirection()

virtual JOYSTICK::THROTTLE_DIRECTION KODI::GAME::IFeatureButton::GetThrottleDirection ( void ) const
pure virtual

Get the direction of the next throttle prompt.

Returns
The next direction to be prompted, or UNKNOWN if this isn't a throttle or the prompt is finished

Implemented in KODI::GAME::CGUIFeatureButton, and KODI::GAME::CGUIThrottleButton.

◆ GetWheelDirection()

virtual JOYSTICK::WHEEL_DIRECTION KODI::GAME::IFeatureButton::GetWheelDirection ( void ) const
pure virtual

Get the direction of the next wheel prompt.

Returns
The next direction to be prompted, or UNKNOWN if this isn't a wheel or the prompt is finished

Implemented in KODI::GAME::CGUIFeatureButton, and KODI::GAME::CGUIWheelButton.

◆ IsFinished()

virtual bool KODI::GAME::IFeatureButton::IsFinished ( void ) const
pure virtual

Check if the button supports further calls to PromptForInput()

Returns
true if the button requires no more input elements from the user

Implemented in KODI::GAME::CGUICardinalFeatureButton, KODI::GAME::CGUIScalarFeatureButton, KODI::GAME::CGUISelectKeyButton, KODI::GAME::CGUIThrottleButton, and KODI::GAME::CGUIWheelButton.

◆ NeedsKey()

virtual bool KODI::GAME::IFeatureButton::NeedsKey ( ) const
inlinevirtual

True if the button is waiting for a key press.

Reimplemented in KODI::GAME::CGUISelectKeyButton.

◆ PromptForInput()

virtual bool KODI::GAME::IFeatureButton::PromptForInput ( CEvent & waitEvent)
pure virtual

Prompt the user for a single input element.

Parameters
waitEventThe event to block on while prompting for input
Returns
true if input was received (event fired), false if the prompt timed out

After the button has finished prompting the user for all the input elements it requires, this will return false until Reset() is called.

Implemented in KODI::GAME::CGUICardinalFeatureButton, KODI::GAME::CGUIScalarFeatureButton, KODI::GAME::CGUISelectKeyButton, KODI::GAME::CGUIThrottleButton, and KODI::GAME::CGUIWheelButton.

◆ Reset()

virtual void KODI::GAME::IFeatureButton::Reset ( void )
pure virtual

◆ SetKey()

virtual void KODI::GAME::IFeatureButton::SetKey ( const CPhysicalFeature & key)
inlinevirtual

Set the pressed key that the user will be prompted to map.

Parameters
keyThe key that was pressed

Reimplemented in KODI::GAME::CGUISelectKeyButton.


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