mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-09 23:51:38 +00:00
[Client] Update GUIController to C++11
This commit is contained in:
parent
aa1f5c3cd3
commit
a110ec1767
1 changed files with 7 additions and 9 deletions
|
@ -98,15 +98,15 @@ void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox &
|
||||||
|
|
||||||
std::string buf;
|
std::string buf;
|
||||||
|
|
||||||
for (size_t i = 0; i < guiMessageBox.data.size(); i++)
|
for(const auto &data : guiMessageBox.data)
|
||||||
{
|
{
|
||||||
if (guiMessageBox.data[i] == '\n')
|
if (data == '\n')
|
||||||
{
|
{
|
||||||
list.push_back(buf);
|
list.push_back(buf);
|
||||||
buf.erase();
|
buf.erase();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
buf += guiMessageBox.data[i];
|
buf += data;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.push_back(buf);
|
list.push_back(buf);
|
||||||
|
@ -373,13 +373,11 @@ void mwmp::GUIController::setGlobalMapMarkerTooltip(MWGui::MapWindow *mapWindow,
|
||||||
|
|
||||||
void mwmp::GUIController::updateGlobalMapMarkerTooltips(MWGui::MapWindow *mapWindow)
|
void mwmp::GUIController::updateGlobalMapMarkerTooltips(MWGui::MapWindow *mapWindow)
|
||||||
{
|
{
|
||||||
std::map<std::pair<int, int>, MyGUI::Widget*>::iterator widgetIt = mapWindow->mGlobalMapMarkers.begin();
|
for(const auto &widget : mapWindow->mGlobalMapMarkers)
|
||||||
for (; widgetIt != mapWindow->mGlobalMapMarkers.end(); ++widgetIt)
|
|
||||||
{
|
{
|
||||||
int x = widgetIt->first.first;
|
const int x = widget.first.first;
|
||||||
int y = widgetIt->first.second;
|
const int y = widget.first.second;
|
||||||
MyGUI::Widget* markerWidget = widgetIt->second;
|
setGlobalMapMarkerTooltip(mapWindow, widget.second, x, y);
|
||||||
setGlobalMapMarkerTooltip(mapWindow, markerWidget, x, y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue