mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Refactoring & deduplication of infowindow code
This commit is contained in:
@ -369,6 +369,17 @@ void CTextBox::sliderMoved(int to)
|
||||
label->scrollTextTo(to);
|
||||
}
|
||||
|
||||
void CTextBox::trimToFit()
|
||||
{
|
||||
if (slider)
|
||||
return;
|
||||
|
||||
pos.w = label->textSize.x;
|
||||
pos.h = label->textSize.y;
|
||||
label->pos.w = label->textSize.x;
|
||||
label->pos.h = label->textSize.y;
|
||||
}
|
||||
|
||||
void CTextBox::resize(Point newSize)
|
||||
{
|
||||
pos.w = newSize.x;
|
||||
|
Reference in New Issue
Block a user