From 8614e8cfd0f652049f9c9bd3b387bf8389c36a83 Mon Sep 17 00:00:00 2001 From: SpaceClouds42 Date: Thu, 1 Apr 2021 10:29:00 -0400 Subject: [PATCH] comment test method, this is now functional (better hover/click events are next though) --- src/main/kotlin/us/spaceclouds42/ekho/Common.kt | 6 +++++- src/main/kotlin/us/spaceclouds42/ekho/Testing.kt | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/us/spaceclouds42/ekho/Common.kt b/src/main/kotlin/us/spaceclouds42/ekho/Common.kt index 44618c4..e22d407 100644 --- a/src/main/kotlin/us/spaceclouds42/ekho/Common.kt +++ b/src/main/kotlin/us/spaceclouds42/ekho/Common.kt @@ -5,9 +5,13 @@ import kotlin.system.exitProcess object Common : ModInitializer { override fun onInitialize() { + // runTests() + } + + private fun runTests() { testEkho() - println("\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>> Common(): testing complete, exiting..") + println("\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>> runTests(): testing complete, exiting..") exitProcess(0) } } diff --git a/src/main/kotlin/us/spaceclouds42/ekho/Testing.kt b/src/main/kotlin/us/spaceclouds42/ekho/Testing.kt index befeb51..8a5b367 100644 --- a/src/main/kotlin/us/spaceclouds42/ekho/Testing.kt +++ b/src/main/kotlin/us/spaceclouds42/ekho/Testing.kt @@ -3,7 +3,7 @@ package us.spaceclouds42.ekho import net.minecraft.text.HoverEvent import net.minecraft.text.Text -fun Text.prettyPrint(): String { +private fun Text.prettyPrint(): String { var pretty = "" pretty += "==Root: '${this.asString()}'" @@ -27,13 +27,13 @@ fun Text.prettyPrint(): String { val testEkho = ekho("root ") { style { - bold { true } + bold hoverEvent { HoverEvent( HoverEvent.Action.SHOW_TEXT, ekho ("hover text") { style { - obfuscated { true } + obfuscated } } ) @@ -49,7 +49,7 @@ ekho("root ") { // new style (notice inheritance is blocked, so entirely new style is created) "string with new style"(false) { style { - italic { true } + italics red } // new style is inherited @@ -63,7 +63,7 @@ ekho("root ") { // overwritten to now be true "string that has additional style (inherits and adds)" { style { - underlined { true } + underline green } }