QuickSpellPanel.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * QuickSpellPanel.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 "../gui/CIntObject.h"
  12. class CFilledTexture;
  13. class TransparentFilledRectangle;
  14. class CButton;
  15. class CLabel;
  16. class BattleInterface;
  17. class QuickSpellPanel : public CIntObject
  18. {
  19. private:
  20. std::shared_ptr<CFilledTexture> background;
  21. std::shared_ptr<TransparentFilledRectangle> rect;
  22. std::vector<std::shared_ptr<CButton>> buttons;
  23. std::vector<std::shared_ptr<TransparentFilledRectangle>> buttonsIsAutoGenerated;
  24. std::vector<std::shared_ptr<TransparentFilledRectangle>> buttonsDisabled;
  25. std::vector<std::shared_ptr<CLabel>> labels;
  26. BattleInterface & owner;
  27. public:
  28. static constexpr int QUICKSPELL_SLOTS = 12;
  29. QuickSpellPanel(BattleInterface & owner);
  30. void create();
  31. std::vector<std::tuple<SpellID, bool>> getSpells() const;
  32. void show(Canvas & to) override;
  33. void inputModeChanged(InputMode modi) override;
  34. };