From 4d0b2d3f50bf56b83498a3b787ac08afaeb85eff Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 18 Jun 2019 16:38:49 +0800 Subject: up to 4x faster search --- .../java/me/shedaniel/rei/client/ConfigObject.java | 32 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/client/ConfigObject.java') diff --git a/src/main/java/me/shedaniel/rei/client/ConfigObject.java b/src/main/java/me/shedaniel/rei/client/ConfigObject.java index 252d630f6..24f697471 100644 --- a/src/main/java/me/shedaniel/rei/client/ConfigObject.java +++ b/src/main/java/me/shedaniel/rei/client/ConfigObject.java @@ -6,8 +6,9 @@ package me.shedaniel.rei.client; import blue.endless.jankson.Comment; -import me.shedaniel.rei.api.ItemCheatingMode; -import me.shedaniel.rei.api.RelativePoint; +import me.shedaniel.rei.gui.config.ItemCheatingMode; +import me.shedaniel.rei.gui.config.ItemListOrdering; +import me.shedaniel.rei.gui.config.RecipeScreenType; public class ConfigObject { @@ -58,4 +59,31 @@ public class ConfigObject { "The location of choose page dialog, will automatically be set to your last location so there is no need to change this.") public RelativePoint choosePageDialogPoint = new RelativePoint(.5, .5); + public static class RelativePoint { + + private double relativeX, relativeY; + + public RelativePoint(double relativeX, double relativeY) { + this.relativeX = relativeX; + this.relativeY = relativeY; + } + + public double getRelativeX() { + return relativeX; + } + + public double getRelativeY() { + return relativeY; + } + + public double getX(double width) { + return width * relativeX; + } + + public double getY(double height) { + return height * relativeY; + } + + } + } -- cgit