ArcdpsExtension
 
Loading...
Searching...
No Matches
ArcdpsExtension::KeyBindComponent Class Referenceabstract

#include <KeyBindComponent.h>

Inheritance diagram for ArcdpsExtension::KeyBindComponent:
Collaboration diagram for ArcdpsExtension::KeyBindComponent:

Public Member Functions

 KeyBindComponent (MainWindow *pMainWindow)
 
- Public Member Functions inherited from ArcdpsExtension::ComponentBase
 ComponentBase (MainWindow *pMainWindow)
 
virtual ~ComponentBase ()
 

Protected Member Functions

virtual bool getKeyBindSwitch ()
 
virtual bool KeyBindPressed ()
 
virtual KeyBinds::Key & getKeyBind ()=0
 
virtual bool getCloseWithEsc ()
 
virtual bool getCloseWithEscActive ()
 
virtual bool EscPressed ()
 
virtual HKL getCurrentHKL ()
 
virtual gwlanguage getCurrentLanguage ()
 

Additional Inherited Members

- Protected Attributes inherited from ArcdpsExtension::ComponentBase
MainWindowmMainWindow
 

Constructor & Destructor Documentation

◆ KeyBindComponent()

ArcdpsExtension::KeyBindComponent::KeyBindComponent ( MainWindow pMainWindow)
explicit

This does only work with arcdps modifiers. To allow other input handling, i recommend adding a flag to this class and have the arcdps features optional. Alternatively, remove features here and add them in a subclass.

Member Function Documentation

◆ EscPressed()

bool ArcdpsExtension::KeyBindComponent::EscPressed ( )
protectedvirtual

Contains the actual logic to hide the attached window. return true if the KeyPressEvent should be consumed.

You don't need to override this, you want to use getCloseWithEsc instead.

◆ getCloseWithEsc()

virtual bool ArcdpsExtension::KeyBindComponent::getCloseWithEsc ( )
inlineprotectedvirtual

Close this window with a single press of ESC. This function is checked everytime ESC is pressed and the window is open. Use this to add additional checks, e.g. if arcdps is is hidden and more. return true if closing should be done.

Reimplemented in ArcdpsExtension::DemoKeyBindComponent.

◆ getCloseWithEscActive()

virtual bool ArcdpsExtension::KeyBindComponent::getCloseWithEscActive ( )
inlineprotectedvirtual

This variable is only checked once, it should be true, if this feature is planned to be used. If this is false, the ESC key is never checked and therefore nothing will work.

Reimplemented in ArcdpsExtension::DemoKeyBindComponent.

◆ getCurrentHKL()

virtual HKL ArcdpsExtension::KeyBindComponent::getCurrentHKL ( )
inlineprotectedvirtual

Get the current KeyBoardLayout. Since we are not in the mainthread, this will most likely be wrong! This can be tracked in arcdps mod_wnd.

◆ getCurrentLanguage()

virtual gwlanguage ArcdpsExtension::KeyBindComponent::getCurrentLanguage ( )
inlineprotectedvirtual

The current language the plugin is set to. Default to english, this should be overridden to get proper language selection. The current language can be tracked with the unofficial_extras add-on.

◆ getKeyBind()

virtual KeyBinds::Key & ArcdpsExtension::KeyBindComponent::getKeyBind ( )
protectedpure virtual

The KeyBind this window should react on.

Implemented in ArcdpsExtension::DemoKeyBindComponent.

◆ getKeyBindSwitch()

virtual bool ArcdpsExtension::KeyBindComponent::getKeyBindSwitch ( )
inlineprotectedvirtual

Override if you want to add additional checks when the keybind is pressed. e.g. arcdps is hidden

◆ KeyBindPressed()

bool ArcdpsExtension::KeyBindComponent::KeyBindPressed ( )
protectedvirtual

This function does the actual changes to the MainWindow and is called after getKeyBindSwitch returned true. return true if the KeyPressEvent should be consumed.

You don't need to override this, you want to use getKeyBindSwitch instead.


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