mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
fix multiplayer
This commit is contained in:
parent
44ece25042
commit
196cd41e35
@ -200,6 +200,11 @@ void OptionsTab::recreate()
|
||||
entries.clear();
|
||||
humanPlayers = 0;
|
||||
|
||||
for (auto selectionWindow : GH.windows().findWindows<SelectionWindow>())
|
||||
{
|
||||
selectionWindow->reopen();
|
||||
}
|
||||
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
for(auto & pInfo : SEL->getStartInfo()->playerInfos)
|
||||
{
|
||||
@ -671,6 +676,13 @@ void OptionsTab::SelectionWindow::setSelection()
|
||||
CSH->setPlayerOption(LobbyChangePlayerOption::BONUS_ID, selectedBonus, color);
|
||||
}
|
||||
|
||||
void OptionsTab::SelectionWindow::reopen()
|
||||
{
|
||||
std::shared_ptr<SelectionWindow> window = std::shared_ptr<SelectionWindow>(new SelectionWindow(color, type));
|
||||
close();
|
||||
GH.windows().pushWindow(window);
|
||||
}
|
||||
|
||||
void OptionsTab::SelectionWindow::recreate()
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
|
@ -115,7 +115,7 @@ private:
|
||||
std::vector<FactionID> factions;
|
||||
std::vector<HeroTypeID> heroes;
|
||||
std::vector<HeroTypeID> unusableHeroes;
|
||||
|
||||
|
||||
FactionID initialFaction;
|
||||
HeroTypeID initialHero;
|
||||
int initialBonus;
|
||||
@ -145,6 +145,8 @@ private:
|
||||
void showPopupWindow(const Point & cursorPosition) override;
|
||||
|
||||
public:
|
||||
void reopen();
|
||||
|
||||
SelectionWindow(PlayerColor _color, SelType _type);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user