GUIClasses.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. /*
  2. * GUIClasses.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 "CWindowObject.h"
  12. #include "../lib/GameConstants.h"
  13. #include "../lib/ResourceSet.h"
  14. #include "../lib/CConfigHandler.h"
  15. #include "../lib/int3.h"
  16. #include "../widgets/CArtifactHolder.h"
  17. #include "../widgets/CGarrisonInt.h"
  18. #include "../widgets/Images.h"
  19. VCMI_LIB_NAMESPACE_BEGIN
  20. class CGDwelling;
  21. class IMarket;
  22. VCMI_LIB_NAMESPACE_END
  23. class CreatureCostBox;
  24. class CCreaturePic;
  25. class MoraleLuckBox;
  26. class CHeroArea;
  27. class CMinorResDataBar;
  28. class CSlider;
  29. class CComponentBox;
  30. class CTextInput;
  31. class CListBox;
  32. class CLabelGroup;
  33. class CToggleButton;
  34. class CToggleGroup;
  35. class CVolumeSlider;
  36. class CGStatusBar;
  37. class CTextBox;
  38. class CResDataBar;
  39. class CHeroWithMaybePickedArtifact;
  40. /// Recruitment window where you can recruit creatures
  41. class CRecruitmentWindow : public CStatusbarWindow
  42. {
  43. class CCreatureCard : public CIntObject, public std::enable_shared_from_this<CCreatureCard>
  44. {
  45. CRecruitmentWindow * parent;
  46. std::shared_ptr<CCreaturePic> animation;
  47. bool selected;
  48. public:
  49. const CCreature * creature;
  50. si32 amount;
  51. void select(bool on);
  52. CCreatureCard(CRecruitmentWindow * window, const CCreature * crea, int totalAmount);
  53. void clickLeft(tribool down, bool previousState) override;
  54. void clickRight(tribool down, bool previousState) override;
  55. void showAll(SDL_Surface * to) override;
  56. };
  57. std::function<void(CreatureID,int)> onRecruit; //void (int ID, int amount) <-- call to recruit creatures
  58. int level;
  59. const CArmedInstance * dst;
  60. std::shared_ptr<CCreatureCard> selected;
  61. std::vector<std::shared_ptr<CCreatureCard>> cards;
  62. std::shared_ptr<CSlider> slider;
  63. std::shared_ptr<CButton> maxButton;
  64. std::shared_ptr<CButton> buyButton;
  65. std::shared_ptr<CButton> cancelButton;
  66. std::shared_ptr<CLabel> title;
  67. std::shared_ptr<CLabel> availableValue;
  68. std::shared_ptr<CLabel> toRecruitValue;
  69. std::shared_ptr<CLabel> availableTitle;
  70. std::shared_ptr<CLabel> toRecruitTitle;
  71. std::shared_ptr<CreatureCostBox> costPerTroopValue;
  72. std::shared_ptr<CreatureCostBox> totalCostValue;
  73. void select(std::shared_ptr<CCreatureCard> card);
  74. void buy();
  75. void sliderMoved(int to);
  76. void showAll(SDL_Surface * to) override;
  77. public:
  78. const CGDwelling * const dwelling;
  79. CRecruitmentWindow(const CGDwelling * Dwelling, int Level, const CArmedInstance * Dst, const std::function<void(CreatureID,int)> & Recruit, int y_offset = 0);
  80. void availableCreaturesChanged();
  81. };
  82. /// Split window where creatures can be split up into two single unit stacks
  83. class CSplitWindow : public CWindowObject
  84. {
  85. std::function<void(int, int)> callback;
  86. int leftAmount;
  87. int rightAmount;
  88. int leftMin;
  89. int rightMin;
  90. std::shared_ptr<CLabel> title;
  91. std::shared_ptr<CSlider> slider;
  92. std::shared_ptr<CCreaturePic> animLeft;
  93. std::shared_ptr<CCreaturePic> animRight;
  94. std::shared_ptr<CButton> ok;
  95. std::shared_ptr<CButton> cancel;
  96. std::shared_ptr<CTextInput> leftInput;
  97. std::shared_ptr<CTextInput> rightInput;
  98. void setAmountText(std::string text, bool left);
  99. void setAmount(int value, bool left);
  100. void sliderMoved(int value);
  101. void apply();
  102. public:
  103. /**
  104. * creature - displayed creature
  105. * callback(leftAmount, rightAmount) - function to call on close
  106. * leftMin, rightMin - minimal amount of creatures in each stack
  107. * leftAmount, rightAmount - amount of creatures in each stack
  108. */
  109. CSplitWindow(const CCreature * creature, std::function<void(int, int)> callback, int leftMin, int rightMin, int leftAmount, int rightAmount);
  110. };
  111. /// Raised up level window where you can select one out of two skills
  112. class CLevelWindow : public CWindowObject
  113. {
  114. std::shared_ptr<CAnimImage> portrait;
  115. std::shared_ptr<CButton> ok;
  116. std::shared_ptr<CLabel> mainTitle;
  117. std::shared_ptr<CLabel> levelTitle;
  118. std::shared_ptr<CAnimImage> skillIcon;
  119. std::shared_ptr<CLabel> skillValue;
  120. std::shared_ptr<CComponentBox> box; //skills to select
  121. std::function<void(ui32)> cb;
  122. void selectionChanged(unsigned to);
  123. public:
  124. CLevelWindow(const CGHeroInstance *hero, PrimarySkill::PrimarySkill pskill, std::vector<SecondarySkill> &skills, std::function<void(ui32)> callback);
  125. ~CLevelWindow();
  126. };
  127. /// Town portal, castle gate window
  128. class CObjectListWindow : public CWindowObject
  129. {
  130. class CItem : public CIntObject
  131. {
  132. CObjectListWindow * parent;
  133. std::shared_ptr<CLabel> text;
  134. std::shared_ptr<CPicture> border;
  135. public:
  136. const size_t index;
  137. CItem(CObjectListWindow * parent, size_t id, std::string text);
  138. void select(bool on);
  139. void clickLeft(tribool down, bool previousState) override;
  140. };
  141. std::function<void(int)> onSelect;//called when OK button is pressed, returns id of selected item.
  142. std::shared_ptr<CIntObject> titleWidget;
  143. std::shared_ptr<CLabel> title;
  144. std::shared_ptr<CLabel> descr;
  145. std::shared_ptr<CListBox> list;
  146. std::shared_ptr<CButton> ok;
  147. std::shared_ptr<CButton> exit;
  148. std::vector< std::pair<int, std::string> > items;//all items present in list
  149. void init(std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr);
  150. void exitPressed();
  151. public:
  152. size_t selected;//index of currently selected item
  153. std::function<void()> onExit;//optional exit callback
  154. /// Callback will be called when OK button is pressed, returns id of selected item. initState = initially selected item
  155. /// Image can be nullptr
  156. ///item names will be taken from map objects
  157. CObjectListWindow(const std::vector<int> &_items, std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, std::function<void(int)> Callback, size_t initialSelection = 0);
  158. CObjectListWindow(const std::vector<std::string> &_items, std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, std::function<void(int)> Callback, size_t initialSelection = 0);
  159. std::shared_ptr<CIntObject> genItem(size_t index);
  160. void elementSelected();//call callback and close this window
  161. void changeSelection(size_t which);
  162. void keyPressed (const SDL_KeyboardEvent & key) override;
  163. };
  164. class CSystemOptionsWindow : public CWindowObject
  165. {
  166. private:
  167. std::shared_ptr<CLabel> title;
  168. std::shared_ptr<CLabelGroup> leftGroup;
  169. std::shared_ptr<CLabelGroup> rightGroup;
  170. std::shared_ptr<CButton> load;
  171. std::shared_ptr<CButton> save;
  172. std::shared_ptr<CButton> restart;
  173. std::shared_ptr<CButton> mainMenu;
  174. std::shared_ptr<CButton> quitGame;
  175. std::shared_ptr<CButton> backToMap; //load and restart are not used yet
  176. std::shared_ptr<CToggleGroup> heroMoveSpeed;
  177. std::shared_ptr<CToggleGroup> enemyMoveSpeed;
  178. std::shared_ptr<CToggleGroup> mapScrollSpeed;
  179. std::shared_ptr<CVolumeSlider> musicVolume;
  180. std::shared_ptr<CVolumeSlider> effectsVolume;
  181. std::shared_ptr<CToggleButton> showReminder;
  182. std::shared_ptr<CToggleButton> quickCombat;
  183. std::shared_ptr<CToggleButton> spellbookAnim;
  184. std::shared_ptr<CToggleButton> fullscreen;
  185. std::shared_ptr<CButton> gameResButton;
  186. std::shared_ptr<CLabel> gameResLabel;
  187. SettingsListener onFullscreenChanged;
  188. //functions bound to buttons
  189. void bloadf(); //load game
  190. void bsavef(); //save game
  191. void bquitf(); //quit game
  192. void breturnf(); //return to game
  193. void brestartf(); //restart game
  194. void bmainmenuf(); //return to main menu
  195. void selectGameRes();
  196. void setGameRes(int index);
  197. void closeAndPushEvent(int eventType, int code = 0);
  198. public:
  199. CSystemOptionsWindow();
  200. };
  201. class CTavernWindow : public CStatusbarWindow
  202. {
  203. public:
  204. class HeroPortrait : public CIntObject
  205. {
  206. public:
  207. std::string hoverName;
  208. std::string description; // "XXX is a level Y ZZZ with N artifacts"
  209. const CGHeroInstance * h;
  210. void clickLeft(tribool down, bool previousState) override;
  211. void clickRight(tribool down, bool previousState) override;
  212. void hover (bool on) override;
  213. HeroPortrait(int & sel, int id, int x, int y, const CGHeroInstance * H);
  214. private:
  215. int *_sel;
  216. const int _id;
  217. std::shared_ptr<CAnimImage> portrait;
  218. };
  219. //recruitable heroes
  220. std::shared_ptr<HeroPortrait> h1;
  221. std::shared_ptr<HeroPortrait> h2; //recruitable heroes
  222. int selected;//0 (left) or 1 (right)
  223. int oldSelected;//0 (left) or 1 (right)
  224. std::shared_ptr<CButton> thiefGuild;
  225. std::shared_ptr<CButton> cancel;
  226. std::shared_ptr<CButton> recruit;
  227. const CGObjectInstance * tavernObj;
  228. std::shared_ptr<CLabel> title;
  229. std::shared_ptr<CLabel> cost;
  230. std::shared_ptr<CTextBox> rumor;
  231. CTavernWindow(const CGObjectInstance * TavernObj);
  232. ~CTavernWindow();
  233. void recruitb();
  234. void thievesguildb();
  235. void show(SDL_Surface * to) override;
  236. };
  237. class CCallback;
  238. class CExchangeWindow;
  239. struct HeroArtifact
  240. {
  241. const CGHeroInstance * hero;
  242. const CArtifactInstance * artifact;
  243. ArtifactPosition artPosition;
  244. HeroArtifact(const CGHeroInstance * hero, const CArtifactInstance * artifact, ArtifactPosition artPosition)
  245. :hero(hero), artifact(artifact), artPosition(artPosition)
  246. {
  247. }
  248. };
  249. class CExchangeController
  250. {
  251. private:
  252. const CGHeroInstance * left;
  253. const CGHeroInstance * right;
  254. std::shared_ptr<CCallback> cb;
  255. CExchangeWindow * view;
  256. public:
  257. CExchangeController(CExchangeWindow * view, ObjectInstanceID hero1, ObjectInstanceID hero2);
  258. std::function<void()> onMoveArmyToRight();
  259. std::function<void()> onSwapArmy();
  260. std::function<void()> onMoveArmyToLeft();
  261. std::function<void()> onSwapArtifacts();
  262. std::function<void()> onMoveArtifactsToLeft();
  263. std::function<void()> onMoveArtifactsToRight();
  264. std::function<void()> onMoveStackToLeft(SlotID slotID);
  265. std::function<void()> onMoveStackToRight(SlotID slotID);
  266. private:
  267. void moveArmy(bool leftToRight);
  268. void moveArtifacts(bool leftToRight);
  269. void moveArtifact(const CGHeroInstance * source, const CGHeroInstance * target, ArtifactPosition srcPosition);
  270. void moveStack(const CGHeroInstance * source, const CGHeroInstance * target, SlotID sourceSlot);
  271. };
  272. class CExchangeWindow : public CStatusbarWindow, public CGarrisonHolder, public CWindowWithArtifacts
  273. {
  274. std::array<std::shared_ptr<CHeroWithMaybePickedArtifact>, 2> herosWArt;
  275. std::array<std::shared_ptr<CLabel>, 2> titles;
  276. std::vector<std::shared_ptr<CAnimImage>> primSkillImages;//shared for both heroes
  277. std::array<std::vector<std::shared_ptr<CLabel>>, 2> primSkillValues;
  278. std::array<std::vector<std::shared_ptr<CAnimImage>>, 2> secSkillIcons;
  279. std::array<std::shared_ptr<CAnimImage>, 2> specImages;
  280. std::array<std::shared_ptr<CAnimImage>, 2> expImages;
  281. std::array<std::shared_ptr<CLabel>, 2> expValues;
  282. std::array<std::shared_ptr<CAnimImage>, 2> manaImages;
  283. std::array<std::shared_ptr<CLabel>, 2> manaValues;
  284. std::array<std::shared_ptr<CAnimImage>, 2> portraits;
  285. std::vector<std::shared_ptr<LRClickableAreaWTextComp>> primSkillAreas;
  286. std::array<std::vector<std::shared_ptr<LRClickableAreaWTextComp>>, 2> secSkillAreas;
  287. std::array<std::shared_ptr<CHeroArea>, 2> heroAreas;
  288. std::array<std::shared_ptr<LRClickableAreaWText>, 2> specialtyAreas;
  289. std::array<std::shared_ptr<LRClickableAreaWText>, 2> experienceAreas;
  290. std::array<std::shared_ptr<LRClickableAreaWText>, 2> spellPointsAreas;
  291. std::array<std::shared_ptr<MoraleLuckBox>, 2> morale;
  292. std::array<std::shared_ptr<MoraleLuckBox>, 2> luck;
  293. std::shared_ptr<CButton> quit;
  294. std::array<std::shared_ptr<CButton>, 2> questlogButton;
  295. std::shared_ptr<CGarrisonInt> garr;
  296. std::shared_ptr<CButton> moveAllGarrButtonLeft;
  297. std::shared_ptr<CButton> echangeGarrButton;
  298. std::shared_ptr<CButton> moveAllGarrButtonRight;
  299. std::shared_ptr<CButton> moveArtifactsButtonLeft;
  300. std::shared_ptr<CButton> echangeArtifactsButton;
  301. std::shared_ptr<CButton> moveArtifactsButtonRight;
  302. std::vector<std::shared_ptr<CButton>> moveStackLeftButtons;
  303. std::vector<std::shared_ptr<CButton>> moveStackRightButtons;
  304. CExchangeController controller;
  305. public:
  306. std::array<const CGHeroInstance *, 2> heroInst;
  307. std::array<std::shared_ptr<CArtifactsOfHero>, 2> artifs;
  308. void updateGarrisons() override;
  309. void questlog(int whichHero); //questlog button callback; whichHero: 0 - left, 1 - right
  310. void updateWidgets();
  311. const CGarrisonSlot * getSelectedSlotID() const;
  312. CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2, QueryID queryID);
  313. };
  314. /// Here you can buy ships
  315. class CShipyardWindow : public CStatusbarWindow
  316. {
  317. std::shared_ptr<CPicture> bgWater;
  318. std::shared_ptr<CAnimImage> bgShip;
  319. std::shared_ptr<CLabel> title;
  320. std::shared_ptr<CLabel> costLabel;
  321. std::shared_ptr<CAnimImage> woodPic;
  322. std::shared_ptr<CAnimImage> goldPic;
  323. std::shared_ptr<CLabel> woodCost;
  324. std::shared_ptr<CLabel> goldCost;
  325. std::shared_ptr<CButton> build;
  326. std::shared_ptr<CButton> quit;
  327. public:
  328. CShipyardWindow(const std::vector<si32> & cost, int state, int boatType, const std::function<void()> & onBuy);
  329. };
  330. /// Puzzle screen which gets uncovered when you visit obilisks
  331. class CPuzzleWindow : public CWindowObject
  332. {
  333. private:
  334. int3 grailPos;
  335. std::shared_ptr<CPicture> logo;
  336. std::shared_ptr<CLabel> title;
  337. std::shared_ptr<CButton> quitb;
  338. std::shared_ptr<CResDataBar> resDataBar;
  339. std::vector<std::shared_ptr<CPicture>> piecesToRemove;
  340. std::vector<std::shared_ptr<CPicture>> visiblePieces;
  341. ui8 currentAlpha;
  342. public:
  343. void showAll(SDL_Surface * to) override;
  344. void show(SDL_Surface * to) override;
  345. CPuzzleWindow(const int3 & grailPos, double discoveredRatio);
  346. };
  347. /// Creature transformer window
  348. class CTransformerWindow : public CStatusbarWindow, public CGarrisonHolder
  349. {
  350. class CItem : public CIntObject
  351. {
  352. public:
  353. int id;//position of creature in hero army
  354. bool left;//position of the item
  355. int size; //size of creature stack
  356. CTransformerWindow * parent;
  357. std::shared_ptr<CAnimImage> icon;
  358. std::shared_ptr<CLabel> count;
  359. void move();
  360. void clickLeft(tribool down, bool previousState) override;
  361. void update();
  362. CItem(CTransformerWindow * parent, int size, int id);
  363. };
  364. const CArmedInstance * army;//object with army for transforming (hero or town)
  365. const CGHeroInstance * hero;//only if we have hero in town
  366. const CGTownInstance * town;//market, town garrison is used if hero == nullptr
  367. std::shared_ptr<CLabel> titleLeft;
  368. std::shared_ptr<CLabel> titleRight;
  369. std::shared_ptr<CTextBox> helpLeft;
  370. std::shared_ptr<CTextBox> helpRight;
  371. std::vector<std::shared_ptr<CItem>> items;
  372. std::shared_ptr<CButton> all;
  373. std::shared_ptr<CButton> convert;
  374. std::shared_ptr<CButton> cancel;
  375. public:
  376. void makeDeal();
  377. void addAll();
  378. void updateGarrisons() override;
  379. CTransformerWindow(const CGHeroInstance * _hero, const CGTownInstance * _town);
  380. };
  381. class CUniversityWindow : public CStatusbarWindow
  382. {
  383. class CItem : public CIntObject
  384. {
  385. std::shared_ptr<CAnimImage> icon;
  386. std::shared_ptr<CAnimImage> topBar;
  387. std::shared_ptr<CAnimImage> bottomBar;
  388. std::shared_ptr<CLabel> name;
  389. std::shared_ptr<CLabel> level;
  390. public:
  391. int ID;//id of selected skill
  392. CUniversityWindow * parent;
  393. void showAll(SDL_Surface * to) override;
  394. void clickLeft(tribool down, bool previousState) override;
  395. void clickRight(tribool down, bool previousState) override;
  396. void hover(bool on) override;
  397. int state();//0=can't learn, 1=learned, 2=can learn
  398. CItem(CUniversityWindow * _parent, int _ID, int X, int Y);
  399. };
  400. const CGHeroInstance * hero;
  401. const IMarket * market;
  402. std::shared_ptr<CAnimation> bars;
  403. std::vector<std::shared_ptr<CItem>> items;
  404. std::shared_ptr<CButton> cancel;
  405. std::shared_ptr<CIntObject> titlePic;
  406. std::shared_ptr<CLabel> title;
  407. std::shared_ptr<CTextBox> clerkSpeech;
  408. public:
  409. CUniversityWindow(const CGHeroInstance * _hero, const IMarket * _market);
  410. void makeDeal(int skill);
  411. };
  412. /// Confirmation window for University
  413. class CUnivConfirmWindow : public CStatusbarWindow
  414. {
  415. std::shared_ptr<CTextBox> clerkSpeech;
  416. std::shared_ptr<CLabel> name;
  417. std::shared_ptr<CLabel> level;
  418. std::shared_ptr<CAnimImage> icon;
  419. CUniversityWindow * owner;
  420. std::shared_ptr<CButton> confirm;
  421. std::shared_ptr<CButton> cancel;
  422. std::shared_ptr<CAnimImage> costIcon;
  423. std::shared_ptr<CLabel> cost;
  424. void makeDeal(int skill);
  425. public:
  426. CUnivConfirmWindow(CUniversityWindow * PARENT, int SKILL, bool available);
  427. };
  428. /// Garrison window where you can take creatures out of the hero to place it on the garrison
  429. class CGarrisonWindow : public CWindowObject, public CGarrisonHolder
  430. {
  431. std::shared_ptr<CLabel> title;
  432. std::shared_ptr<CAnimImage> banner;
  433. std::shared_ptr<CAnimImage> portrait;
  434. std::shared_ptr<CGarrisonInt> garr;
  435. public:
  436. std::shared_ptr<CButton> quit;
  437. CGarrisonWindow(const CArmedInstance * up, const CGHeroInstance * down, bool removableUnits);
  438. void updateGarrisons() override;
  439. };
  440. /// Hill fort is the building where you can upgrade units
  441. class CHillFortWindow : public CStatusbarWindow, public CGarrisonHolder
  442. {
  443. private:
  444. static const int slotsCount = 7;
  445. //todo: mithril support
  446. static const int resCount = 7;
  447. const CGObjectInstance * fort;
  448. const CGHeroInstance * hero;
  449. std::shared_ptr<CLabel> title;
  450. std::shared_ptr<CHeroArea> heroPic;
  451. std::array<std::shared_ptr<CAnimImage>, resCount> totalIcons;
  452. std::array<std::shared_ptr<CLabel>, resCount> totalLabels;
  453. std::array<std::shared_ptr<CButton>, slotsCount> upgrade;//upgrade single creature
  454. std::array<int, slotsCount + 1> currState;//current state of slot - to avoid calls to getState or updating buttons
  455. //there is a place for only 2 resources per slot
  456. std::array< std::array<std::shared_ptr<CAnimImage>, 2>, slotsCount> slotIcons;
  457. std::array< std::array<std::shared_ptr<CLabel>, 2>, slotsCount> slotLabels;
  458. std::shared_ptr<CButton> upgradeAll;
  459. std::shared_ptr<CButton> quit;
  460. std::shared_ptr<CGarrisonInt> garr;
  461. std::string getDefForSlot(SlotID slot);
  462. std::string getTextForSlot(SlotID slot);
  463. void makeDeal(SlotID slot);//-1 for upgrading all creatures
  464. int getState(SlotID slot); //-1 = no creature 0=can't upgrade, 1=upgraded, 2=can upgrade
  465. public:
  466. CHillFortWindow(const CGHeroInstance * visitor, const CGObjectInstance * object);
  467. void updateGarrisons() override;//update buttons after garrison changes
  468. };
  469. class CThievesGuildWindow : public CStatusbarWindow
  470. {
  471. const CGObjectInstance * owner;
  472. std::shared_ptr<CButton> exitb;
  473. std::shared_ptr<CMinorResDataBar> resdatabar;
  474. std::vector<std::shared_ptr<CLabel>> rowHeaders;
  475. std::vector<std::shared_ptr<CAnimImage>> columnBackgrounds;
  476. std::vector<std::shared_ptr<CLabel>> columnHeaders;
  477. std::vector<std::shared_ptr<CAnimImage>> cells;
  478. std::vector<std::shared_ptr<CPicture>> banners;
  479. std::vector<std::shared_ptr<CAnimImage>> bestHeroes;
  480. std::vector<std::shared_ptr<CTextBox>> primSkillHeaders;
  481. std::vector<std::shared_ptr<CLabel>> primSkillValues;
  482. std::vector<std::shared_ptr<CAnimImage>> bestCreatures;
  483. std::vector<std::shared_ptr<CLabel>> personalities;
  484. public:
  485. CThievesGuildWindow(const CGObjectInstance * _owner);
  486. };