mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
F12 now takes screenshot in PNG format
This commit is contained in:
@@ -610,7 +610,7 @@ public class App implements ApplicationListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Pixmap p = Pixmap.createFromFrameBuffer(0, 0, scr.getWidth(), scr.getHeight());
|
Pixmap p = Pixmap.createFromFrameBuffer(0, 0, scr.getWidth(), scr.getHeight());
|
||||||
PixmapIO2.writeTGA(Gdx.files.absolute(defaultDir+"/Screenshot-"+String.valueOf(System.currentTimeMillis())+".tga"), p, true);
|
PixmapIO.writePNG(Gdx.files.absolute(defaultDir+"/Screenshot-"+String.valueOf(System.currentTimeMillis())+".png"), p, 9, true);
|
||||||
p.dispose();
|
p.dispose();
|
||||||
|
|
||||||
Terrarum.INSTANCE.getIngame().sendNotification("Screenshot taken");
|
Terrarum.INSTANCE.getIngame().sendNotification("Screenshot taken");
|
||||||
|
|||||||
Reference in New Issue
Block a user