Permalink
Browse files

Made the GUI and usability of dot to increment timestep in paused sta…

…te better
  • Loading branch information...
1 parent 17a7245 commit 595afae8f5c380e7e5129a1716b79efed1fbe028 @muraliavarma committed Feb 8, 2013
@@ -11,6 +11,9 @@ void drawGUI() {
drawText(300, "(c) Clear paths");
drawText(340, "(s) Scatter boids");
drawText(400, "(Space) Simulation is " + (isLoop?"playing":"paused"));
+ if (!isLoop) {
+ drawText(430, "(.) Go to next timestep");
+ }
}
void drawText(float y, String text) {
@@ -12,10 +12,8 @@ void keyPressed() {
noLoop();
}
- if(key == '.') {
- noLoop();
+ if(key == '.' && !isLoop) {
redraw();
- isLoop = false;
}
//commands
Binary file not shown.
@@ -343,6 +343,9 @@ public void drawGUI() {
drawText(300, "(c) Clear paths");
drawText(340, "(s) Scatter boids");
drawText(400, "(Space) Simulation is " + (isLoop?"playing":"paused"));
+ if (!isLoop) {
+ drawText(430, "(.) Go to next timestep");
+ }
}
public void drawText(float y, String text) {
@@ -362,10 +365,8 @@ public void keyPressed() {
noLoop();
}
- if(key == '.') {
- noLoop();
+ if(key == '.' && !isLoop) {
redraw();
- isLoop = false;
}
//commands

0 comments on commit 595afae

Please sign in to comment.