Skip to content

Commit

Permalink
drawable utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ItziSpyder committed May 5, 2023
1 parent f9fdc0d commit 1068ac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.github.itzispyder.clickcrystals.modules.Module;
import io.github.itzispyder.clickcrystals.modules.modules.CrystPerSec;
import io.github.itzispyder.clickcrystals.util.DrawableUtils;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.client.util.Window;
import net.minecraft.client.util.math.MatrixStack;

Expand All @@ -20,6 +20,6 @@ public void onHudRender(MatrixStack matrixStack, float tickDelta) {
final Window win = mc.getWindow();
final int x = win.getScaledWidth() / 2;
final int y = win.getScaledHeight() / 2;
DrawableHelper.drawCenteredTextWithShadow(matrixStack, mc.textRenderer, text, x, y + 5,0);
DrawableUtils.drawCenteredText(matrixStack, text, x, y + 5, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public void init() {
.sorted(Comparator.comparing(Module::getId))
.toList();

categoryWidget.setPosition(CATEGORY_MARGIN_LEFT + ((categoryWidget.getWidth() + 3) * i),CATEGORY_MARGIN_TOP + BANNER_TITLE_HEIGHT);
categoryWidget.setX(CATEGORY_MARGIN_LEFT + ((categoryWidget.getWidth() + 3) * i));
categoryWidget.setY(CATEGORY_MARGIN_TOP + BANNER_TITLE_HEIGHT);
moduleList.forEach(categoryWidget::addModule);
this.categoryWidgets.add(categoryWidget);
this.addDrawable(categoryWidget);
Expand Down

0 comments on commit 1068ac0

Please sign in to comment.