Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Modify default HUD widgets to be a little bit prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroeightysix committed Aug 31, 2020
1 parent 6f72885 commit bf9c981
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
26 changes: 12 additions & 14 deletions src/main/kotlin/me/zeroeightsix/kami/gui/widgets/Coordinates.kt
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
package me.zeroeightsix.kami.gui.widgets

import glm_.vec4.Vec4

object Coordinates : TextPinnableWidget(
"Coordinates", text = mutableListOf(
CompiledText(
mutableListOf(
CompiledText.LiteralPart("x"),
CompiledText.VariablePart(varMap["x"]!!(), extraspace = false)
)
),
CompiledText(
mutableListOf(
CompiledText.LiteralPart("y"),
CompiledText.VariablePart(varMap["y"]!!(), extraspace = false)
)
),
CompiledText(
mutableListOf(
CompiledText.LiteralPart("z"),
CompiledText.VariablePart(varMap["z"]!!(), extraspace = false)
CompiledText.VariablePart(varMap["facing_axis"]!!()),
CompiledText.VariablePart(varMap["x"]!!()).also {
it.colour = Vec4(1f, 1f, 1f, 0.64f)
},
CompiledText.VariablePart(varMap["y"]!!()).also {
it.colour = Vec4(1f, 1f, 1f, 0.64f)
},
CompiledText.VariablePart(varMap["z"]!!()).also {
it.colour = Vec4(1f, 1f, 1f, 0.64f)
}
)
)
), position = Position.BOTTOM_LEFT
Expand Down
16 changes: 9 additions & 7 deletions src/main/kotlin/me/zeroeightsix/kami/gui/widgets/Information.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package me.zeroeightsix.kami.gui.widgets

import glm_.vec4.Vec4

object Information : TextPinnableWidget(
"Information",
mutableListOf(
Expand All @@ -11,14 +13,14 @@ object Information : TextPinnableWidget(
),
CompiledText(
mutableListOf(
CompiledText.LiteralPart("Welcome"),
CompiledText.VariablePart(varMap["username"]!!(), extraspace = false)
)
),
CompiledText(
mutableListOf(
CompiledText.VariablePart(varMap["fps"]!!()),
CompiledText.LiteralPart("fps").also {
it.colour = Vec4(1f, 1f, 1f, 0.64f)
},
CompiledText.VariablePart(varMap["tps"]!!()),
CompiledText.LiteralPart("tps", extraspace = false)
CompiledText.LiteralPart("tps", extraspace = false).also {
it.colour = Vec4(1f, 1f, 1f, 0.64f)
}
)
)
), position = Position.TOP_LEFT
Expand Down

0 comments on commit bf9c981

Please sign in to comment.