Package net.minecraft.client.gui.screens
Class TitleScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.TitleScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.DeferredTooltipRendering, Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Componentprivate static final Stringprivate static final floatprivate longprivate booleanprivate static final org.slf4j.Loggerprivate final LogoRendererprivate floatprivate RealmsNotificationsScreenA screen generated by realms for notifications drawn in addition to the main menu (buttons and such from both are drawn at the same time).private Buttonprivate SplashRendererprivate static final ComponentFields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionTitleScreen(boolean fading) TitleScreen(boolean fading, LogoRenderer logoRenderer) -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()private booleanprivate voidconfirmDemo(boolean confirmed) private voidcreateDemoMenuOptions(int y, int rowHeight) Adds Demo buttons on Main Menu for players who are playing Demo.private voidcreateNormalMenuOptions(int y, int rowHeight) Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.private voidfadeWidgets(float alpha) private Componentprotected voidinit()booleanbooleanmouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.static CompletableFuture<Void> preloadResources(TextureManager texMngr, Executor backgroundExecutor) private booleanvoidremoved()voidrender(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) Renders the graphical user interface (GUI) element.voidrenderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) protected voidrenderPanorama(GuiGraphics guiGraphics, float partialTick) booleanvoidtick()Methods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TITLE
-
COPYRIGHT_TEXT
-
DEMO_LEVEL_ID
- See Also:
-
FADE_IN_TIME
private static final float FADE_IN_TIME- See Also:
-
splash
-
resetDemoButton
-
realmsNotificationsScreen
A screen generated by realms for notifications drawn in addition to the main menu (buttons and such from both are drawn at the same time). May be null. -
panoramaFade
private float panoramaFade -
fading
private boolean fading -
fadeInStart
private long fadeInStart -
logoRenderer
-
-
Constructor Details
-
TitleScreen
public TitleScreen() -
TitleScreen
public TitleScreen(boolean fading) -
TitleScreen
-
-
Method Details
-
realmsNotificationsEnabled
private boolean realmsNotificationsEnabled() -
tick
public void tick() -
preloadResources
public static CompletableFuture<Void> preloadResources(TextureManager texMngr, Executor backgroundExecutor) -
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()- Overrides:
shouldCloseOnEscin classScreen
-
init
protected void init() -
createNormalMenuOptions
private void createNormalMenuOptions(int y, int rowHeight) Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game. -
getMultiplayerDisabledReason
-
createDemoMenuOptions
private void createDemoMenuOptions(int y, int rowHeight) Adds Demo buttons on Main Menu for players who are playing Demo. -
checkDemoWorldPresence
private boolean checkDemoWorldPresence() -
render
Renders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
guiGraphics- the GuiGraphics object used for rendering.mouseX- the x-coordinate of the mouse cursor.mouseY- the y-coordinate of the mouse cursor.partialTick- the partial tick time.
-
fadeWidgets
private void fadeWidgets(float alpha) -
renderBackground
- Overrides:
renderBackgroundin classScreen
-
renderPanorama
- Overrides:
renderPanoramain classScreen
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.button- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
removed
public void removed() -
added
public void added() -
confirmDemo
private void confirmDemo(boolean confirmed)
-