mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix tactic button
This commit is contained in:
parent
660d25a335
commit
e8845244f7
@ -99,12 +99,10 @@ void BattleControlPanel::tacticPhaseStarted()
|
||||
}
|
||||
void BattleControlPanel::tacticPhaseEnded()
|
||||
{
|
||||
build(variables["battleItems"]);
|
||||
deleteWidget("tacticNext");
|
||||
deleteWidget("tacticEnd");
|
||||
|
||||
if(auto w = widget<CButton>("tacticNext"))
|
||||
w.reset();
|
||||
if(auto w = widget<CButton>("tacticEnd"))
|
||||
w.reset();
|
||||
build(variables["battleItems"]);
|
||||
|
||||
if(auto w = widget<CPicture>("menu"))
|
||||
{
|
||||
|
@ -66,6 +66,13 @@ void InterfaceObjectConfigurable::addCallback(const std::string & callbackName,
|
||||
callbacks[callbackName] = callback;
|
||||
}
|
||||
|
||||
void InterfaceObjectConfigurable::deleteWidget(const std::string & name)
|
||||
{
|
||||
auto iter = widgets.find(name);
|
||||
if(iter != widgets.end())
|
||||
widgets.erase(iter);
|
||||
}
|
||||
|
||||
void InterfaceObjectConfigurable::build(const JsonNode &config)
|
||||
{
|
||||
OBJ_CONSTRUCTION;
|
||||
|
@ -52,6 +52,8 @@ protected:
|
||||
return nullptr;
|
||||
return std::dynamic_pointer_cast<T>(iter->second);
|
||||
}
|
||||
|
||||
void deleteWidget(const std::string & name);
|
||||
|
||||
//basic serializers
|
||||
Point readPosition(const JsonNode &) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user