Class MultiSelectPCMode
java.lang.Object
com.pixelmonmod.pixelmon.client.gui.pc.PCMode
com.pixelmonmod.pixelmon.client.gui.pc.MultiSelectPCMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StoragePositionprotected StoragePositionprotected ArrayList<StoragePosition>protected Colorprotected static final Stringprotected ArrayList<com.mojang.datafixers.util.Pair<StoragePosition,StoragePosition>> An ArrayList containing pairs of DisplayPosition, PositionInStorage. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ArrayList<StoragePosition> positionsToLoad) Performs any actions necessary to initiate Mode.protected voidareaSelectEnd(StoragePosition position) protected voidareaSelectStart(StoragePosition position) protected voidareaSelectStart(StoragePosition position, boolean allowEmptyStart) protected voidcherryDeselect(StoragePosition position) protected booleancherrySelect(StoragePosition position) voidprotected voidbooleanPerforms any actions necessary to deactivate Mode.protected voiddrawBox(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) voiddrawCursor(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected voiddrawPosition(net.minecraft.client.gui.GuiGraphics graphics, float xPos, float yPos, float width, float height, StoragePosition position, int mouseX, int mouseY) protected voiddrawSelectionArea(net.minecraft.client.gui.GuiGraphics graphics, int l, int t, int r, int b) protected voidbooleanprotected booleanprotected booleanprotected booleanisSelected(StoragePosition position) protected booleanbooleanonBoxClicked(int mouseButton, int boxIndex) voidonBoxUpdated(int newBoxNumber) booleanonKeyPress(int keyCode, int scanCode, int modifiers) booleanonMouseClicked(int mouseButton, StoragePosition position) booleanonMouseReleased(int mouseButton, StoragePosition position) voidonStorageUpdated(PCStorage newStorage) booleanredo(List<StoragePosition> positionsBefore, List<StoragePosition> positionsAfter) protected voidUpdates selectedPositions based on selectedPokemon.protected voidvoidsetSelectedPositions(ArrayList<StoragePosition> selectedPositions) protected voidbooleanundo(List<StoragePosition> positionsBefore, List<StoragePosition> positionsAfter) Methods inherited from class com.pixelmonmod.pixelmon.client.gui.pc.PCMode
drawCursor, drawCursorGrabbed, drawFooter, drawHealthBar, 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:
deactivatein classPCMode- Returns:
- Whether Mode could be deactivated.
-
getSelectedPositions
- Specified by:
getSelectedPositionsin classPCMode
-
setSelectedPositions
-
hasSelected
public boolean hasSelected()- Overrides:
hasSelectedin classPCMode
-
isSelected
- Overrides:
isSelectedin classPCMode
-
onStorageUpdated
- Specified by:
onStorageUpdatedin classPCMode
-
onBoxUpdated
public void onBoxUpdated(int newBoxNumber) - Overrides:
onBoxUpdatedin 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:
clearSelectedin 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:
onMouseClickedin classPCMode- Returns:
- Whether the event was consumed
-
onMouseReleased
- Overrides:
onMouseReleasedin classPCMode- Returns:
- Whether the event was consumed
-
onBoxClicked
public boolean onBoxClicked(int mouseButton, int boxIndex) - Specified by:
onBoxClickedin classPCMode
-
onKeyPress
public boolean onKeyPress(int keyCode, int scanCode, int modifiers) - Overrides:
onKeyPressin 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:
drawPositionin 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:
drawCursorin classPCMode
-