Changeset View
Changeset View
Standalone View
Standalone View
source/ps/ProfileViewer.cpp
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | else | ||||
textRenderer.Color(1.0f, 1.0f, 1.0f); | textRenderer.Color(1.0f, 1.0f, 1.0f); | ||||
if (table->GetChild(row)) | if (table->GetChild(row)) | ||||
{ | { | ||||
textRenderer.PrintfAt(-15.0f, 0.0f, L"%d", currentExpandId); | textRenderer.PrintfAt(-15.0f, 0.0f, L"%d", currentExpandId); | ||||
currentExpandId++; | currentExpandId++; | ||||
} | } | ||||
float colX = 0.0f; | float rowColX = 0.0f; | ||||
for (size_t col = 0; col < columns.size(); ++col) | for (size_t col = 0; col < columns.size(); ++col) | ||||
{ | { | ||||
CStrW text = table->GetCellText(row, col).FromUTF8(); | CStrW text = table->GetCellText(row, col).FromUTF8(); | ||||
int w, h; | int w, h; | ||||
font.CalculateStringSize(text.c_str(), w, h); | font.CalculateStringSize(text.c_str(), w, h); | ||||
float x = colX; | float x = rowColX; | ||||
if (col > 0) // right-align all but the first column | if (col > 0) // right-align all but the first column | ||||
x += columns[col].width - w; | x += columns[col].width - w; | ||||
textRenderer.Put(x, 0.0f, text.c_str()); | textRenderer.Put(x, 0.0f, text.c_str()); | ||||
colX += columns[col].width; | rowColX += columns[col].width; | ||||
} | } | ||||
textRenderer.Translate(0.0f, lineSpacing, 0.0f); | textRenderer.Translate(0.0f, lineSpacing, 0.0f); | ||||
} | } | ||||
textRenderer.Color(1.0f, 1.0f, 1.0f); | textRenderer.Color(1.0f, 1.0f, 1.0f); | ||||
if (m->path.size() > 1) | if (m->path.size() > 1) | ||||
▲ Show 20 Lines • Show All 318 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator