MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / timeDisplay

Method timeDisplay

src/Geoscape/GeoscapeState.cpp:579–609  ·  view source on GitHub ↗

* Updates the Geoscape clock with the latest * game time and date in human-readable format. (+Funds) */

Source from the content-addressed store, hash-verified

577 * game time and date in human-readable format. (+Funds)
578 */
579void GeoscapeState::timeDisplay()
580{
581 if (Options::showFundsOnGeoscape)
582 {
583 _txtFunds->setText(Text::formatFunding(_game->getSavedGame()->getFunds()));
584 }
585
586 std::wostringstream ss;
587 ss << std::setfill(L'0') << std::setw(2) << _game->getSavedGame()->getTime()->getSecond();
588 _txtSec->setText(ss.str());
589
590 std::wostringstream ss2;
591 ss2 << std::setfill(L'0') << std::setw(2) << _game->getSavedGame()->getTime()->getMinute();
592 _txtMin->setText(ss2.str());
593
594 std::wostringstream ss3;
595 ss3 << _game->getSavedGame()->getTime()->getHour();
596 _txtHour->setText(ss3.str());
597
598 std::wostringstream ss4;
599 ss4 << _game->getSavedGame()->getTime()->getDayString(_game->getLanguage());
600 _txtDay->setText(ss4.str());
601
602 _txtWeekday->setText(tr(_game->getSavedGame()->getTime()->getWeekdayString()));
603
604 _txtMonth->setText(tr(_game->getSavedGame()->getTime()->getMonthString()));
605
606 std::wostringstream ss5;
607 ss5 << _game->getSavedGame()->getTime()->getYear();
608 _txtYear->setText(ss5.str());
609}
610
611/**
612 * Advances the game timer according to

Callers

nothing calls this directly

Calls 12

getFundsMethod · 0.80
getSavedGameMethod · 0.80
getSecondMethod · 0.80
getMinuteMethod · 0.80
getHourMethod · 0.80
getDayStringMethod · 0.80
getLanguageMethod · 0.80
getWeekdayStringMethod · 0.80
getMonthStringMethod · 0.80
getYearMethod · 0.80
setTextMethod · 0.45
getTimeMethod · 0.45

Tested by

no test coverage detected