Class ManagedGuiScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.render.api.gui.ManagedGuiScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
public final class ManagedGuiScreen
extends net.minecraft.client.gui.screens.Screen
Internal screen wrapper that hosts a
GuiView.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
Fields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionManagedGuiScreen(GuiView view, net.minecraft.client.gui.screens.Screen parentScreen) Creates a managed screen for the supplied view. -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(net.minecraft.client.input.CharacterEvent event) voidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) Managed views own their complete retained background.voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) protected voidinit()booleanReturns whether this screen is hosting the supplied view instance.booleanbooleankeyPressed(net.minecraft.client.input.KeyEvent event) booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent event) booleanmouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) voidonClose()voidremoved()voidRequests that the screen close and restore its parent screen.booleanLets the hosted view approve replacement by another managed GUI.voidresize(int width, int height) voidtick()Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
ManagedGuiScreen
Creates a managed screen for the supplied view.- Parameters:
view- view to hostparentScreen- screen to restore when this screen closes
-
-
Method Details
-
isFor
Returns whether this screen is hosting the supplied view instance.- Parameters:
candidate- view to compare- Returns:
truewhen the supplied view is hosted by this screen
-
requestReplacement
public boolean requestReplacement()Lets the hosted view approve replacement by another managed GUI.- Returns:
truewhen replacement may continue
-
requestClose
public void requestClose()Requests that the screen close and restore its parent screen. -
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screens.Screen
-
extractRenderState
public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) - Specified by:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- Overrides:
extractRenderStatein classnet.minecraft.client.gui.screens.Screen
-
extractBackground
public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) Managed views own their complete retained background. Skipping the default screen background prevents Minecraft's full-screen menu blur and menu texture from obscuring live game-backed glass surfaces.- Overrides:
extractBackgroundin classnet.minecraft.client.gui.screens.Screen
-
mouseClicked
public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) -
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent event) -
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) -
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) -
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent event) -
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screens.Screen
-
resize
public void resize(int width, int height) - Overrides:
resizein classnet.minecraft.client.gui.screens.Screen
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classnet.minecraft.client.gui.screens.Screen
-