Skip to content

Commit

Permalink
Fix rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Jan 15, 2024
1 parent 543a749 commit aeee26d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public List<ClickableWidget> selectableChildren() {
}

@Override
public void render(DrawContext context, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
context.drawTextWithShadow(this.client.textRenderer, Text.literal(this.name), x - 50, y + 2, 16777215);
WidgetHelper.setPosition(this.checkButton, x + 70, y);
WidgetHelper.setPosition(this.startButton, x + 100, y);
WidgetHelper.setPosition(this.configButton, x + 150, y);
public void render(DrawContext context, int index, int y, int x, int width, int height, int mouseX, int mouseY, boolean hovered, float tickDelta) {
context.drawTextWithShadow(this.client.textRenderer, Text.literal(this.name), x - 50, y + height / 2 - 9 / 2, 16777215);
WidgetHelper.setPosition(this.checkButton, x + width - 20, y);
WidgetHelper.setPosition(this.startButton, x + width - 70, y);
WidgetHelper.setPosition(this.configButton, x + width - 120, y);

this.startButton.active = this.client.player != null;
this.startButton.setMessage(this.scriptInstance.isScriptRunning() ? STOP : START);
Expand Down

0 comments on commit aeee26d

Please sign in to comment.