mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now. One issue remain - cannot dynamically choose components size based on text size.
This commit is contained in:
@@ -592,7 +592,7 @@ void ApplyClientNetPackVisitor::visitInfoWindow(InfoWindow & pack)
|
||||
std::string str;
|
||||
pack.text.toString(str);
|
||||
|
||||
if(!callInterfaceIfPresent(cl, pack.player, &CGameInterface::showInfoDialog, str, pack.components,(soundBase::soundID)pack.soundID))
|
||||
if(!callInterfaceIfPresent(cl, pack.player, &CGameInterface::showInfoDialog, pack.type, str, pack.components,(soundBase::soundID)pack.soundID))
|
||||
logNetwork->warn("We received InfoWindow for not our player...");
|
||||
}
|
||||
|
||||
@@ -855,11 +855,6 @@ void ApplyClientNetPackVisitor::visitPlayerMessageClient(PlayerMessageClient & p
|
||||
LOCPLINT->cingconsole->print(str.str());
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitShowInInfobox(ShowInInfobox & pack)
|
||||
{
|
||||
callInterfaceIfPresent(cl, pack.player, &IGameEventsReceiver::showComp, pack.c, pack.text.toString());
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitAdvmapSpellCast(AdvmapSpellCast & pack)
|
||||
{
|
||||
cl.invalidatePaths();
|
||||
|
||||
Reference in New Issue
Block a user