Skip to content

Commit

Permalink
comment test method, this is now functional (better hover/click event…
Browse files Browse the repository at this point in the history
…s are next though)
  • Loading branch information
spaceclouds42 committed Apr 1, 2021
1 parent 8bef8e8 commit 8614e8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/main/kotlin/us/spaceclouds42/ekho/Common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/kotlin/us/spaceclouds42/ekho/Testing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()}'"
Expand All @@ -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
}
}
)
Expand All @@ -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
Expand All @@ -63,7 +63,7 @@ ekho("root ") {
// overwritten to now be true
"string that has additional style (inherits and adds)" {
style {
underlined { true }
underline
green
}
}
Expand Down

0 comments on commit 8614e8c

Please sign in to comment.