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
Modifier and TypeFieldDescriptionprotected int
The box being displayed from PCScreen.protected static final float
protected static final int
The number of Box that can fit along the height of the PC GUI.protected static final int
The number of Box that can fit along the width of the GUI.protected static final int
protected static final int
protected int
The locations of the corners of the boxlist.protected int
The locations of the corners of the boxlist.protected int
The locations of the corners of the boxlist.protected int
The locations of the corners of the boxlist.protected int
protected static final int
protected PCScreen
protected boolean
Determines whether box numbers or box names are used when displaying the range of boxes on screenprotected Point
The Point the box was picked up from.protected static final int
protected PCBox
The box picked up by the cursor.protected int
The box picked up by the cursor.protected static final int
The height of an individual Box slot.protected static final int
The height of an individual Box slot.protected PCToolbar
Fields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, children, font, height, minecraft, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawBoxList
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected void
drawBoxOutline
(net.minecraft.client.gui.GuiGraphics graphics, int xPos, int yPos, Color color) protected void
drawBoxSprite
(net.minecraft.client.gui.GuiGraphics graphics, int boxNumber, int xPos, int yPos, int mouseX, int mouseY) void
drawCursor
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected void
protected int
getIndexFromPos
(double x, double y) protected Point
getPosFromIndex
(int index) protected Point
getRelativeGrabPoint
(int index, double x, double y) protected void
goToBox
(int boxIndex) void
init()
boolean
keyPressed
(int keyCode, int scanCode, int modifiers) boolean
mouseClicked
(double mouseX, double mouseY, int mouseButton) void
setActiveBox
(int ind) protected void
setToolbarActive
(boolean v) protected boolean
trySwapBoxes
(int index1, int index2) protected void
updateSelected
(int newIndex) protected void
updateSelected
(int newIndex, Point grabPoint) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addEventWidget, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, confirmLink, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, openLink, rebuildWidgets, removed, removeWidget, render, renderBackground, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, runNarration, scheduleNarration, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, shouldRunNarration, suppressNarration, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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, magicalSpecialHackyFocus, 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
-
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:
init
in 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:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
mouseClicked
in 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:
keyPressed
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
keyPressed
in 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)
-