|
|
|
@ -733,6 +733,11 @@ namespace MWGui
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MapWindow::addVisitedLocation(const std::string& name, int x, int y)
|
|
|
|
|
{
|
|
|
|
|
CellId cell;
|
|
|
|
|
cell.first = x;
|
|
|
|
|
cell.second = y;
|
|
|
|
|
if (mMarkers.insert(cell).second)
|
|
|
|
|
{
|
|
|
|
|
float worldX, worldY;
|
|
|
|
|
mGlobalMapRender->cellTopLeftCornerToImageSpace (x, y, worldX, worldY);
|
|
|
|
@ -744,7 +749,6 @@ namespace MWGui
|
|
|
|
|
worldY * mGlobalMapRender->getHeight()+offset,
|
|
|
|
|
markerSize, markerSize);
|
|
|
|
|
|
|
|
|
|
static int _counter=0;
|
|
|
|
|
MyGUI::Widget* markerWidget = mGlobalMap->createWidget<MyGUI::Widget>("MarkerButton",
|
|
|
|
|
widgetCoord, MyGUI::Align::Default);
|
|
|
|
|
markerWidget->setNeedMouseFocus(true);
|
|
|
|
@ -755,12 +759,7 @@ namespace MWGui
|
|
|
|
|
markerWidget->setDepth(Global_MarkerLayer);
|
|
|
|
|
markerWidget->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
|
|
|
|
markerWidget->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
|
|
|
|
++_counter;
|
|
|
|
|
|
|
|
|
|
CellId cell;
|
|
|
|
|
cell.first = x;
|
|
|
|
|
cell.second = y;
|
|
|
|
|
mMarkers.push_back(cell);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MapWindow::cellExplored(int x, int y)
|
|
|
|
@ -912,7 +911,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
mGlobalMapRender->read(map);
|
|
|
|
|
|
|
|
|
|
for (std::vector<ESM::GlobalMap::CellId>::iterator it = map.mMarkers.begin(); it != map.mMarkers.end(); ++it)
|
|
|
|
|
for (std::set<ESM::GlobalMap::CellId>::iterator it = map.mMarkers.begin(); it != map.mMarkers.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getStore().get<ESM::Cell>().search(it->first, it->second);
|
|
|
|
|
if (cell && !cell->mName.empty())
|
|
|
|
|