Class RealmsBackupScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.realms.gui.screen.RealmsScreen
net.minecraft.client.realms.gui.screen.RealmsBackupScreen
- All Implemented Interfaces:
Drawable
,Element
,ParentElement
,TickableElement
@Environment(CLIENT) public class RealmsBackupScreen extends RealmsScreen
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
RealmsBackupScreen.BackupObjectSelectionList
(package private) class
RealmsBackupScreen.BackupObjectSelectionListEntry
-
Field Summary
Fields Modifier and Type Field Description private RealmsBackupScreen.BackupObjectSelectionList
backupObjectSelectionList
private List<Backup>
backups
private ButtonWidget
changesButton
private ButtonWidget
downloadButton
private static Identifier
field_22686
private static Identifier
field_22687
private static Text
field_26471
private static Text
field_26472
private static Text
field_26473
private static Text
field_26474
private static int
lastScrollPosition
private static Logger
LOGGER
private Boolean
noBackups
private RealmsConfigureWorldScreen
parent
private ButtonWidget
restoreButton
private int
selectedBackup
private RealmsServer
serverData
private int
slotId
private RealmsLabel
titleLabel
private Text
toolTip
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description RealmsBackupScreen(RealmsConfigureWorldScreen parent, RealmsServer serverData, int slotId)
-
Method Summary
Modifier and Type Method Description private void
addToChangeList(Backup backup, String key)
private void
downloadClicked()
private void
downloadWorldData()
private void
generateChangeList()
void
init()
Called when a screen should be initialized.boolean
keyPressed(int keyCode, int scanCode, int modifiers)
Callback for when a key down event has been captured.void
render(MatrixStack matrices, int mouseX, int mouseY, float delta)
protected void
renderMousehoverTooltip(MatrixStack matrixStack, Text text, int int2, int int3)
private void
restore()
private void
restoreClicked(int selectedBackup)
private boolean
shouldChangesButtonBeVisible()
private boolean
shouldRestoreButtonBeVisible()
private void
updateButtonStates()
Methods inherited from class net.minecraft.client.realms.gui.screen.RealmsScreen
narrateLabels, row, tick
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, removed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
Methods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.Element
mouseMoved
Methods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
LOGGER
-
field_22686
-
field_22687
-
field_26471
-
field_26472
-
field_26473
-
field_26474
-
lastScrollPosition
private static int lastScrollPosition -
parent
-
backups
-
toolTip
-
backupObjectSelectionList
-
selectedBackup
private int selectedBackup -
slotId
private final int slotId -
downloadButton
-
restoreButton
-
changesButton
-
noBackups
-
serverData
-
titleLabel
-
-
Constructor Details
-
RealmsBackupScreen
-
-
Method Details
-
init
public void init()Called when a screen should be initialized.This method is called when this screen is
opened
or resized. -
generateChangeList
private void generateChangeList() -
addToChangeList
-
updateButtonStates
private void updateButtonStates() -
shouldChangesButtonBeVisible
private boolean shouldChangesButtonBeVisible() -
shouldRestoreButtonBeVisible
private boolean shouldRestoreButtonBeVisible() -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFW
class.- Specified by:
keyPressed
in interfaceElement
- Specified by:
keyPressed
in interfaceParentElement
- Overrides:
keyPressed
in classScreen
- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})- Returns:
true
to indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int)
,GLFW.GLFW_KEY_Q
,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
restoreClicked
private void restoreClicked(int selectedBackup) -
downloadClicked
private void downloadClicked() -
downloadWorldData
private void downloadWorldData() -
restore
private void restore() -
render
-
renderMousehoverTooltip
protected void renderMousehoverTooltip(MatrixStack matrixStack, @Nullable Text text, int int2, int int3)
-