ArcdpsExtension
 
Loading...
Searching...
No Matches
ArcdpsExtension::KeyBindHandler Class Reference

#include <KeyBindHandler.h>

Inheritance diagram for ArcdpsExtension::KeyBindHandler:
Collaboration diagram for ArcdpsExtension::KeyBindHandler:

Classes

struct  Subscriber
 

Public Types

enum  SubscriberFlags_ { SubscriberFlags_None = 0 , SubscriberFlags_ArcdpsModifier = 1 << 0 }
 
using SubscriberFlags = std::underlying_type_t< SubscriberFlags_ >
 
using SubscriberFun = std::function< bool(const KeyBinds::Key &)>
 

Public Member Functions

uint64_t Subscribe (Subscriber pSubscriber)
 
void Unsubscribe (uint64_t pId)
 
void UpdateKey (uint64_t pId, const KeyBinds::Key &pKey)
 
void UpdateKeys (const KeyBinds::Key &pOldKey, const KeyBinds::Key &pNewKey)
 
bool Wnd (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Public Member Functions inherited from ArcdpsExtension::Singleton< KeyBindHandler >
 ~Singleton () override
 
- Public Member Functions inherited from ArcdpsExtension::BaseSingleton
virtual ~BaseSingleton ()=default
 

Static Public Member Functions

static KeyBinds::Modifier GetArcdpsModifier ()
 
- Static Public Member Functions inherited from ArcdpsExtension::Singleton< KeyBindHandler >
static T2 & instance ()
 
static T2 & init (Args &&... args)
 
static void f (std::function< void(T2 &)> action)
 
static void f (std::function< void(KeyBindHandler &)> action)
 
static void reset ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from ArcdpsExtension::BaseSingleton
static BaseSingletonStore (std::unique_ptr< BaseSingleton > &&ptr)
 
static void Clear (BaseSingleton *ptr)
 

Detailed Description

To Use:

  • This class only works with arcdps
  • Make sure you have set tha extern variables in arcdps_structs.h. Those are called here.
  • The Singleton also has to be setup
  • Call Wnd in mod_wnd (arcdps callback)

Member Typedef Documentation

◆ SubscriberFlags

◆ SubscriberFun

using ArcdpsExtension::KeyBindHandler::SubscriberFun = std::function<bool(const KeyBinds::Key&)>

The function that is called when a Key-combination is pressed.

Returns
boolean if the event should be consumed.

Member Enumeration Documentation

◆ SubscriberFlags_

Enumerator
SubscriberFlags_None 
SubscriberFlags_ArcdpsModifier 

Member Function Documentation

◆ GetArcdpsModifier()

KeyBinds::Modifier ArcdpsExtension::KeyBindHandler::GetArcdpsModifier ( )
static

Call to get the arcdps modifier as KeyBindModifier (here cause it cannot be in KeyBindHelper)

◆ Subscribe()

uint64_t ArcdpsExtension::KeyBindHandler::Subscribe ( Subscriber  pSubscriber)

Subscribe a function to a Key that is called when the Key-combination is pressed.

Returns
ID of the Subscription, use this in Unsubscribe.

◆ Unsubscribe()

void ArcdpsExtension::KeyBindHandler::Unsubscribe ( uint64_t  pId)

Unsubscribe given Subscription ID

◆ UpdateKey()

void ArcdpsExtension::KeyBindHandler::UpdateKey ( uint64_t  pId,
const KeyBinds::Key &  pKey 
)

Update the Key of the given Subscription ID

◆ UpdateKeys()

void ArcdpsExtension::KeyBindHandler::UpdateKeys ( const KeyBinds::Key &  pOldKey,
const KeyBinds::Key &  pNewKey 
)

Update all existing pOldKey tracked values to pNewKey

◆ Wnd()

bool ArcdpsExtension::KeyBindHandler::Wnd ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Call this in mod_wnd.


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