summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-05 16:02:03 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-05 16:02:03 (GMT)
commitd379390d066add46513da73a690ef20414b6627b (patch)
tree26ccfc41191a5a9a8624fa716880f9e3a6ba4475 /src/game/GameView.cpp
parent3f437636950f599a664d0644402d7d08d9243890 (diff)
downloadpowder-d379390d066add46513da73a690ef20414b6627b.zip
powder-d379390d066add46513da73a690ef20414b6627b.tar.gz
Newtonian gravity field info in HUD (Maybe we could have an arrow to show direction in future). Fixed #152
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 8b7ee2e..3955c67 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -2004,6 +2004,8 @@ void GameView::OnDraw()
sampleInfo << "#" << sample.ParticleID << ", ";
}
sampleInfo << "X:" << sample.PositionX << " Y:" << sample.PositionY;
+ if (std::abs(sample.Gravity) > 0.1f)
+ sampleInfo << " GX: " << sample.GravityVelocityX << " GY: " << sample.GravityVelocityY;
textWidth = Graphics::textwidth((char*)sampleInfo.str().c_str());
g->fillrect(XRES-20-textWidth, 26, textWidth+8, 15, 0, 0, 0, 255*0.5);