CArtifactsOfHeroMain.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * CArtifactsOfHeroMain.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "CArtifactsOfHeroBase.h"
  12. #include "../gui/Shortcut.h"
  13. class CArtifactsOfHeroMain : public CArtifactsOfHeroBase, public CKeyShortcut
  14. {
  15. public:
  16. CArtifactsOfHeroMain(const Point & position);
  17. ~CArtifactsOfHeroMain() override;
  18. void enableArtifactsCostumeSwitcher();
  19. void keyPressed(EShortcut key) override;
  20. void keyReleased(EShortcut key) override;
  21. private:
  22. static constexpr std::array costumeSaveShortcuts = {
  23. EShortcut::HERO_COSTUME_SAVE_0,
  24. EShortcut::HERO_COSTUME_SAVE_1,
  25. EShortcut::HERO_COSTUME_SAVE_2,
  26. EShortcut::HERO_COSTUME_SAVE_3,
  27. EShortcut::HERO_COSTUME_SAVE_4,
  28. EShortcut::HERO_COSTUME_SAVE_5,
  29. EShortcut::HERO_COSTUME_SAVE_6,
  30. EShortcut::HERO_COSTUME_SAVE_7,
  31. EShortcut::HERO_COSTUME_SAVE_8,
  32. EShortcut::HERO_COSTUME_SAVE_9
  33. };
  34. static constexpr std::array costumeLoadShortcuts = {
  35. EShortcut::HERO_COSTUME_LOAD_0,
  36. EShortcut::HERO_COSTUME_LOAD_1,
  37. EShortcut::HERO_COSTUME_LOAD_2,
  38. EShortcut::HERO_COSTUME_LOAD_3,
  39. EShortcut::HERO_COSTUME_LOAD_4,
  40. EShortcut::HERO_COSTUME_LOAD_5,
  41. EShortcut::HERO_COSTUME_LOAD_6,
  42. EShortcut::HERO_COSTUME_LOAD_7,
  43. EShortcut::HERO_COSTUME_LOAD_8,
  44. EShortcut::HERO_COSTUME_LOAD_9
  45. };
  46. };