Skip to content

Commit

Permalink
display time numerically on tracker line when dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
jkboyce committed Jan 28, 2022
1 parent 15a90b9 commit 8b46eff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/jugglinglab/core/EditLadderDiagram.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ else if (my > (height-border_top))
gui_state = STATE_INACTIVE;
if (animator != null)
animator.setPaused(anim_paused);
repaint();
break;
case STATE_POPUP:
break;
Expand Down Expand Up @@ -1858,6 +1859,10 @@ protected void paintComponent(Graphics gr) {
// draw the tracker line showing the time
gr.setColor(Color.red);
gr.drawLine(0, tracker_y, width, tracker_y);
if (gui_state == STATE_MOVING_TRACKER) {
gr.drawString(JLFunc.toStringRounded(sim_time, 2) + " s",
width / 2 - 18, tracker_y - 5);
}
}

/*
Expand Down

0 comments on commit 8b46eff

Please sign in to comment.