taking screenshot

This commit is contained in:
minjaesong
2019-01-15 16:10:40 +09:00
parent 797b81d64b
commit a297fc3dfe
7 changed files with 79 additions and 27 deletions

View File

@@ -43,6 +43,7 @@ object CommandDict {
"setscale" to SetScale,
"kill" to KillActor,
"money" to MoneyDisp,
"screenshot" to TakeScreenshot,
// Test codes
"bulletintest" to SetBulletin,

View File

@@ -1,10 +1,11 @@
package net.torvald.terrarum.console
import net.torvald.terrarum.*
import net.torvald.terrarum.ccG
import net.torvald.terrarum.ccW
import net.torvald.terrarum.ccY
import net.torvald.terrarum.langpack.Lang
import java.time.ZonedDateTime
import java.util.ArrayList
import java.util.Formatter
import java.util.*
import java.util.regex.Pattern
/**
@@ -20,7 +21,8 @@ internal object CommandInterpreter {
"getlocale",
"help",
"version",
"tips"
"tips",
"screenshot"
)
internal fun execute(command: String) {

View File

@@ -0,0 +1,13 @@
package net.torvald.terrarum.console
import net.torvald.terrarum.AppLoader
object TakeScreenshot: ConsoleCommand {
override fun execute(args: Array<String>) {
AppLoader.requestScreenshot()
}
override fun printUsage() {
Echo("Takes screenshot and save it to the default directory as 'screenshot.tga'")
}
}