mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: improve text and value representation on GUI
Small UX improvement.
This commit is contained in:
parent
5955ac7864
commit
d38bdd1abd
@ -200,7 +200,7 @@ void Editor::handleCommonSettings()
|
||||
int gw = 0, gh = 0;
|
||||
rcCalcGridSize(bmin, bmax, m_cellSize, &gw, &gh);
|
||||
char text[64];
|
||||
snprintf(text, 64, "Voxels %d x %d", gw, gh);
|
||||
snprintf(text, 64, "Voxels: %d x %d", gw, gh);
|
||||
ImGui::Text(text);
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ void Editor_TileMesh::handleSettings()
|
||||
Editor::handleCommonSettings();
|
||||
|
||||
ImGui::Text("Tiling");
|
||||
ImGui::SliderInt("TileSize", &m_tileSize, 8, 1024);
|
||||
ImGui::SliderInt("Tile Size", &m_tileSize, 8, 1024);
|
||||
|
||||
ImGui::Checkbox("Build All Tiles", &m_buildAll);
|
||||
ImGui::Checkbox("Keep Intermediate Results", &m_keepInterResults);
|
||||
@ -267,9 +267,9 @@ void Editor_TileMesh::handleSettings()
|
||||
const int ts = m_tileSize;
|
||||
const int tw = (gw + ts-1) / ts;
|
||||
const int th = (gh + ts-1) / ts;
|
||||
snprintf(text, sizeof(text), "Tiles %d x %d", tw, th);
|
||||
snprintf(text, sizeof(text), "Tiles: %d x %d", tw, th);
|
||||
ImGui::Text(text);
|
||||
snprintf(text, sizeof(text), "Tile Sizes %g x %g (%g)", tw*m_cellSize, th*m_cellSize, m_tileSize*m_cellSize);
|
||||
snprintf(text, sizeof(text), "Tile Sizes: %g x %g (%g)", tw*m_cellSize, th*m_cellSize, m_tileSize*m_cellSize);
|
||||
ImGui::Text(text);
|
||||
// Max tiles and max polys affect how the tile IDs are calculated.
|
||||
// There are 28 bits available for identifying a tile and a polygon.
|
||||
@ -277,9 +277,9 @@ void Editor_TileMesh::handleSettings()
|
||||
int polyBits = 28 - tileBits;
|
||||
m_maxTiles = 1 << tileBits;
|
||||
m_maxPolysPerTile = 1 << polyBits;
|
||||
snprintf(text, sizeof(text), "Max Tiles %d", m_maxTiles);
|
||||
snprintf(text, sizeof(text), "Max Tiles: %d", m_maxTiles);
|
||||
ImGui::Text(text);
|
||||
snprintf(text, sizeof(text), "Max Polys %d", m_maxPolysPerTile);
|
||||
snprintf(text, sizeof(text), "Max Polys: %d", m_maxPolysPerTile);
|
||||
ImGui::Text(text);
|
||||
}
|
||||
else
|
||||
|
@ -981,8 +981,11 @@ int not_main(int argc, char** argv)
|
||||
if (geom)
|
||||
{
|
||||
char text[64];
|
||||
snprintf(text, 64, "Verts: %.1fk Tris: %.1fk",
|
||||
geom->getMesh()->getVertCount() / 1000.0f,
|
||||
snprintf(text, sizeof(text), "Verts: %.1fk",
|
||||
geom->getMesh()->getVertCount() / 1000.0f);
|
||||
ImGui::Text(text);
|
||||
|
||||
snprintf(text, sizeof(text), "Tris: %.1fk",
|
||||
geom->getMesh()->getTriCount() / 1000.0f);
|
||||
ImGui::Text(text);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user