mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
class CArtifactsOfHeroMain : public CKeyShortcut
This commit is contained in:
@ -314,20 +314,12 @@ CKeyShortcut::CKeyShortcut(EShortcut key)
|
||||
{
|
||||
}
|
||||
|
||||
CKeyShortcut::CKeyShortcut(const EShortcut & key, const KeyPressedFunctor & keyPressedCallback)
|
||||
: CKeyShortcut(key)
|
||||
{
|
||||
this->keyPressedCallback = keyPressedCallback;
|
||||
}
|
||||
|
||||
void CKeyShortcut::keyPressed(EShortcut key)
|
||||
{
|
||||
if( assignedKey == key && assignedKey != EShortcut::NONE && !shortcutPressed)
|
||||
{
|
||||
shortcutPressed = true;
|
||||
clickPressed(GH.getCursorPosition());
|
||||
if(keyPressedCallback)
|
||||
keyPressedCallback();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user