@Environment(value=CLIENT) public class RealmsDownloadLatestWorldScreen extends RealmsScreen
Modifier and Type | Class and Description |
---|---|
class |
RealmsDownloadLatestWorldScreen.DownloadStatus |
Modifier and Type | Field and Description |
---|---|
private int |
animTick |
private long |
bytesPersSecond |
private boolean |
cancelled |
private boolean |
checked |
private int |
dotIndex |
private static String[] |
DOTS |
private static ReentrantLock |
downloadLock |
private RealmsDownloadLatestWorldScreen.DownloadStatus |
downloadStatus |
private Text |
downloadTitle |
private boolean |
extracting |
private Text |
field_20494 |
private it.unimi.dsi.fastutil.booleans.BooleanConsumer |
field_22693 |
private ButtonWidget |
field_22694 |
private boolean |
finished |
private static Logger |
LOGGER |
private RateLimiter |
narrationRateLimiter |
private Screen |
parent |
private Long |
previousTimeSnapshot |
private Long |
previousWrittenBytes |
private String |
progress |
private boolean |
showDots |
private Text |
status |
private WorldDownload |
worldDownload |
private String |
worldName |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
RealmsDownloadLatestWorldScreen(Screen parent,
WorldDownload worldDownload,
String worldName,
it.unimi.dsi.fastutil.booleans.BooleanConsumer booleanConsumer) |
Modifier and Type | Method and Description |
---|---|
private void |
backButtonClicked() |
private void |
checkDownloadSize() |
private void |
downloadCancelled() |
private void |
downloadSave() |
private void |
drawDots(MatrixStack matrixStack) |
private void |
drawDownloadSpeed(MatrixStack matrixStack) |
private void |
drawDownloadSpeed0(MatrixStack matrixStack,
long long2) |
private void |
drawProgressBar(MatrixStack matrixStack) |
private long |
getContentLength(String downloadLink) |
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) |
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, removed, 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 ReentrantLock downloadLock
private static final String[] DOTS
private final Screen parent
private final WorldDownload worldDownload
private final Text downloadTitle
private final RateLimiter narrationRateLimiter
private ButtonWidget field_22694
private final String worldName
private final RealmsDownloadLatestWorldScreen.DownloadStatus downloadStatus
private volatile Text field_20494
private volatile Text status
private volatile String progress
private volatile boolean cancelled
private volatile boolean showDots
private volatile boolean finished
private volatile boolean extracting
private Long previousWrittenBytes
private Long previousTimeSnapshot
private long bytesPersSecond
private int animTick
private int dotIndex
private boolean checked
private final it.unimi.dsi.fastutil.booleans.BooleanConsumer field_22693
public RealmsDownloadLatestWorldScreen(Screen parent, WorldDownload worldDownload, String worldName, it.unimi.dsi.fastutil.booleans.BooleanConsumer booleanConsumer)
public void init()
This method is called when this screen is opened
or resized.
private void checkDownloadSize()
private long getContentLength(String downloadLink)
public void tick()
tick
in interface TickableElement
tick
in class RealmsScreen
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()
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void drawDots(MatrixStack matrixStack)
private void drawProgressBar(MatrixStack matrixStack)
private void drawDownloadSpeed(MatrixStack matrixStack)
private void drawDownloadSpeed0(MatrixStack matrixStack, long long2)
private void downloadSave()
private void downloadCancelled()