Class CottonClientScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
io.github.cottonmc.cotton.gui.client.CottonClientScreen
- All Implemented Interfaces:
CottonScreenImpl,net.minecraft.client.gui.Drawable,net.minecraft.client.gui.Element,net.minecraft.client.gui.ParentElement
public class CottonClientScreen
extends net.minecraft.client.gui.screen.Screen
implements CottonScreenImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.Screen.class_6390 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GuiDescriptionprotected @Nullable WWidgetprotected intprotected intThe X coordinate of the screen title.protected intThe Y coordinate of the screen title.protected intFields inherited from class net.minecraft.client.gui.screen.Screen
client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
ConstructorsConstructorDescriptionCottonClientScreen(GuiDescription description)CottonClientScreen(net.minecraft.text.Text title, GuiDescription description) -
Method Summary
Modifier and TypeMethodDescriptionbooleanchangeFocus(boolean lookForwards)booleancharTyped(char ch, int keyCode)@Nullable WWidgetvoidinit()booleankeyPressed(int ch, int keyCode, int modifiers)booleankeyReleased(int ch, int keyCode, int modifiers)booleanmouseClicked(double mouseX, double mouseY, int mouseButton)booleanmouseDragged(double mouseX, double mouseY, int mouseButton, double deltaX, double deltaY)voidmouseMoved(double mouseX, double mouseY)booleanmouseReleased(double mouseX, double mouseY, int mouseButton)booleanmouseScrolled(double mouseX, double mouseY, double amount)voidremoved()voidrender(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float partialTicks)voidrenderTextHover(net.minecraft.client.util.math.MatrixStack matrices, @Nullable net.minecraft.text.Style textStyle, int x, int y)protected voidreposition(int screenWidth, int screenHeight)Repositions the root panel.voidsetLastResponder(@Nullable WWidget lastResponder)voidtick()Methods inherited from class net.minecraft.client.gui.screen.Screen
addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, method_37056, method_37060, method_37061, method_37063, method_37064, method_37066, method_37067, method_37068, method_37069, method_37070, method_37071, method_37072, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithShadow, fill, fillGradient, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ParentElement
focusOn, hoveredElement, setInitialFocus
-
Field Details
-
description
-
left
protected int left -
top
protected int top -
titleX
protected int titleXThe X coordinate of the screen title.- Since:
- 2.0.0
-
titleY
protected int titleYThe Y coordinate of the screen title.- Since:
- 2.0.0
-
lastResponder
-
-
Constructor Details
-
CottonClientScreen
-
CottonClientScreen
-
-
Method Details
-
getDescription
-
init
public void init()- Overrides:
initin classnet.minecraft.client.gui.screen.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screen.Screen
-
getLastResponder
- Specified by:
getLastResponderin interfaceCottonScreenImpl
-
setLastResponder
- Specified by:
setLastResponderin interfaceCottonScreenImpl
-
reposition
protected void reposition(int screenWidth, int screenHeight)Repositions the root panel.- Parameters:
screenWidth- the width of the screenscreenHeight- the height of the screen
-
render
public void render(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float partialTicks)- Specified by:
renderin interfacenet.minecraft.client.gui.Drawable- Overrides:
renderin classnet.minecraft.client.gui.screen.Screen
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screen.Screen
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.Element- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.ParentElement
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int mouseButton)- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.Element- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.ParentElement
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int mouseButton, double deltaX, double deltaY)- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.Element- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.ParentElement
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double amount)- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.Element- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.ParentElement
-
mouseMoved
public void mouseMoved(double mouseX, double mouseY)- Specified by:
mouseMovedin interfacenet.minecraft.client.gui.Element
-
charTyped
public boolean charTyped(char ch, int keyCode)- Specified by:
charTypedin interfacenet.minecraft.client.gui.Element- Specified by:
charTypedin interfacenet.minecraft.client.gui.ParentElement
-
keyPressed
public boolean keyPressed(int ch, int keyCode, int modifiers)- Specified by:
keyPressedin interfacenet.minecraft.client.gui.Element- Specified by:
keyPressedin interfacenet.minecraft.client.gui.ParentElement- Overrides:
keyPressedin classnet.minecraft.client.gui.screen.Screen
-
keyReleased
public boolean keyReleased(int ch, int keyCode, int modifiers)- Specified by:
keyReleasedin interfacenet.minecraft.client.gui.Element- Specified by:
keyReleasedin interfacenet.minecraft.client.gui.ParentElement
-
renderTextHover
public void renderTextHover(net.minecraft.client.util.math.MatrixStack matrices, @Nullable @Nullable net.minecraft.text.Style textStyle, int x, int y)- Specified by:
renderTextHoverin interfaceCottonScreenImpl
-
changeFocus
public boolean changeFocus(boolean lookForwards)- Specified by:
changeFocusin interfacenet.minecraft.client.gui.Element- Specified by:
changeFocusin interfacenet.minecraft.client.gui.ParentElement
-