MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / refreshMainUI

Method refreshMainUI

source/modes/GameMode.cpp:967–993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967void GameMode::refreshMainUI()
968{
969 Seat* mySeat = mGameMap->getLocalPlayer()->getSeat();
970 CEGUI::Window* guiSheet = mRootWindow;
971
972 //! \brief Updates common info on screen.
973 CEGUI::Window* widget = guiSheet->getChild(Gui::DISPLAY_TERRITORY);
974 std::stringstream tempSS("");
975 tempSS << mySeat->getNumClaimedTiles();
976 widget->setText(tempSS.str());
977
978 widget = guiSheet->getChild(Gui::DISPLAY_CREATURES);
979 tempSS.str("");
980 tempSS << mySeat->getNumCreaturesFighters() << "/" << mySeat->getNumCreaturesFightersMax();
981 widget->setText(tempSS.str());
982
983 widget = guiSheet->getChild(Gui::DISPLAY_GOLD);
984 tempSS.str("");
985 tempSS << mySeat->getGold() << "/" << mySeat->getGoldMax();
986 widget->setText(tempSS.str());
987
988 widget = guiSheet->getChild(Gui::DISPLAY_MANA);
989 tempSS.str("");
990 tempSS << mySeat->getMana() << " " << (mySeat->getManaDelta() >= 0 ? "+" : "-")
991 << mySeat->getManaDelta();
992 widget->setText(tempSS.str());
993}
994
995void GameMode::refreshPlayerGoals(const std::string& goalsDisplayString)
996{

Callers

nothing calls this directly

Calls 10

getLocalPlayerMethod · 0.80
getNumClaimedTilesMethod · 0.80
setTextMethod · 0.80
getGoldMethod · 0.80
getGoldMaxMethod · 0.80
getManaMethod · 0.80
getManaDeltaMethod · 0.80
getSeatMethod · 0.45

Tested by

no test coverage detected