1
0
mirror of https://github.com/The-Powder-Toy/The-Powder-Toy.git synced 2025-04-12 18:32:33 +02:00

When finding particles, show how many were found in HUD

This commit is contained in:
jacob1 2018-03-07 23:19:55 -05:00
parent 5a61e6a619
commit b07e8d93d5
3 changed files with 10 additions and 1 deletions

@ -1232,6 +1232,7 @@ void Renderer::render_parts()
}
}
#endif
foundElements = 0;
for(i = 0; i<=sim->parts_lastActiveIndex; i++) {
if (sim->parts[i].type && sim->parts[i].type >= 0 && sim->parts[i].type < PT_NUM) {
t = sim->parts[i].type;
@ -1424,6 +1425,7 @@ void Renderer::render_parts()
{
colr = firer = 255;
colg = fireg = colb = fireb = 0;
foundElements++;
}
else
{
@ -2557,6 +2559,7 @@ Renderer::Renderer(Graphics * g, Simulation * sim):
debugLines(false),
sampleColor(0xFFFFFFFF),
findingElement(0),
foundElements(0),
mousePos(0, 0),
zoomWindowPosition(0, 0),
zoomScopePosition(0, 0),

@ -64,6 +64,7 @@ public:
bool debugLines;
pixel sampleColor;
int findingElement;
int foundElements;
//Mouse position for debug information
ui::Point mousePos;

@ -2448,7 +2448,12 @@ void GameView::OnDraw()
#endif
if (showDebug)
fpsInfo << " Parts: " << sample.NumParts;
{
if (ren->findingElement)
fpsInfo << " Parts: " << ren->foundElements << "/" << sample.NumParts;
else
fpsInfo << " Parts: " << sample.NumParts;
}
if (c->GetReplaceModeFlags()&REPLACE_MODE)
fpsInfo << " [REPLACE MODE]";
if (c->GetReplaceModeFlags()&SPECIFIC_DELETE)