@Environment(value=CLIENT) public class RealmsSelectWorldTemplateScreen extends RealmsScreen
Modifier and Type | Class and Description |
---|---|
(package private) class |
RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList |
(package private) class |
RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionListEntry |
Modifier and Type | Field and Description |
---|---|
private int |
clicks |
private String |
currentLink |
private boolean |
displayWarning |
private static Text |
field_26512 |
private static Text |
field_26513 |
private boolean |
hoverWarning |
private static Identifier |
LINK_ICONS |
private static Logger |
LOGGER |
private List<TextRenderingUtils.Line> |
noTemplatesMessage |
private RealmsScreenWithCallback |
parent |
private ButtonWidget |
publisherButton |
private ButtonWidget |
selectButton |
private int |
selectedTemplate |
private static Identifier |
SLOT_FRAME |
private RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList |
templateList |
private Text |
title |
private Text |
toolTip |
private static Identifier |
TRAILER_ICONS |
private ButtonWidget |
trailerButton |
private Text[] |
warning |
private String |
warningURL |
private RealmsServer.WorldType |
worldType |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
RealmsSelectWorldTemplateScreen(RealmsScreenWithCallback parent,
RealmsServer.WorldType worldType) |
RealmsSelectWorldTemplateScreen(RealmsScreenWithCallback parent,
RealmsServer.WorldType worldType,
WorldTemplatePaginatedList list) |
Modifier and Type | Method and Description |
---|---|
private void |
backButtonClicked() |
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.
|
private void |
method_21414(MatrixStack matrixStack,
int int2,
int int3,
List<TextRenderingUtils.Line> list) |
private com.mojang.datafixers.util.Either<WorldTemplatePaginatedList,String> |
method_21416(WorldTemplatePaginatedList worldTemplatePaginatedList,
RealmsClient realmsClient) |
private WorldTemplate |
method_21434() |
private boolean |
method_25247() |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
private void |
onPublish() |
private void |
onTrailer() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
protected void |
renderMousehoverTooltip(MatrixStack matrixStack,
Text text,
int int2,
int int3) |
private void |
selectTemplate() |
private void |
setPagination(WorldTemplatePaginatedList worldTemplatePaginatedList) |
void |
setTitle(Text title) |
void |
setWarning(Text[] text) |
private boolean |
shouldPublisherBeVisible() |
private boolean |
shouldSelectButtonBeActive() |
private boolean |
shouldTrailerBeVisible() |
void |
tick() |
private void |
updateButtonStates() |
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, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
mouseMoved
private static final Logger LOGGER
private static final Identifier LINK_ICONS
private static final Identifier TRAILER_ICONS
private static final Identifier SLOT_FRAME
private static final Text field_26512
private static final Text field_26513
private final RealmsScreenWithCallback parent
private RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList templateList
private int selectedTemplate
private Text title
private ButtonWidget selectButton
private ButtonWidget trailerButton
private ButtonWidget publisherButton
private String currentLink
private final RealmsServer.WorldType worldType
private int clicks
private String warningURL
private boolean displayWarning
private boolean hoverWarning
@Nullable private List<TextRenderingUtils.Line> noTemplatesMessage
public RealmsSelectWorldTemplateScreen(RealmsScreenWithCallback parent, RealmsServer.WorldType worldType)
public RealmsSelectWorldTemplateScreen(RealmsScreenWithCallback parent, RealmsServer.WorldType worldType, @Nullable WorldTemplatePaginatedList list)
public void setTitle(Text title)
public void setWarning(Text[] text)
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
public void init()
This method is called when this screen is opened
or resized.
private void updateButtonStates()
private boolean shouldSelectButtonBeActive()
private boolean shouldPublisherBeVisible()
private WorldTemplate method_21434()
private boolean shouldTrailerBeVisible()
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()
private void selectTemplate()
private boolean method_25247()
private void onTrailer()
private void onPublish()
private void setPagination(WorldTemplatePaginatedList worldTemplatePaginatedList)
private com.mojang.datafixers.util.Either<WorldTemplatePaginatedList,String> method_21416(WorldTemplatePaginatedList worldTemplatePaginatedList, RealmsClient realmsClient)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void method_21414(MatrixStack matrixStack, int int2, int int3, List<TextRenderingUtils.Line> list)
protected void renderMousehoverTooltip(MatrixStack matrixStack, @Nullable Text text, int int2, int int3)