AdventureMapShortcuts.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * AdventureMapShortcuts.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class Point;
  13. VCMI_LIB_NAMESPACE_END
  14. enum class EShortcut;
  15. class CAdventureMapInterface;
  16. struct AdventureMapShortcutState
  17. {
  18. EShortcut shortcut;
  19. bool isEnabled;
  20. std::function<void()> callback;
  21. };
  22. /// Class that contains list of functions for shortcuts available from adventure map
  23. class AdventureMapShortcuts
  24. {
  25. CAdventureMapInterface & owner;
  26. void showOverview();
  27. void worldViewBack();
  28. void worldViewScale1x();
  29. void worldViewScale2x();
  30. void worldViewScale4x();
  31. void switchMapLevel();
  32. void showQuestlog();
  33. void toggleSleepWake();
  34. void setHeroSleeping();
  35. void setHeroAwake();
  36. void moveHeroAlongPath();
  37. void showSpellbook();
  38. void adventureOptions();
  39. void systemOptions();
  40. void nextHero();
  41. void endTurn();
  42. void showThievesGuild();
  43. void showScenarioInfo();
  44. void saveGame();
  45. void loadGame();
  46. void digGrail();
  47. void viewPuzzleMap();
  48. void restartGame();
  49. void visitObject();
  50. void openObject();
  51. void abortSpellcasting();
  52. void showMarketplace();
  53. void nextTown();
  54. void nextObject();
  55. void moveHeroDirectional(const Point & direction);
  56. public:
  57. explicit AdventureMapShortcuts(CAdventureMapInterface & owner);
  58. std::vector<AdventureMapShortcutState> getShortcuts();
  59. bool optionHasQuests();
  60. bool optionHasUnderground();
  61. bool optionMapLevelSurface();
  62. bool optionHeroSleeping();
  63. bool optionHeroSelected();
  64. bool optionHeroCanMove();
  65. bool optionHasNextHero();
  66. bool optionSpellcasting();
  67. bool optionDefault();
  68. };