diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-11-24 00:07:07 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-11-24 00:07:07 +0100 |
| commit | 20458e27c44ac498950cfaf408c35e7170d2a875 (patch) | |
| tree | 8f73378dec15f7df21b69d466ce684c4b7a23a12 /src/main/kotlin/features/items/recipes/RecipeWidget.kt | |
| parent | 709c32ed2788c15f9f03a1bcbe6648e533e662c6 (diff) | |
| download | Firmament-20458e27c44ac498950cfaf408c35e7170d2a875.tar.gz Firmament-20458e27c44ac498950cfaf408c35e7170d2a875.tar.bz2 Firmament-20458e27c44ac498950cfaf408c35e7170d2a875.zip | |
feat: scrollable recipe viewer
Diffstat (limited to 'src/main/kotlin/features/items/recipes/RecipeWidget.kt')
| -rw-r--r-- | src/main/kotlin/features/items/recipes/RecipeWidget.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/features/items/recipes/RecipeWidget.kt b/src/main/kotlin/features/items/recipes/RecipeWidget.kt index 2818d05..5884129 100644 --- a/src/main/kotlin/features/items/recipes/RecipeWidget.kt +++ b/src/main/kotlin/features/items/recipes/RecipeWidget.kt @@ -1,5 +1,7 @@ package moe.nea.firmament.features.items.recipes +import me.shedaniel.math.Dimension +import me.shedaniel.math.Point import me.shedaniel.math.Rectangle import net.minecraft.client.gui.components.Renderable import net.minecraft.client.gui.components.events.GuiEventListener @@ -18,7 +20,9 @@ abstract class RecipeWidget : GuiEventListener, Renderable, NarratableEntry { open fun tick() {} private var _focused = false - abstract val rect: Rectangle + abstract var position: Point + abstract val size: Dimension + open val rect: Rectangle get() = Rectangle(position, size) override fun setFocused(focused: Boolean) { this._focused = focused } |
