Class MultiSelectPCMode
java.lang.Object
com.pixelmonmod.pixelmon.client.gui.pc.PCMode
com.pixelmonmod.pixelmon.client.gui.pc.MultiSelectPCMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected StoragePosition
protected StoragePosition
protected ArrayList<StoragePosition>
protected Color
protected static final String
protected ArrayList<com.mojang.datafixers.util.Pair<StoragePosition,
StoragePosition>> An ArrayList containing pairs of DisplayPosition, PositionInStorage. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ArrayList<StoragePosition> positionsToLoad) Performs any actions necessary to initiate Mode.protected void
areaSelectEnd
(StoragePosition position) protected void
areaSelectStart
(StoragePosition position) protected void
areaSelectStart
(StoragePosition position, boolean allowEmptyStart) protected void
cherryDeselect
(StoragePosition position) protected boolean
cherrySelect
(StoragePosition position) void
protected void
boolean
Performs any actions necessary to deactivate Mode.protected void
drawBox
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) void
drawCursor
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected void
drawPosition
(net.minecraft.client.gui.GuiGraphics graphics, float xPos, float yPos, float width, float height, StoragePosition position, int mouseX, int mouseY) protected void
drawSelectionArea
(net.minecraft.client.gui.GuiGraphics graphics, int l, int t, int r, int b) protected void
boolean
protected boolean
protected boolean
protected boolean
isSelected
(StoragePosition position) protected boolean
boolean
onBoxClicked
(int mouseButton, int boxIndex) void
onBoxUpdated
(int newBoxNumber) boolean
onKeyPress
(int keyCode, int scanCode, int modifiers) boolean
onMouseClicked
(int mouseButton, StoragePosition position) boolean
onMouseReleased
(int mouseButton, StoragePosition position) void
onStorageUpdated
(PCStorage newStorage) boolean
redo
(List<StoragePosition> positionsBefore, List<StoragePosition> positionsAfter) protected void
Updates selectedPositions based on selectedPokemon.protected void
void
setSelectedPositions
(ArrayList<StoragePosition> selectedPositions) protected void
boolean
undo
(List<StoragePosition> positionsBefore, List<StoragePosition> positionsAfter) Methods inherited from class com.pixelmonmod.pixelmon.client.gui.pc.PCMode
drawCursor, drawCursorGrabbed, drawFooter, drawPokemonSprite, drawPokemonSprite, drawPokemonSprite, drawPokemonSprite, drawPokemonSprite, drawPokemonSprite, drawPokemonSpriteItem, drawPosition, drawSelectedPosition, isAllowedHoverLock, isAllowedPokechecker
-
Field Details
-
name
- See Also:
-
color
-
areaSelectStart
-
areaSelectEnd
-
cherrySelected
-
selectedPositions
protected ArrayList<com.mojang.datafixers.util.Pair<StoragePosition,StoragePosition>> selectedPositionsAn ArrayList containing pairs of DisplayPosition, PositionInStorage. This is needed for when you need to display or calculate mutation based on a temporary display, rather than the actual positions. (e.g. when grabbing multiple Pokemon from Search). For most cases, these are the same. Use getSelectedPositions() to get a list of the actual StoragePositions (every pair's second value) -
selectedPokemonList
-
-
Constructor Details
-
MultiSelectPCMode
-
-
Method Details
-
activate
Performs any actions necessary to initiate Mode. An ArrayList of StoragePositions can be passed to be loaded. -
deactivate
public boolean deactivate()Performs any actions necessary to deactivate Mode. Disregarding unsuccessful deactivation can lead to unwanted behaviour!- Specified by:
deactivate
in classPCMode
- Returns:
- Whether Mode could be deactivated.
-
getSelectedPositions
- Specified by:
getSelectedPositions
in classPCMode
-
setSelectedPositions
-
hasSelected
public boolean hasSelected()- Overrides:
hasSelected
in classPCMode
-
isSelected
- Overrides:
isSelected
in classPCMode
-
onStorageUpdated
- Specified by:
onStorageUpdated
in classPCMode
-
onBoxUpdated
public void onBoxUpdated(int newBoxNumber) - Overrides:
onBoxUpdated
in classPCMode
-
areaSelectStart
-
areaSelectStart
-
areaSelectEnd
-
cherrySelect
-
cherryDeselect
-
confirmCherrySelection
protected void confirmCherrySelection() -
finishMultiSelect
protected void finishMultiSelect() -
selectAll
protected void selectAll() -
isAreaSelecting
protected boolean isAreaSelecting() -
isCherrySelecting
protected boolean isCherrySelecting() -
isSelectingMultiple
protected boolean isSelectingMultiple() -
setSelectedPositionsFromArea
-
clearSelected
public void clearSelected()- Specified by:
clearSelected
in classPCMode
-
refreshSelectedPositions
protected void refreshSelectedPositions()Updates selectedPositions based on selectedPokemon. Used when storage changes, eg. grabbing Pokemon from search and bringing them into normal storage -
onMouseClicked
- Specified by:
onMouseClicked
in classPCMode
- Returns:
- Whether the event was consumed
-
onMouseReleased
- Overrides:
onMouseReleased
in classPCMode
- Returns:
- Whether the event was consumed
-
onBoxClicked
public boolean onBoxClicked(int mouseButton, int boxIndex) - Specified by:
onBoxClicked
in classPCMode
-
onKeyPress
public boolean onKeyPress(int keyCode, int scanCode, int modifiers) - Overrides:
onKeyPress
in classPCMode
- Returns:
- Whether the input was consumed or not
-
redo
-
undo
-
drawPosition
protected void drawPosition(net.minecraft.client.gui.GuiGraphics graphics, float xPos, float yPos, float width, float height, StoragePosition position, int mouseX, int mouseY) - Overrides:
drawPosition
in classPCMode
-
drawBox
protected void drawBox(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) -
drawSelectionArea
protected void drawSelectionArea(net.minecraft.client.gui.GuiGraphics graphics, int l, int t, int r, int b) -
drawCursor
public void drawCursor(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) - Overrides:
drawCursor
in classPCMode
-