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 Component
private static final String
private static final float
private long
private boolean
private static final org.slf4j.Logger
private final LogoRenderer
private float
private 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).private Button
private SplashRenderer
private static final Component
Fields 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, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorsConstructorDescriptionTitleScreen
(boolean pFading) TitleScreen
(boolean pFading, LogoRenderer pLogoRenderer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
added()
private boolean
private void
confirmDemo
(boolean p_96778_) private void
createDemoMenuOptions
(int pY, int pRowHeight) Adds Demo buttons on Main Menu for players who are playing Demo.private void
createNormalMenuOptions
(int pY, int pRowHeight) Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.private void
fadeWidgets
(float pAlpha) private Component
protected void
init()
boolean
boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.static CompletableFuture
<Void> preloadResources
(TextureManager pTexMngr, Executor pBackgroundExecutor) private boolean
void
removed()
void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.void
renderBackground
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) protected void
renderPanorama
(GuiGraphics pGuiGraphics, float pPartialTick) boolean
void
tick()
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, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods 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 pFading) -
TitleScreen
-
-
Method Details
-
realmsNotificationsEnabled
private boolean realmsNotificationsEnabled() -
tick
public void tick() -
preloadResources
public static CompletableFuture<Void> preloadResources(TextureManager pTexMngr, Executor pBackgroundExecutor) -
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreen
in classScreen
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()- Overrides:
shouldCloseOnEsc
in classScreen
-
init
protected void init() -
createNormalMenuOptions
private void createNormalMenuOptions(int pY, int pRowHeight) Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game. -
getMultiplayerDisabledReason
-
createDemoMenuOptions
private void createDemoMenuOptions(int pY, int pRowHeight) 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:
render
in interfaceRenderable
- Overrides:
render
in classScreen
- Parameters:
pGuiGraphics
- the GuiGraphics object used for rendering.pMouseX
- the x-coordinate of the mouse cursor.pMouseY
- the y-coordinate of the mouse cursor.pPartialTick
- the partial tick time.
-
fadeWidgets
private void fadeWidgets(float pAlpha) -
renderBackground
public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) - Overrides:
renderBackground
in classScreen
-
renderPanorama
- Overrides:
renderPanorama
in classScreen
-
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.- Parameters:
pMouseX
- the X coordinate of the mouse.pMouseY
- the Y coordinate of the mouse.pButton
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
removed
public void removed() -
added
public void added() -
confirmDemo
private void confirmDemo(boolean p_96778_)
-