Change the normalized UV formatting to use Formatter.Format() instead of

doing it myself.
This commit is contained in:
loosche
2014-12-19 00:31:17 -08:00
parent 5f3b535d31
commit 9ef5080302
+2 -7
View File
@@ -1415,14 +1415,9 @@ namespace renderdocui.Windows
float invWidth = tex.width > 0 ? 1.0f / tex.width : 0.0f;
float invHeight = tex.height > 0 ? 1.0f /tex.height : 0.0f;
int minCount = m_Core.Config.Formatter_MinFigures;
int maxCount = m_Core.Config.Formatter_MaxFigures;
string minFigures= new String('0', minCount);
string maxFigures= new String('#', maxCount-minCount);
string formatString= String.Format("{{0}}, {{1}} ({{2:0.{0}{1}}}, {{3:0.{2}{3}}})",
minFigures, maxFigures, minFigures, maxFigures);
string hoverCoords = String.Format("{0}, {1}, ({2}, {3})",
x, y, Formatter.Format(x * invWidth), Formatter.Format(y * invHeight));
string hoverCoords = String.Format(formatString, x, y, x * invWidth, y * invHeight);
string statusText = "Hover - " + hoverCoords;
if (m_CurHoverPixel.X > tex.width || m_CurHoverPixel.Y > tex.height || m_CurHoverPixel.X < 0 || m_CurHoverPixel.Y < 0)