aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/dev/isxander/yacl/gui/CategoryListWidget.java2
-rw-r--r--src/main/java/dev/isxander/yacl/gui/controllers/LabelController.java6
-rw-r--r--src/main/java/dev/isxander/yacl/gui/controllers/cycling/EnumController.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/dev/isxander/yacl/gui/CategoryListWidget.java b/src/main/java/dev/isxander/yacl/gui/CategoryListWidget.java
index b5c010c..2cb6bb6 100644
--- a/src/main/java/dev/isxander/yacl/gui/CategoryListWidget.java
+++ b/src/main/java/dev/isxander/yacl/gui/CategoryListWidget.java
@@ -41,7 +41,7 @@ public class CategoryListWidget extends ElementListWidget<CategoryListWidget.Cat
@Override
public int getRowWidth() {
- return width - width / 10;
+ return Math.min(width - width / 10, 396);
}
@Override
diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/LabelController.java b/src/main/java/dev/isxander/yacl/gui/controllers/LabelController.java
index b0cafcf..98f69e1 100644
--- a/src/main/java/dev/isxander/yacl/gui/controllers/LabelController.java
+++ b/src/main/java/dev/isxander/yacl/gui/controllers/LabelController.java
@@ -6,13 +6,10 @@ import dev.isxander.yacl.api.utils.Dimension;
import dev.isxander.yacl.gui.AbstractWidget;
import dev.isxander.yacl.gui.YACLScreen;
import net.minecraft.client.font.MultilineText;
-import net.minecraft.client.gui.screen.ConfirmLinkScreen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack;
import net.minecraft.text.*;
-import net.minecraft.util.Util;
-import java.io.File;
import java.util.List;
/**
@@ -112,6 +109,9 @@ public class LabelController implements Controller<Text> {
}
protected Style getStyle(int mouseX, int mouseY) {
+ if (!dim.isPointInside(mouseX, mouseY))
+ return null;
+
int x = mouseX - dim.x();
int y = mouseY - dim.y() - getYPadding();
int line = y / textRenderer.fontHeight;
diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/cycling/EnumController.java b/src/main/java/dev/isxander/yacl/gui/controllers/cycling/EnumController.java
index 291863c..bc9f46d 100644
--- a/src/main/java/dev/isxander/yacl/gui/controllers/cycling/EnumController.java
+++ b/src/main/java/dev/isxander/yacl/gui/controllers/cycling/EnumController.java
@@ -29,7 +29,7 @@ public class EnumController<T extends Enum<T>> extends CyclingListController<T>
/**
* Constructs a cycling enum controller with a default value formatter and all values being available.
* The default value formatter first searches if the
- * enum is a {@link NameableEnum} else, just uses {@link Enum#toString()}
+ * enum is a {@link NameableEnum} or {@link TranslatableOption} else, just uses {@link Enum#toString()}
*
* @param option bound option
*/