Permalink
Browse files

When finding particles, show how many were found in HUD

  • Loading branch information...
jacob1 committed Mar 8, 2018
1 parent 5a61e6a commit b07e8d93d5f0568512531832728644510d91bee1
Showing with 10 additions and 1 deletion.
  1. +3 −0 src/graphics/Renderer.cpp
  2. +1 −0 src/graphics/Renderer.h
  3. +6 −1 src/gui/game/GameView.cpp
@@ -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 @@ class Renderer
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)

0 comments on commit b07e8d9

Please sign in to comment.