mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
fixed a bug where inventory cell would not position correctly when streamermode is changed; where screencapturing for saving would only capture from FboRGB
This commit is contained in:
@@ -11,14 +11,14 @@ object ScreencapNogui: ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2) {
|
||||
IngameRenderer.fboRGBexportCallback = {
|
||||
IngameRenderer.screencapExportCallback = {
|
||||
val w = 960
|
||||
val h = 640
|
||||
val p = Pixmap.createFromFrameBuffer((it.width - w).ushr(1), (it.height - h).ushr(1), w, h)
|
||||
PixmapIO2.writeTGA(Gdx.files.absolute(App.defaultDir + "/Exports/${args[1]}.tga"), p, true)
|
||||
p.dispose()
|
||||
}
|
||||
IngameRenderer.fboRGBexportRequested = true
|
||||
IngameRenderer.screencapRequested = true
|
||||
Echo("FBO exported to$ccG Exports/${args[1]}.tga")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user