mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-18 06:01:19 +02:00
When finding particles, show how many were found in HUD
This commit is contained in:
@@ -1232,6 +1232,7 @@ void Renderer::render_parts()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
foundElements = 0;
|
||||||
for(i = 0; i<=sim->parts_lastActiveIndex; i++) {
|
for(i = 0; i<=sim->parts_lastActiveIndex; i++) {
|
||||||
if (sim->parts[i].type && sim->parts[i].type >= 0 && sim->parts[i].type < PT_NUM) {
|
if (sim->parts[i].type && sim->parts[i].type >= 0 && sim->parts[i].type < PT_NUM) {
|
||||||
t = sim->parts[i].type;
|
t = sim->parts[i].type;
|
||||||
@@ -1424,6 +1425,7 @@ void Renderer::render_parts()
|
|||||||
{
|
{
|
||||||
colr = firer = 255;
|
colr = firer = 255;
|
||||||
colg = fireg = colb = fireb = 0;
|
colg = fireg = colb = fireb = 0;
|
||||||
|
foundElements++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2557,6 +2559,7 @@ Renderer::Renderer(Graphics * g, Simulation * sim):
|
|||||||
debugLines(false),
|
debugLines(false),
|
||||||
sampleColor(0xFFFFFFFF),
|
sampleColor(0xFFFFFFFF),
|
||||||
findingElement(0),
|
findingElement(0),
|
||||||
|
foundElements(0),
|
||||||
mousePos(0, 0),
|
mousePos(0, 0),
|
||||||
zoomWindowPosition(0, 0),
|
zoomWindowPosition(0, 0),
|
||||||
zoomScopePosition(0, 0),
|
zoomScopePosition(0, 0),
|
||||||
|
@@ -64,6 +64,7 @@ public:
|
|||||||
bool debugLines;
|
bool debugLines;
|
||||||
pixel sampleColor;
|
pixel sampleColor;
|
||||||
int findingElement;
|
int findingElement;
|
||||||
|
int foundElements;
|
||||||
|
|
||||||
//Mouse position for debug information
|
//Mouse position for debug information
|
||||||
ui::Point mousePos;
|
ui::Point mousePos;
|
||||||
|
@@ -2448,7 +2448,12 @@ void GameView::OnDraw()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (showDebug)
|
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)
|
if (c->GetReplaceModeFlags()&REPLACE_MODE)
|
||||||
fpsInfo << " [REPLACE MODE]";
|
fpsInfo << " [REPLACE MODE]";
|
||||||
if (c->GetReplaceModeFlags()&SPECIFIC_DELETE)
|
if (c->GetReplaceModeFlags()&SPECIFIC_DELETE)
|
||||||
|
Reference in New Issue
Block a user