@Environment(value=CLIENT) public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback
Modifier and Type | Field and Description |
---|---|
private int |
animTick |
private ButtonWidget |
backupButton |
private int |
clicks |
private static Identifier |
EXPIRED_ICON |
private static Identifier |
EXPIRES_SOON_ICON |
private static Text |
field_26479 |
private static Text |
field_26480 |
private static Text |
field_26481 |
private static Text |
field_26482 |
private static Text |
field_26483 |
private static Text |
field_26484 |
private static Text |
field_26485 |
private static Text |
field_26486 |
private int |
left_x |
private static Logger |
LOGGER |
private static Identifier |
OFF_ICON |
private static Identifier |
ON_ICON |
private ButtonWidget |
optionsButton |
private RealmsMainScreen |
parent |
private ButtonWidget |
playersButton |
private ButtonWidget |
resetWorldButton |
private int |
right_x |
private RealmsServer |
server |
private long |
serverId |
private ButtonWidget |
settingsButton |
private boolean |
stateChanged |
private ButtonWidget |
subscriptionButton |
private ButtonWidget |
switchMinigameButton |
private Text |
toolTip |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
RealmsConfigureWorldScreen(RealmsMainScreen parent,
long serverId) |
Modifier and Type | Method and Description |
---|---|
private void |
addButton(ButtonWidget button) |
private void |
addSlotButton(int slotIndex) |
private void |
backButtonClicked() |
private int |
buttonCenter(int i,
int total) |
private int |
buttonLeft(int i) |
protected void |
callback(WorldTemplate template) |
void |
closeTheWorld(Screen screen) |
private void |
disableButtons() |
private void |
drawClosed(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawExpired(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawExpiring(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5,
int int6) |
private void |
drawOpen(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawServerStatus(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
fetchServerData(long worldId) |
private int |
frame(int ordinal) |
RealmsConfigureWorldScreen |
getNewScreen() |
private void |
hideMinigameButtons() |
private void |
hideRegularButtons() |
void |
init()
Called when a screen should be initialized.
|
private boolean |
isMinigame() |
private void |
joinRealm(RealmsServer serverData) |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
void |
openTheWorld(boolean join,
Screen screen) |
private void |
removeButton(ButtonWidget button) |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
protected void |
renderMousehoverTooltip(MatrixStack matrixStack,
Text text,
int int2,
int int3) |
void |
saveSettings(String name,
String desc) |
void |
saveSlotSettings(RealmsWorldOptions options) |
void |
stateChanged() |
private void |
switchToEmptySlot(int selectedSlot,
RealmsServer serverData) |
private void |
switchToFullSlot(int selectedSlot,
RealmsServer serverData) |
private void |
switchToMinigame() |
void |
tick() |
narrateLabels, row
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
mouseMoved
private static final Logger LOGGER
private static final Identifier ON_ICON
private static final Identifier OFF_ICON
private static final Identifier EXPIRED_ICON
private static final Identifier EXPIRES_SOON_ICON
private static final Text field_26479
private static final Text field_26480
private static final Text field_26481
private static final Text field_26482
private static final Text field_26483
private static final Text field_26484
private static final Text field_26485
private static final Text field_26486
private final RealmsMainScreen parent
@Nullable private RealmsServer server
private final long serverId
private int left_x
private int right_x
private ButtonWidget playersButton
private ButtonWidget settingsButton
private ButtonWidget subscriptionButton
private ButtonWidget optionsButton
private ButtonWidget backupButton
private ButtonWidget resetWorldButton
private ButtonWidget switchMinigameButton
private boolean stateChanged
private int animTick
private int clicks
public RealmsConfigureWorldScreen(RealmsMainScreen parent, long serverId)
public void init()
This method is called when this screen is opened
or resized.
private void addSlotButton(int slotIndex)
private int buttonLeft(int i)
private int buttonCenter(int i, int total)
public void tick()
tick
in interface TickableElement
tick
in class RealmsScreen
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private int frame(int ordinal)
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
GLFW
class.keyPressed
in interface Element
keyPressed
in interface ParentElement
keyPressed
in class Screen
keyCode
- the named key code of the event as described in the GLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true
to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int)
,
GLFW.GLFW_KEY_Q
,
GLFWKeyCallbackI.invoke(long, int, int, int, int)
private void backButtonClicked()
private void fetchServerData(long worldId)
private void disableButtons()
private void joinRealm(RealmsServer serverData)
private void switchToMinigame()
private void switchToFullSlot(int selectedSlot, RealmsServer serverData)
private void switchToEmptySlot(int selectedSlot, RealmsServer serverData)
protected void renderMousehoverTooltip(MatrixStack matrixStack, @Nullable Text text, int int2, int int3)
private void drawServerStatus(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void drawExpired(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void drawExpiring(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6)
private void drawOpen(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void drawClosed(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private boolean isMinigame()
private void hideRegularButtons()
private void removeButton(ButtonWidget button)
private void addButton(ButtonWidget button)
private void hideMinigameButtons()
public void saveSlotSettings(RealmsWorldOptions options)
public void openTheWorld(boolean join, Screen screen)
public void closeTheWorld(Screen screen)
public void stateChanged()
protected void callback(@Nullable WorldTemplate template)
callback
in class RealmsScreenWithCallback
public RealmsConfigureWorldScreen getNewScreen()