Skip to content

Commit

Permalink
Fix time display on win screen
Browse files Browse the repository at this point in the history
  • Loading branch information
dolkow committed Apr 27, 2014
1 parent 9a84eaa commit 1eb4911
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/se/dolkow/graphbender/ui/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,13 @@ private void dragEnded(boolean connect) {
@Override
public void draw(Canvas c, long frameTime, long deltaTime) {
mCurrentScenery.draw(c, mCurrentLogic, mTargetX, mTargetY, mSelected, mHovered);
double time = ((frameTime - mLevelStartTime)/1000000)/1000.0;
double time;
if (mLevelFinishTime > 0) {
time = mLevelFinishTime;
} else {
time = frameTime - mLevelStartTime;
}
time = ((long)time/1000000)/1000.0;
c.drawText("" + time, 5,
Metric.TIMESTAMP_SIZE, timePaint);
c.drawText("Level: " + (mLevel-1) , 5, Metric.TIMESTAMP_SIZE * 2 + 10, timePaint);
Expand Down

0 comments on commit 1eb4911

Please sign in to comment.