Handle also joystick buttons in hotkey dialog advanced frame

The advanced frame of the hotkey dialog did not handle joystick buttons at all. Now it will add combo boxes for each keyboard key and each joystick button. It also adds a
tool tip to get the button name including its corresponding device name.

ref T540
This commit is contained in:
Roland Rossgotterer
2019-02-18 09:46:44 +01:00
committed by Mat Sutcliffe
parent 68907258a5
commit 0381b45a87
2 changed files with 93 additions and 24 deletions

View File

@@ -100,7 +100,8 @@ namespace BlackGui
void combinationSelectionChanged(const BlackMisc::Input::CHotkeyCombination &combination);
void combinationSelectionFinished(const BlackMisc::Input::CHotkeyCombination &combination);
void changeSelectedAction(const QItemSelection &selected, const QItemSelection &deselected);
CKeySelectionBox *addSelectionBox(const BlackMisc::Input::CKeyboardKeyList &allSupportedKeys, const QString &currentKey = {});
CKeySelectionBox *addSelectionBox(const BlackMisc::Input::CKeyboardKeyList &allSupportedKeys, const BlackMisc::Input::CKeyboardKey &keyboardKey = {});
CKeySelectionBox *addSelectionBox(const BlackMisc::Input::CJoystickButtonList &allAvailableButtons, const BlackMisc::Input::CJoystickButton &joystickButton = {});
void changeApplicableMachine(int index);
void synchronize();
@@ -115,8 +116,8 @@ namespace BlackGui
BlackMisc::Input::CActionHotkey m_actionHotkey;
BlackGui::Models::CActionModel m_actionModel;
//! "No key"
static const QString &noKey();
//! "No key/button"
static const QString &noKeyButton();
};
} // ns
} // ns