aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-05-14 01:33:54 +0800
committershedaniel <daniel@shedaniel.me>2020-05-14 01:33:54 +0800
commitc0ab2792b100457f42a63da8bae071feea8253a8 (patch)
tree761fcc6d686dd103b4ff33f91b86582411ae4480 /src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
parentd22b619c0d9870df72fb10c153ead3801bf1a971 (diff)
downloadRoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.tar.gz
RoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.tar.bz2
RoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.zip
Update to 20w20a
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
index 34157de67..92311b6f9 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
@@ -118,12 +118,12 @@ public class RecipeChoosePageWidget extends DraggableWidget {
public void render(MatrixStack matrices, int i, int i1, float v) {
font.draw(matrices, new TranslatableText("text.rei.choose_page"), bounds.x + 5, bounds.y + 5, REIHelper.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF404040);
String endString = String.format(" /%d", maxPage);
- int width = font.getWidth(endString);
+ int width = font.getStringWidth(endString);
font.draw(matrices, endString, bounds.x + bounds.width - 5 - width, bounds.y + 22, REIHelper.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF404040);
}
});
String endString = String.format(" /%d", maxPage);
- int width = font.getWidth(endString);
+ int width = font.getStringWidth(endString);
this.widgets.add(textFieldWidget = new TextFieldWidget(bounds.x + 7, bounds.y + 16, bounds.width - width - 12, 18));
textFieldWidget.setMaxLength(10000);
textFieldWidget.stripInvalid = s -> {