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:
parent
eb8660667e
commit
71b1fb347e
mirai-console-graphical
build.gradle.kts
src/main/kotlin/net/mamoe/mirai/console/graphical
@ -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"
|
||||
}
|
@ -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()
|
||||
|
||||
}
|
||||
}
|
@ -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.
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package net.mamoe.mirai.console.graphical.view
|
||||
|
||||
import tornadofx.View
|
||||
import tornadofx.borderpane
|
||||
|
||||
class PrimaryView : View() {
|
||||
|
||||
override val root = borderpane {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user