mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
Revert "Remove uncompleted code"
This reverts commit 0c41787ca563c839ff4de5f81ee826e6d7427fff.
This commit is contained in:
parent
f27a40dd34
commit
42281f51e8
@ -105,8 +105,7 @@ RandomMapTab::RandomMapTab():
|
|||||||
|
|
||||||
addCallback("teamAlignments", [&](int)
|
addCallback("teamAlignments", [&](int)
|
||||||
{
|
{
|
||||||
//TODO: support team alignments
|
GH.pushIntT<TeamAlignmentsWidget>(*this);
|
||||||
//GH.pushIntT<TeamAlignmentsWidget>(*this);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
for(auto road : VLC->terrainTypeHandler->roads())
|
for(auto road : VLC->terrainTypeHandler->roads())
|
||||||
@ -449,3 +448,24 @@ void TemplatesDropBox::setTemplate(const CRmgTemplate * tmpl)
|
|||||||
assert(GH.topInt().get() == this);
|
assert(GH.topInt().get() == this);
|
||||||
GH.popInt(GH.topInt());
|
GH.popInt(GH.topInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TeamAlignmentsWidget::TeamAlignmentsWidget(RandomMapTab & randomMapTab):
|
||||||
|
CIntObject(),
|
||||||
|
randomMapTab(randomMapTab)
|
||||||
|
{
|
||||||
|
OBJ_CONSTRUCTION;
|
||||||
|
|
||||||
|
pos.w = 300;
|
||||||
|
pos.h = 300;
|
||||||
|
background = std::make_shared<CFilledTexture>("Bl3DCvex", pos);
|
||||||
|
center(pos);
|
||||||
|
|
||||||
|
buttonOk = std::make_shared<CButton>(Point(43, 240), "MUBCHCK.DEF", CGI->generaltexth->zelp[560], [](){});
|
||||||
|
buttonCancel = std::make_shared<CButton>(Point(193, 240), "MUBCANC.DEF", CGI->generaltexth->zelp[561], [&]()
|
||||||
|
{
|
||||||
|
assert(GH.topInt().get() == this);
|
||||||
|
GH.popInt(GH.topInt());
|
||||||
|
}, SDLK_ESCAPE);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -84,3 +84,18 @@ private:
|
|||||||
std::vector<const CRmgTemplate *> curItems;
|
std::vector<const CRmgTemplate *> curItems;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TeamAlignmentsWidget: public CIntObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TeamAlignmentsWidget(RandomMapTab & randomMapTab);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
RandomMapTab & randomMapTab;
|
||||||
|
|
||||||
|
std::shared_ptr<CFilledTexture> background;
|
||||||
|
std::shared_ptr<CLabelGroup> labels;
|
||||||
|
std::shared_ptr<CButton> buttonOk, buttonCancel;
|
||||||
|
std::vector<std::shared_ptr<CToggleGroup>> teams;
|
||||||
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user