1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-24 20:43:33 +08:00

init console graphical

This commit is contained in:
ryoii 2020-02-16 18:27:31 +08:00
parent eb8660667e
commit 71b1fb347e
4 changed files with 63 additions and 0 deletions
mirai-console-graphical
build.gradle.kts
src/main/kotlin/net/mamoe/mirai/console/graphical

View File

@ -31,4 +31,8 @@ dependencies {
api(group = "no.tornado", name = "tornadofx", version = "1.7.19")
api("org.bouncycastle:bcprov-jdk15on:1.64")
// classpath is not set correctly by IDE
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

View File

@ -0,0 +1,17 @@
package net.mamoe.mirai.console.graphical
import net.mamoe.mirai.console.graphical.view.PrimaryView
import tornadofx.App
import tornadofx.launch
fun main(args: Array<String>) {
launch<MainApp>(args)
}
class MainApp: App(PrimaryView::class) {
override fun init() {
super.init()
}
}

View File

@ -0,0 +1,31 @@
package net.mamoe.mirai.console.graphical.controller
import net.mamoe.mirai.Bot
import net.mamoe.mirai.console.MiraiConsoleUI
import tornadofx.Controller
class MiraiController : Controller(), MiraiConsoleUI {
override fun pushLog(identity: Long, message: String) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun prePushBot(identity: Long) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun pushBot(bot: Bot) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun pushVersion(consoleVersion: String, consoleBuild: String, coreVersion: String) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override suspend fun requestInput(question: String): String {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun pushBotAdminStatus(identity: Long, admins: List<Long>) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}

View File

@ -0,0 +1,11 @@
package net.mamoe.mirai.console.graphical.view
import tornadofx.View
import tornadofx.borderpane
class PrimaryView : View() {
override val root = borderpane {
}
}