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

    Fields
    Modifier and Type
    Field
    Description
    protected 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 screen
    protected 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
     
    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_WIDTH
      The height of an individual Box slot.
      See Also:
    • SLOT_HEIGHT

      protected static final int SLOT_HEIGHT
      The height of an individual Box slot.
      See Also:
    • BOXES_PER_ROW

      protected static final int BOXES_PER_ROW
      The number of Box that can fit along the width of the GUI.
      See Also:
    • BOXES_PER_COL

      protected static final int BOXES_PER_COL
      The 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 boxListLeft
      The locations of the corners of the boxlist.
    • boxListRight

      protected int boxListRight
      The locations of the corners of the boxlist.
    • boxListTop

      protected int boxListTop
      The locations of the corners of the boxlist.
    • boxListBottom

      protected int boxListBottom
      The locations of the corners of the boxlist.
    • rangeDisplayInNumbers

      protected boolean rangeDisplayInNumbers
      Determines whether box numbers or box names are used when displaying the range of boxes on screen
    • pcScreen

      protected PCScreen pcScreen
    • currentPageIndex

      protected int currentPageIndex
    • activeBoxIndex

      protected int activeBoxIndex
      The box being displayed from PCScreen.
    • selectedBoxIndex

      protected int selectedBoxIndex
      The box picked up by the cursor.
    • selectedBox

      protected PCBox selectedBox
      The box picked up by the cursor.
    • relativeGrabPoint

      protected Point relativeGrabPoint
      The Point the box was picked up from.
    • toolbar

      protected PCToolbar toolbar
  • Constructor Details

    • BoxListScreen

      public BoxListScreen(PCScreen pcScreen)
  • Method Details

    • init

      public void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • setActiveBox

      public void setActiveBox(int ind)
    • goToBox

      protected void goToBox(int boxIndex)
    • updateSelected

      protected void updateSelected(int newIndex)
    • updateSelected

      protected void updateSelected(int newIndex, Point grabPoint)
    • getIndexFromPos

      protected int getIndexFromPos(double x, double y)
    • getPosFromIndex

      protected Point getPosFromIndex(int index)
    • getRelativeGrabPoint

      protected Point getRelativeGrabPoint(int index, double x, double y)
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.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 interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.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)