1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Gui cleanup3 - UI refactoring to use smart pointers (#440)

* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
This commit is contained in:
Alexander Shishkin
2018-04-07 14:34:11 +03:00
committed by ArseniyShestakov
parent db60983b5a
commit 5c09f751b3
73 changed files with 4793 additions and 4544 deletions

View File

@@ -534,15 +534,10 @@ void GiveHero::applyFirstCl(CClient *cl)
void InfoWindow::applyCl(CClient *cl)
{
std::vector<Component*> comps;
for(auto & elem : components)
{
comps.push_back(&elem);
}
std::string str;
text.toString(str);
if(!callInterfaceIfPresent(cl, player, &CGameInterface::showInfoDialog, str,comps,(soundBase::soundID)soundID))
if(!callInterfaceIfPresent(cl, player, &CGameInterface::showInfoDialog, str,components,(soundBase::soundID)soundID))
logNetwork->warn("We received InfoWindow for not our player...");
}