Turtle programming game that was never finished to a playable state (but had cute graphics and sounds)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package net.tortuga;
|
|
|
|
|
|
|
|
|
|
|
|
import net.tortuga.input.Keys;
|
|
|
|
import net.tortuga.util.Log;
|
|
|
|
|
|
|
|
import org.lwjgl.input.Keyboard;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Ondřej Hruška (MightyPork)
|
|
|
|
*/
|
|
|
|
public class ThreadScreenshotTrigger extends Thread {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
while (true) {
|
|
|
|
if (Keys.justPressed(Keyboard.KEY_F2)) {
|
|
|
|
Log.f2("F2, taking screenshot.");
|
|
|
|
App.scheduledScreenshot = true;
|
|
|
|
Keys.destroyChangeState(Keyboard.KEY_F2);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
sleep(2);
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|