1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Refactoring & deduplication of infowindow code

This commit is contained in:
Ivan Savenko
2024-02-26 18:32:15 +02:00
parent 658cc14cd0
commit e6b339448f
10 changed files with 75 additions and 311 deletions

View File

@@ -45,7 +45,7 @@ CHeroBackpackWindow::CHeroBackpackWindow(const CGHeroInstance * hero)
void CHeroBackpackWindow::showAll(Canvas & to)
{
CIntObject::showAll(to);
CMessage::drawBorder(PlayerColor(LOCPLINT->playerID), to.getInternalSurface(), pos.w+28, pos.h+29, pos.x-14, pos.y-15);
CMessage::drawBorder(PlayerColor(LOCPLINT->playerID), to, pos.w+28, pos.h+29, pos.x-14, pos.y-15);
}
CHeroQuickBackpackWindow::CHeroQuickBackpackWindow(const CGHeroInstance * hero, ArtifactPosition targetSlot)
@@ -87,6 +87,6 @@ void CHeroQuickBackpackWindow::showAll(Canvas & to)
close();
return;
}
CMessage::drawBorder(PlayerColor(LOCPLINT->playerID), to.getInternalSurface(), pos.w + 28, pos.h + 29, pos.x - 14, pos.y - 15);
CMessage::drawBorder(PlayerColor(LOCPLINT->playerID), to, pos.w + 28, pos.h + 29, pos.x - 14, pos.y - 15);
CIntObject::showAll(to);
}