From 517cfe7ab7fdc3c95754af2e142ff91c542b82fe Mon Sep 17 00:00:00 2001 From: inglettronald Date: Mon, 12 Jun 2023 18:05:47 -0500 Subject: Scrollable tooltips Implementation is now mostly fixed, some minor TODO's left --- src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt (limited to 'src/main/kotlin/com/dulkirfabric/util') 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 -- cgit