aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-01 03:42:51 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-03 21:05:51 +0200
commit5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e (patch)
treea5b0a6fbc8878ae62bb2c3a01dbb255388353fda /src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt
parentdff1f9c0e2b728dba902d72816104abccc61f511 (diff)
downloadFirmament-5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e.tar.gz
Firmament-5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e.tar.bz2
Firmament-5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e.zip
[WIP] Remove LibGUI
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt b/src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt
index 4ba8eee..972eb1f 100644
--- a/src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt
+++ b/src/main/kotlin/moe/nea/firmament/features/debug/DebugView.kt
@@ -6,12 +6,6 @@
package moe.nea.firmament.features.debug
-import io.github.cottonmc.cotton.gui.client.CottonHud
-import io.github.cottonmc.cotton.gui.widget.WBox
-import io.github.cottonmc.cotton.gui.widget.WDynamicLabel
-import io.github.cottonmc.cotton.gui.widget.data.Axis
-import java.util.stream.Collectors
-import kotlin.time.Duration.Companion.seconds
import moe.nea.firmament.Firmament
import moe.nea.firmament.events.TickEvent
import moe.nea.firmament.features.FirmamentFeature
@@ -36,24 +30,8 @@ object DebugView : FirmamentFeature {
}
fun recalculateDebugWidget() {
- storedVariables.entries.removeIf { it.value.timer.passedTime() > 1.seconds }
- debugWidget.streamChildren().collect(Collectors.toList()).forEach {
- debugWidget.remove(it)
- }
- storedVariables.entries.forEach {
- debugWidget.add(WDynamicLabel({ "${it.key}: ${it.value.obj}" }))
- }
- debugWidget.layout()
- if (storedVariables.isNotEmpty()) {
- CottonHud.add(debugWidget, 20, 20)
- } else {
- CottonHud.remove(debugWidget)
- }
}
- val debugWidget = WBox(Axis.VERTICAL)
-
-
override fun onLoad() {
TickEvent.subscribe {
synchronized(this) {