1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

fix scroll issue (#5076)

This commit is contained in:
Laserlicht
2025-02-15 15:44:41 +01:00
parent 3f390c4aac
commit bdc15cfdc5
2 changed files with 10 additions and 0 deletions

View File

@@ -550,6 +550,15 @@ CreatureTooltip::CreatureTooltip(Point pos, const CGCreature * creature)
tooltipTextbox = std::make_shared<CTextBox>(textContent, Rect(15, 95, 230, 150), 0, FONT_SMALL, ETextAlignment::TOPCENTER, Colors::WHITE); tooltipTextbox = std::make_shared<CTextBox>(textContent, Rect(15, 95, 230, 150), 0, FONT_SMALL, ETextAlignment::TOPCENTER, Colors::WHITE);
} }
void CreatureTooltip::show(Canvas & to)
{
// fixes scrolling of textbox (#5076)
setRedrawParent(true);
redraw();
CIntObject::show(to);
}
void MoraleLuckBox::set(const AFactionMember * node) void MoraleLuckBox::set(const AFactionMember * node)
{ {
OBJECT_CONSTRUCTION; OBJECT_CONSTRUCTION;

View File

@@ -166,6 +166,7 @@ class CreatureTooltip : public CIntObject
std::shared_ptr<CAnimImage> creatureImage; std::shared_ptr<CAnimImage> creatureImage;
std::shared_ptr<CTextBox> tooltipTextbox; std::shared_ptr<CTextBox> tooltipTextbox;
void show(Canvas & to) override;
public: public:
CreatureTooltip(Point pos, const CGCreature * creature); CreatureTooltip(Point pos, const CGCreature * creature);
}; };