@Environment(value=CLIENT) public class RealmsWorldSlotButton extends ButtonWidget implements TickableRealmsButton
| Modifier and Type | Class and Description |
|---|---|
static class |
RealmsWorldSlotButton.Action |
static class |
RealmsWorldSlotButton.State |
ButtonWidget.PressAction| Modifier and Type | Field and Description |
|---|---|
private int |
animTick |
static Identifier |
EMPTY_FRAME |
static Identifier |
PANORAMA_0 |
static Identifier |
PANORAMA_2 |
static Identifier |
PANORAMA_3 |
private Supplier<RealmsServer> |
serverDataProvider |
static Identifier |
SLOT_FRAME |
private int |
slotIndex |
private RealmsWorldSlotButton.State |
state |
private Consumer<String> |
toolTipSetter |
onPressactive, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, yBACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
RealmsWorldSlotButton(int x,
int y,
int width,
int height,
Supplier<RealmsServer> serverDataProvider,
Consumer<String> toolTipSetter,
int id,
ButtonWidget.PressAction action) |
| Modifier and Type | Method and Description |
|---|---|
private void |
drawSlotFrame(int x,
int y,
int xm,
int ym,
boolean currentlyActiveSlot,
String text,
int i,
long imageId,
String image,
boolean empty,
boolean minigame,
RealmsWorldSlotButton.Action action,
String actionPrompt) |
RealmsWorldSlotButton.State |
getState() |
void |
renderButton(int mouseX,
int mouseY,
float delta) |
void |
setMessage(RealmsServer server,
String slotName,
boolean isEmpty,
boolean isMinigame,
RealmsWorldSlotButton.Action action,
String promptMessage) |
void |
tick() |
onPresskeyPressed, onClickchangeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFocused, setMessage, setWidthdrawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharTyped, keyReleased, mouseMoved, mouseScrolledpublic static final Identifier SLOT_FRAME
public static final Identifier EMPTY_FRAME
public static final Identifier PANORAMA_0
public static final Identifier PANORAMA_2
public static final Identifier PANORAMA_3
private final Supplier<RealmsServer> serverDataProvider
private final int slotIndex
private int animTick
@Nullable private RealmsWorldSlotButton.State state
public RealmsWorldSlotButton(int x,
int y,
int width,
int height,
Supplier<RealmsServer> serverDataProvider,
Consumer<String> toolTipSetter,
int id,
ButtonWidget.PressAction action)
@Nullable public RealmsWorldSlotButton.State getState()
public void tick()
tick in interface TickableRealmsButtonpublic void setMessage(RealmsServer server, String slotName, boolean isEmpty, boolean isMinigame, RealmsWorldSlotButton.Action action, String promptMessage)
public void renderButton(int mouseX,
int mouseY,
float delta)
renderButton in class AbstractButtonWidget