Skip to content

Commit

Permalink
Im the stupid lmao
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jun 4, 2024
1 parent 4e90508 commit 2005014
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ButtonTextures;
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
import net.minecraft.client.gui.tooltip.Tooltip;
import net.minecraft.client.gui.widget.PressableWidget;
import net.minecraft.screen.ScreenTexts;
import net.minecraft.text.Text;
Expand All @@ -22,15 +23,15 @@ public class PressButtonWidget extends PressableWidget {

protected final ButtonTextures textures;
private final Consumer<PressButtonWidget> pressAction;
@Nullable
protected final Text tooltip;

public PressButtonWidget(int x, int y, int width, int height, ButtonTextures textures,
Consumer<PressButtonWidget> pressAction, @Nullable Text tooltip) {
super(x, y, width, height, ScreenTexts.EMPTY);
this.textures = textures;
this.pressAction = pressAction;
this.tooltip = tooltip;
if (tooltip != null) {
setTooltip(Tooltip.of(tooltip));
}
}

@Override
Expand Down

0 comments on commit 2005014

Please sign in to comment.