@Environment(value=CLIENT) public class GameModeSwitcherScreen extends Screen
| Modifier and Type | Class and Description |
|---|---|
class |
GameModeSwitcherScreen.Button |
(package private) static class |
GameModeSwitcherScreen.GameMode |
| Modifier and Type | Field and Description |
|---|---|
private int |
cachedMouseX |
private int |
cachedMouseY |
private List<GameModeSwitcherScreen.Button> |
gameModeButtons |
private Optional<GameModeSwitcherScreen.GameMode> |
previousGameMode |
private Optional<GameModeSwitcherScreen.GameMode> |
selectedGameMode |
private static Identifier |
TEXTURE |
private boolean |
useMouse |
private static int |
WIDTH |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthBACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
GameModeSwitcherScreen() |
| Modifier and Type | Method and Description |
|---|---|
private void |
drawText(MatrixStack matrices,
String pressF4,
String selectNext,
int y,
int x) |
protected void |
init() |
boolean |
isPauseScreen() |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
private void |
onClose() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
private boolean |
shouldClose() |
private static void |
switchGameMode(MinecraftClient client,
Optional<GameModeSwitcherScreen.GameMode> gameMode) |
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, removed, renderBackground, renderBackground, renderBackgroundTexture, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, getZOffset, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocusmouseMovedprivate static final Identifier TEXTURE
private static final int WIDTH
private final Optional<GameModeSwitcherScreen.GameMode> previousGameMode
private Optional<GameModeSwitcherScreen.GameMode> selectedGameMode
private int cachedMouseX
private int cachedMouseY
private boolean useMouse
private final List<GameModeSwitcherScreen.Button> gameModeButtons
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void drawText(MatrixStack matrices, String pressF4, String selectNext, int y, int x)
private static void switchGameMode(MinecraftClient client, Optional<GameModeSwitcherScreen.GameMode> gameMode)
private boolean shouldClose()
public boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
keyPressed in interface ElementkeyPressed in interface ParentElementkeyPressed in class Screenpublic boolean isPauseScreen()
isPauseScreen in class Screen