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

Commit bf9c981

Browse files
committed
Modify default HUD widgets to be a little bit prettier
1 parent 6f72885 commit bf9c981

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/main/kotlin/me/zeroeightsix/kami/gui/widgets/Coordinates.kt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
package me.zeroeightsix.kami.gui.widgets
22

3+
import glm_.vec4.Vec4
4+
35
object Coordinates : TextPinnableWidget(
46
"Coordinates", text = mutableListOf(
57
CompiledText(
68
mutableListOf(
7-
CompiledText.LiteralPart("x"),
8-
CompiledText.VariablePart(varMap["x"]!!(), extraspace = false)
9-
)
10-
),
11-
CompiledText(
12-
mutableListOf(
13-
CompiledText.LiteralPart("y"),
14-
CompiledText.VariablePart(varMap["y"]!!(), extraspace = false)
15-
)
16-
),
17-
CompiledText(
18-
mutableListOf(
19-
CompiledText.LiteralPart("z"),
20-
CompiledText.VariablePart(varMap["z"]!!(), extraspace = false)
9+
CompiledText.VariablePart(varMap["facing_axis"]!!()),
10+
CompiledText.VariablePart(varMap["x"]!!()).also {
11+
it.colour = Vec4(1f, 1f, 1f, 0.64f)
12+
},
13+
CompiledText.VariablePart(varMap["y"]!!()).also {
14+
it.colour = Vec4(1f, 1f, 1f, 0.64f)
15+
},
16+
CompiledText.VariablePart(varMap["z"]!!()).also {
17+
it.colour = Vec4(1f, 1f, 1f, 0.64f)
18+
}
2119
)
2220
)
2321
), position = Position.BOTTOM_LEFT

src/main/kotlin/me/zeroeightsix/kami/gui/widgets/Information.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package me.zeroeightsix.kami.gui.widgets
22

3+
import glm_.vec4.Vec4
4+
35
object Information : TextPinnableWidget(
46
"Information",
57
mutableListOf(
@@ -11,14 +13,14 @@ object Information : TextPinnableWidget(
1113
),
1214
CompiledText(
1315
mutableListOf(
14-
CompiledText.LiteralPart("Welcome"),
15-
CompiledText.VariablePart(varMap["username"]!!(), extraspace = false)
16-
)
17-
),
18-
CompiledText(
19-
mutableListOf(
16+
CompiledText.VariablePart(varMap["fps"]!!()),
17+
CompiledText.LiteralPart("fps").also {
18+
it.colour = Vec4(1f, 1f, 1f, 0.64f)
19+
},
2020
CompiledText.VariablePart(varMap["tps"]!!()),
21-
CompiledText.LiteralPart("tps", extraspace = false)
21+
CompiledText.LiteralPart("tps", extraspace = false).also {
22+
it.colour = Vec4(1f, 1f, 1f, 0.64f)
23+
}
2224
)
2325
)
2426
), position = Position.TOP_LEFT

0 commit comments

Comments
 (0)