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:
@@ -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);
|
||||
}
|
||||
|
||||
void CreatureTooltip::show(Canvas & to)
|
||||
{
|
||||
// fixes scrolling of textbox (#5076)
|
||||
setRedrawParent(true);
|
||||
redraw();
|
||||
|
||||
CIntObject::show(to);
|
||||
}
|
||||
|
||||
void MoraleLuckBox::set(const AFactionMember * node)
|
||||
{
|
||||
OBJECT_CONSTRUCTION;
|
||||
|
@@ -166,6 +166,7 @@ class CreatureTooltip : public CIntObject
|
||||
std::shared_ptr<CAnimImage> creatureImage;
|
||||
std::shared_ptr<CTextBox> tooltipTextbox;
|
||||
|
||||
void show(Canvas & to) override;
|
||||
public:
|
||||
CreatureTooltip(Point pos, const CGCreature * creature);
|
||||
};
|
||||
|
Reference in New Issue
Block a user