Added region positions to the world map tiles

This feature added the setting 'SFMapShowRegionPositions'
This commit is contained in:
Sim Federal
2014-06-17 14:06:42 -05:00
parent 6722e25cbe
commit e93fdf4615
2 changed files with 18 additions and 0 deletions

View File

@@ -1043,6 +1043,17 @@ Found in Advanced->Rendering->Info Displays</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>SFMapShowRegionPositions</key>
<map>
<key>Comment</key>
<string>Shows the X and Y coordinates above the sim name in the world map.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>SLBShowFPS</key>
<map>
<key>Comment</key>

View File

@@ -525,6 +525,13 @@ void LLWorldMapView::draw()
llfloor(left + 3), llfloor(bottom + 2),
LLColor4::white,
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);
static const LLCachedControl<bool> show_region_positions("SFMapShowRegionPositions");
if (show_region_positions)
font->renderUTF8(
llformat("(%d, %d)", llfloor(info->getGlobalOrigin().mdV[VX]/256), llfloor(info->getGlobalOrigin().mdV[VY])/256), 0,
llfloor(left + 3), llfloor(bottom + 14),
LLColor4::white,
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);
}
}
}