1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

set map window cell name

This commit is contained in:
scrawl 2012-03-10 16:05:12 +01:00
parent 5b38b17baf
commit fa68be2b19
3 changed files with 20 additions and 0 deletions

View File

@ -401,3 +401,8 @@ const ESMS::ESMStore& WindowManager::getStore() const
{
return environment.mWorld->getStore();
}
void WindowManager::setCellName(const std::string& cellName)
{
map->setCellName(cellName);
}

View File

@ -151,6 +151,8 @@ namespace MWGui
void updateSkillArea(); ///< update display of skills, factions, birth sign, reputation and bounty
void setCellName(const std::string& cellName); ///< set the cell name to display in the map window
template<typename T>
void removeDialog(T*& dialog); ///< Casts to OEngine::GUI::Layout and calls removeDialog, then resets pointer to nullptr.
void removeDialog(OEngine::GUI::Layout* dialog); ///< Hides dialog and schedules dialog to be deleted.

View File

@ -6,6 +6,8 @@
#include "../mwsound/soundmanager.hpp"
#include "../mwgui/window_manager.hpp"
#include "ptr.hpp"
#include "environment.hpp"
#include "player.hpp"
@ -118,6 +120,17 @@ namespace MWWorld
// TODO orientation
mEnvironment.mMechanicsManager->addActor (mWorld->getPlayer().getPlayer());
mEnvironment.mMechanicsManager->watchActor (mWorld->getPlayer().getPlayer());
// set map window cell name
if (!(mCurrentCell->cell->data.flags & ESM::Cell::Interior))
{
if (mCurrentCell->cell->name != "")
mEnvironment.mWindowManager->setCellName( mCurrentCell->cell->name );
else
mEnvironment.mWindowManager->setCellName( mCurrentCell->cell->region );
}
else
mEnvironment.mWindowManager->setCellName( mCurrentCell->cell->name );
}
void Scene::changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos)