Skip to content

Commit

Permalink
Add scrolling pack name to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Sep 8, 2024
1 parent ae2fcda commit 162de47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public IrisElementRow() {
this(1);
}

public int getWidth() {
return width;
}

/**
* Adds an element to the right of this row.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected BaseEntry(NavigationController navigation) {
}
}

public static class HeaderEntry extends BaseEntry {
public class HeaderEntry extends BaseEntry {
public static final Component BACK_BUTTON_TEXT = Component.literal("< ").append(Component.translatable("options.iris.back").withStyle(ChatFormatting.ITALIC));
public static final MutableComponent RESET_BUTTON_TEXT_INACTIVE = Component.translatable("options.iris.reset").withStyle(ChatFormatting.GRAY);
public static final MutableComponent RESET_BUTTON_TEXT_ACTIVE = Component.translatable("options.iris.reset").withStyle(ChatFormatting.YELLOW);
Expand Down Expand Up @@ -208,7 +208,7 @@ public void render(GuiGraphics guiGraphics, int index, int y, int x, int entryWi
Font font = Minecraft.getInstance().font;

// Draw header text
guiGraphics.drawCenteredString(font, text, x + (int) (entryWidth * 0.5), y + 5, 0xFFFFFF);
renderScrollingString(guiGraphics, font, text, x + (int) (entryWidth * 0.5), x + 5, y + 5, ((x + entryWidth) - 10) - utilityButtons.getWidth(), y + 15, 0xFFFFFF);

GuiUtil.bindIrisWidgetsTexture();

Expand Down

0 comments on commit 162de47

Please sign in to comment.