Class BoxListScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.pc.BoxListScreen
- All Implemented Interfaces:
HideMouse,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
- Direct Known Subclasses:
BoxListPCScreen
public abstract class BoxListScreen
extends net.minecraft.client.gui.screens.Screen
implements HideMouse
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe box being displayed from PCScreen.protected static final floatprotected static final intThe number of Box that can fit along the height of the PC GUI.protected static final intThe number of Box that can fit along the width of the GUI.protected static final intprotected static final intprotected intThe locations of the corners of the boxlist.protected intThe locations of the corners of the boxlist.protected intThe locations of the corners of the boxlist.protected intThe locations of the corners of the boxlist.protected intprotected static final intprotected PCScreenprotected booleanDetermines whether box numbers or box names are used when displaying the range of boxes on screenprotected PointThe Point the box was picked up from.protected static final intprotected PCBoxThe box picked up by the cursor.protected intThe box picked up by the cursor.protected static final intThe height of an individual Box slot.protected static final intThe height of an individual Box slot.protected PCToolbarFields inherited from class net.minecraft.client.gui.screens.Screen
children, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawBoxList(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected voiddrawBoxOutline(net.minecraft.client.gui.GuiGraphics graphics, int xPos, int yPos, Color color) protected voiddrawBoxSprite(net.minecraft.client.gui.GuiGraphics graphics, int boxNumber, int xPos, int yPos, int mouseX, int mouseY) voiddrawCursor(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected voidprotected intgetIndexFromPos(double x, double y) protected PointgetPosFromIndex(int index) protected PointgetRelativeGrabPoint(int index, double x, double y) protected voidgoToBox(int boxIndex) voidinit()booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int mouseButton) voidsetActiveBox(int ind) protected voidsetToolbarActive(boolean v) protected booleantrySwapBoxes(int index1, int index2) protected voidupdateSelected(int newIndex) protected voidupdateSelected(int newIndex, Point grabPoint) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, 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
-
BOX_SCALE
protected static final float BOX_SCALE- See Also:
-
SLOT_WIDTH
protected static final int SLOT_WIDTHThe height of an individual Box slot.- See Also:
-
SLOT_HEIGHT
protected static final int SLOT_HEIGHTThe height of an individual Box slot.- See Also:
-
BOXES_PER_ROW
protected static final int BOXES_PER_ROWThe number of Box that can fit along the width of the GUI.- See Also:
-
BOXES_PER_COL
protected static final int BOXES_PER_COLThe number of Box that can fit along the height of the PC GUI.- See Also:
-
BOXLIST_PADDING_Y
protected static final int BOXLIST_PADDING_Y- See Also:
-
BOXLIST_PADDING_X
protected static final int BOXLIST_PADDING_X- See Also:
-
SELECTED_BOX_OFFSET
protected static final int SELECTED_BOX_OFFSET- See Also:
-
NULL_INDEX
protected static final int NULL_INDEX- See Also:
-
boxListLeft
protected int boxListLeftThe locations of the corners of the boxlist. -
boxListRight
protected int boxListRightThe locations of the corners of the boxlist. -
boxListTop
protected int boxListTopThe locations of the corners of the boxlist. -
boxListBottom
protected int boxListBottomThe locations of the corners of the boxlist. -
rangeDisplayInNumbers
protected boolean rangeDisplayInNumbersDetermines whether box numbers or box names are used when displaying the range of boxes on screen -
pcScreen
-
currentPageIndex
protected int currentPageIndex -
activeBoxIndex
protected int activeBoxIndexThe box being displayed from PCScreen. -
selectedBoxIndex
protected int selectedBoxIndexThe box picked up by the cursor. -
selectedBox
The box picked up by the cursor. -
relativeGrabPoint
The Point the box was picked up from. -
toolbar
-
-
Constructor Details
-
BoxListScreen
-
-
Method Details
-
init
public void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
setActiveBox
public void setActiveBox(int ind) -
goToBox
protected void goToBox(int boxIndex) -
updateSelected
protected void updateSelected(int newIndex) -
updateSelected
-
getIndexFromPos
protected int getIndexFromPos(double x, double y) -
getPosFromIndex
-
getRelativeGrabPoint
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
trySwapBoxes
protected boolean trySwapBoxes(int index1, int index2) -
finishSelection
protected void finishSelection() -
setToolbarActive
protected void setToolbarActive(boolean v) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - 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
-
drawBoxList
public void drawBoxList(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) -
drawBoxSprite
protected void drawBoxSprite(net.minecraft.client.gui.GuiGraphics graphics, int boxNumber, int xPos, int yPos, int mouseX, int mouseY) -
drawBoxOutline
protected void drawBoxOutline(net.minecraft.client.gui.GuiGraphics graphics, int xPos, int yPos, Color color) -
drawCursor
public void drawCursor(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY)
-