aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/util
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-12 18:05:47 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-12 18:05:47 -0500
commit517cfe7ab7fdc3c95754af2e142ff91c542b82fe (patch)
tree72adb6e23047b1cd7320b6fbd0d487734eaca5c9 /src/main/kotlin/com/dulkirfabric/util
parent0e5f1d3dc9b2845e142e3504026b98bbf6f5ff41 (diff)
downloadDulkirMod-Fabric-517cfe7ab7fdc3c95754af2e142ff91c542b82fe.tar.gz
DulkirMod-Fabric-517cfe7ab7fdc3c95754af2e142ff91c542b82fe.tar.bz2
DulkirMod-Fabric-517cfe7ab7fdc3c95754af2e142ff91c542b82fe.zip
Scrollable tooltips Implementation is now mostly fixed, some minor TODO's left
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util')
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt b/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt
new file mode 100644
index 0000000..7a98f7f
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt
@@ -0,0 +1,13 @@
+package com.dulkirfabric.util
+
+import com.dulkirfabric.events.TooltipRenderChangeEvent
+
+object ItemChangeHandler {
+ var prevName = ""
+ fun handle(name: String) {
+ if (name != prevName) {
+ prevName = name
+ TooltipRenderChangeEvent.post()
+ }
+ }
+} \ No newline at end of file