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:
minjaesong
2021-10-06 16:51:34 +09:00
parent a43be55969
commit 170503ecdb
9 changed files with 137 additions and 130 deletions

View File

@@ -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")
}
}