@Environment(value=CLIENT) public class RealmsMainScreen extends RealmsScreen
Modifier and Type | Class and Description |
---|---|
(package private) class |
RealmsMainScreen.CloseButton |
(package private) class |
RealmsMainScreen.Entry |
(package private) static class |
RealmsMainScreen.HoverState |
(package private) class |
RealmsMainScreen.NewsButton |
(package private) class |
RealmsMainScreen.PendingInvitesButton |
(package private) class |
RealmsMainScreen.RealmSelectionList |
(package private) class |
RealmsMainScreen.RealmSelectionListEntry |
(package private) class |
RealmsMainScreen.RealmSelectionListTrialEntry |
(package private) class |
RealmsMainScreen.ShowPopupButton |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
RealmsMainScreen(Screen screen) |
Modifier and Type | Method and Description |
---|---|
void |
addButtons() |
boolean |
charTyped(char chr,
int keyCode)
Callback for when a character input has been captured.
|
private void |
checkClientCompatability() |
private void |
checkParentalConsent() |
private void |
checkUnreadNews() |
private void |
configureClicked(RealmsServer realmsServer) |
private void |
drawClose(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawConfigure(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 |
drawInvitationPendingIcon(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5,
boolean bool,
boolean bool2) |
private void |
drawLeave(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawOpen(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
private void |
drawPopup(MatrixStack matrices,
int mouseX,
int mouseY) |
private void |
drawRealmsLogo(MatrixStack matrices,
int x,
int y) |
private RealmsServer |
findServer(long id) |
private List<Long> |
getOwnedNonExpiredWorldIds() |
private static boolean |
hasParentalConsent() |
void |
init()
Called when a screen should be initialized.
|
private boolean |
inPendingInvitationArea(double xm,
double ym) |
private boolean |
isOutsidePopup(double xm,
double ym) |
private boolean |
isSelfOwnedServer(RealmsServer serverData) |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
private void |
leaveClicked(RealmsServer selectedServer) |
static void |
method_23765(ResourceManager manager) |
private void |
method_24985(ButtonWidget buttonWidget) |
private void |
method_24987(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5,
int int6) |
private void |
method_24991(boolean bool) |
private boolean |
method_25001(RealmsServer realmsServer) |
private void |
method_27452(Text[] text) |
private void |
method_31174(RealmsServer realmsServer) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
RealmsMainScreen |
newScreen() |
private void |
onClosePopup() |
private void |
onRenew() |
private void |
pingRegions() |
void |
play(RealmsServer realmsServer,
Screen screen) |
private int |
popupX0() |
private int |
popupY0() |
void |
removed() |
void |
removeSelection() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
private void |
renderLocal(MatrixStack matrixStack) |
private void |
renderMoreInfo(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5,
boolean bool) |
protected void |
renderMousehoverTooltip(MatrixStack matrixStack,
List<Text> list,
int int2,
int int3) |
private void |
renderNews(MatrixStack matrixStack,
int int2,
int int3,
boolean bool,
int int4,
int int5,
boolean bool2,
boolean bool3) |
private void |
renderStage(MatrixStack matrixStack) |
private void |
saveListScrollPosition() |
private boolean |
shouldConfigureButtonBeVisible(RealmsServer server) |
private boolean |
shouldLeaveButtonBeVisible(RealmsServer server) |
private boolean |
shouldPlayButtonBeActive(RealmsServer server) |
private boolean |
shouldRenewButtonBeActive(RealmsServer server) |
private boolean |
shouldShowMessageInList() |
boolean |
shouldShowPopup() |
private boolean |
shouldShowPopupButton() |
private void |
stopRealmsFetcher() |
private void |
switchToLocal() |
private void |
switchToProd() |
private void |
switchToStage() |
void |
tick() |
private void |
updateButtonStates(RealmsServer server) |
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, focusOn, hoveredElement, keyReleased, 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 Identifier LEAVE_ICON
private static final Identifier INVITATION_ICON
private static final Identifier INVITE_ICON
private static final Identifier WORLD_ICON
private static final Identifier REALMS
private static final Identifier CONFIGURE_ICON
private static final Identifier QUESTIONMARK
private static final Identifier NEWS_ICON
private static final Identifier POPUP
private static final Identifier DARKEN
private static final Identifier CROSS_ICON
private static final Identifier TRIAL_ICON
private static final Identifier WIDGETS
private static final Text field_26447
private static final Text field_26448
private static final Text field_26450
private static final Text field_26451
private static final Text field_26452
private static final Text field_26453
private static final Text field_26454
private static final Text field_26455
private static final Text field_26456
private static final Text field_26457
private static final Text field_26458
private static final Text field_26459
private static final Text field_26460
private static final Text field_26461
private static final Text field_26462
private static final Text field_26463
private static final Text field_26464
private static final Text field_26465
private static List<Identifier> IMAGES
private static final RealmsDataFetcher realmsDataFetcher
private static boolean overrideConfigure
private static int lastScrollYPosition
private static volatile boolean hasParentalConsent
private static volatile boolean checkedParentalConsent
private static volatile boolean checkedClientCompatability
private static Screen realmsGenericErrorScreen
private static boolean regionsPinged
private final RateLimiter rateLimiter
private boolean dontSetConnectedToRealms
private final Screen lastScreen
private volatile RealmsMainScreen.RealmSelectionList realmSelectionList
private long selectedServerId
private ButtonWidget playButton
private ButtonWidget backButton
private ButtonWidget renewButton
private ButtonWidget configureButton
private ButtonWidget leaveButton
private List<RealmsServer> realmsServers
private volatile int numberOfPendingInvites
private int animTick
private boolean hasFetchedServers
private boolean popupOpenedByUser
private boolean justClosedPopup
private volatile boolean trialsAvailable
private volatile boolean createdTrial
private volatile boolean showingPopup
private volatile boolean hasUnreadNews
private volatile String newsLink
private int carouselIndex
private int carouselTick
private boolean hasSwitchedCarouselImage
private int clicks
private ReentrantLock connectLock
private class_5489 field_26466
private RealmsMainScreen.HoverState hoverState
private ButtonWidget showPopupButton
private ButtonWidget pendingInvitesButton
private ButtonWidget newsButton
private ButtonWidget createTrialButton
private ButtonWidget buyARealmButton
private ButtonWidget closeButton
public RealmsMainScreen(Screen screen)
private boolean shouldShowMessageInList()
public boolean shouldShowPopup()
public void init()
This method is called when this screen is opened
or resized.
private static boolean hasParentalConsent()
public void addButtons()
private void updateButtonStates(@Nullable RealmsServer server)
private boolean shouldShowPopupButton()
private boolean shouldPlayButtonBeActive(@Nullable RealmsServer server)
private boolean shouldRenewButtonBeActive(@Nullable RealmsServer server)
private boolean shouldConfigureButtonBeVisible(@Nullable RealmsServer server)
private boolean shouldLeaveButtonBeVisible(@Nullable RealmsServer server)
public void tick()
tick
in interface TickableElement
tick
in class RealmsScreen
private void pingRegions()
private void onRenew()
private void checkClientCompatability()
private void checkUnreadNews()
private void checkParentalConsent()
private void switchToStage()
private void switchToLocal()
private void switchToProd()
private void stopRealmsFetcher()
private void configureClicked(RealmsServer realmsServer)
private void leaveClicked(@Nullable RealmsServer selectedServer)
private void saveListScrollPosition()
@Nullable private RealmsServer findServer(long id)
private void method_24991(boolean bool)
private void method_31174(RealmsServer realmsServer)
public void removeSelection()
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 onClosePopup()
public boolean charTyped(char chr, int keyCode)
GLFW
class.chr
- the captured characterkeyCode
- the associated key codetrue
to indicate that the event handling is successful/validKeyboard.onChar(long, int, int)
,
GLFW.GLFW_KEY_Q
,
GLFWKeyCallbackI.invoke(long, int, int, int, int)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void drawRealmsLogo(MatrixStack matrices, int x, int y)
public boolean mouseClicked(double mouseX, double mouseY, int button)
GLFW
class.mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- the mouse button numbertrue
to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int)
,
GLFW.GLFW_MOUSE_BUTTON_1
private boolean isOutsidePopup(double xm, double ym)
private void drawPopup(MatrixStack matrices, int mouseX, int mouseY)
private int popupX0()
private int popupY0()
private void drawInvitationPendingIcon(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool, boolean bool2)
private boolean inPendingInvitationArea(double xm, double ym)
public void play(RealmsServer realmsServer, Screen screen)
private boolean isSelfOwnedServer(RealmsServer serverData)
private boolean method_25001(RealmsServer realmsServer)
private void drawExpired(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void method_24987(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 drawClose(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void drawLeave(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
private void drawConfigure(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
protected void renderMousehoverTooltip(MatrixStack matrixStack, List<Text> list, int int2, int int3)
private void renderMoreInfo(MatrixStack matrixStack, int int2, int int3, int int4, int int5, boolean bool)
private void renderNews(MatrixStack matrixStack, int int2, int int3, boolean bool, int int4, int int5, boolean bool2, boolean bool3)
private void renderLocal(MatrixStack matrixStack)
private void renderStage(MatrixStack matrixStack)
public RealmsMainScreen newScreen()
public static void method_23765(ResourceManager manager)
private void method_27452(Text[] text)
private void method_24985(ButtonWidget buttonWidget)