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.
33 lines
578 B
33 lines
578 B
11 years ago
|
package mightypork.rogue.threads;
|
||
|
|
||
|
|
||
|
import mightypork.rogue.App;
|
||
|
import mightypork.rogue.input.Keys;
|
||
|
import mightypork.utils.logging.Log;
|
||
|
|
||
|
import org.lwjgl.input.Keyboard;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @author 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();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|