MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / begin

Method begin

game/ui/tileview/battleview.cpp:1287–1323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1285BattleView::~BattleView() = default;
1286
1287void BattleView::begin()
1288{
1289 BattleTileView::begin();
1290 fw().jukebox->play(JukeBox::PlayList::Tactical);
1291 uiTabsRT[0]->findControl("BUTTON_LAYER_1")->setVisible(maxZDraw >= 1);
1292 uiTabsRT[0]->findControl("BUTTON_LAYER_2")->setVisible(maxZDraw >= 2);
1293 uiTabsRT[0]->findControl("BUTTON_LAYER_3")->setVisible(maxZDraw >= 3);
1294 uiTabsRT[0]->findControl("BUTTON_LAYER_4")->setVisible(maxZDraw >= 4);
1295 uiTabsRT[0]->findControl("BUTTON_LAYER_5")->setVisible(maxZDraw >= 5);
1296 uiTabsRT[0]->findControl("BUTTON_LAYER_6")->setVisible(maxZDraw >= 6);
1297 uiTabsRT[0]->findControl("BUTTON_LAYER_7")->setVisible(maxZDraw >= 7);
1298 uiTabsRT[0]->findControl("BUTTON_LAYER_8")->setVisible(maxZDraw >= 8);
1299 uiTabsRT[0]->findControl("BUTTON_LAYER_9")->setVisible(maxZDraw >= 9);
1300 uiTabsTB[0]->findControl("BUTTON_LAYER_1")->setVisible(maxZDraw >= 1);
1301 uiTabsTB[0]->findControl("BUTTON_LAYER_2")->setVisible(maxZDraw >= 2);
1302 uiTabsTB[0]->findControl("BUTTON_LAYER_3")->setVisible(maxZDraw >= 3);
1303 uiTabsTB[0]->findControl("BUTTON_LAYER_4")->setVisible(maxZDraw >= 4);
1304 uiTabsTB[0]->findControl("BUTTON_LAYER_5")->setVisible(maxZDraw >= 5);
1305 uiTabsTB[0]->findControl("BUTTON_LAYER_6")->setVisible(maxZDraw >= 6);
1306 uiTabsTB[0]->findControl("BUTTON_LAYER_7")->setVisible(maxZDraw >= 7);
1307 uiTabsTB[0]->findControl("BUTTON_LAYER_8")->setVisible(maxZDraw >= 8);
1308 uiTabsTB[0]->findControl("BUTTON_LAYER_9")->setVisible(maxZDraw >= 9);
1309 uiTabsTB[3]->findControl("BUTTON_LAYER_1")->setVisible(maxZDraw >= 1);
1310 uiTabsTB[3]->findControl("BUTTON_LAYER_2")->setVisible(maxZDraw >= 2);
1311 uiTabsTB[3]->findControl("BUTTON_LAYER_3")->setVisible(maxZDraw >= 3);
1312 uiTabsTB[3]->findControl("BUTTON_LAYER_4")->setVisible(maxZDraw >= 4);
1313 uiTabsTB[3]->findControl("BUTTON_LAYER_5")->setVisible(maxZDraw >= 5);
1314 uiTabsTB[3]->findControl("BUTTON_LAYER_6")->setVisible(maxZDraw >= 6);
1315 uiTabsTB[3]->findControl("BUTTON_LAYER_7")->setVisible(maxZDraw >= 7);
1316 uiTabsTB[3]->findControl("BUTTON_LAYER_8")->setVisible(maxZDraw >= 8);
1317 uiTabsTB[3]->findControl("BUTTON_LAYER_9")->setVisible(maxZDraw >= 9);
1318 if (battle.mode == Battle::Mode::TurnBased)
1319 {
1320 auto event = GameBattleEvent(GameEventType::NewTurn, battle.shared_from_this());
1321 baseForm->findControlTyped<Ticker>("NEWS_TICKER")->addMessage(event.message());
1322 }
1323}
1324
1325void BattleView::refresh()
1326{

Callers 4

BattleViewMethod · 0.45
updateSelectedUnitsMethod · 0.45
debugShotMethod · 0.45
orderSelectMethod · 0.45

Calls 6

GameBattleEventClass · 0.85
findControlMethod · 0.80
addMessageMethod · 0.80
messageMethod · 0.80
playMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected