mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
right click opens hero info
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#include "../widgets/Slider.h"
|
#include "../widgets/Slider.h"
|
||||||
#include "../widgets/TextControls.h"
|
#include "../widgets/TextControls.h"
|
||||||
#include "../widgets/ObjectLists.h"
|
#include "../widgets/ObjectLists.h"
|
||||||
|
#include "../widgets/MiscWidgets.h"
|
||||||
|
|
||||||
#include "../render/Canvas.h"
|
#include "../render/Canvas.h"
|
||||||
#include "../render/CAnimation.h"
|
#include "../render/CAnimation.h"
|
||||||
@@ -410,6 +411,7 @@ CLevelWindow::CLevelWindow(const CGHeroInstance * hero, PrimarySkill pskill, std
|
|||||||
}
|
}
|
||||||
|
|
||||||
portrait = std::make_shared<CAnimImage>(AnimationPath::builtin("PortraitsLarge"), hero->getIconIndex(), 0, 170, 66);
|
portrait = std::make_shared<CAnimImage>(AnimationPath::builtin("PortraitsLarge"), hero->getIconIndex(), 0, 170, 66);
|
||||||
|
portraitArea = std::make_shared<LRClickableArea>(Rect(170, 66, 58, 64), nullptr, [hero](){ GH.windows().createAndPushWindow<CRClickPopupInt>(std::make_shared<CHeroWindow>(hero)); });
|
||||||
ok = std::make_shared<CButton>(Point(297, 413), AnimationPath::builtin("IOKAY"), CButton::tooltip(), std::bind(&CLevelWindow::close, this), EShortcut::GLOBAL_ACCEPT);
|
ok = std::make_shared<CButton>(Point(297, 413), AnimationPath::builtin("IOKAY"), CButton::tooltip(), std::bind(&CLevelWindow::close, this), EShortcut::GLOBAL_ACCEPT);
|
||||||
|
|
||||||
//%s has gained a level.
|
//%s has gained a level.
|
||||||
|
@@ -35,6 +35,7 @@ class CGStatusBar;
|
|||||||
class CTextBox;
|
class CTextBox;
|
||||||
class CGarrisonInt;
|
class CGarrisonInt;
|
||||||
class CGarrisonSlot;
|
class CGarrisonSlot;
|
||||||
|
class LRClickableArea;
|
||||||
|
|
||||||
enum class EUserEvent;
|
enum class EUserEvent;
|
||||||
|
|
||||||
@@ -130,6 +131,7 @@ public:
|
|||||||
class CLevelWindow : public CWindowObject
|
class CLevelWindow : public CWindowObject
|
||||||
{
|
{
|
||||||
std::shared_ptr<CAnimImage> portrait;
|
std::shared_ptr<CAnimImage> portrait;
|
||||||
|
std::shared_ptr<LRClickableArea> portraitArea;
|
||||||
std::shared_ptr<CButton> ok;
|
std::shared_ptr<CButton> ok;
|
||||||
std::shared_ptr<CLabel> mainTitle;
|
std::shared_ptr<CLabel> mainTitle;
|
||||||
std::shared_ptr<CLabel> levelTitle;
|
std::shared_ptr<CLabel> levelTitle;
|
||||||
|
Reference in New Issue
Block a user