Class BattleRulesPlayerScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.widgets.DropDownScreen
com.pixelmonmod.pixelmon.client.gui.battles.rules.BattleRulesBaseScreen
com.pixelmonmod.pixelmon.client.gui.battles.rules.BattleRulesPlayerScreen
- All Implemented Interfaces:
IImportableContainer
,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
Battle rules screen for player-vs.-player battles.
-
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 inherited from class com.pixelmonmod.pixelmon.client.gui.battles.rules.BattleRulesBaseScreen
battleTypeButton, centerX, centerY, clauseListHeight, critsButton, editButtons, editingEnabled, exitableButton, fullHealButton, importExportButton, raiseToCapButton, rectBottom, ruleLabels, rules, selectedClauses, teamPreviewButton, textFields, tierMenu, yChange
Fields inherited from class com.pixelmonmod.pixelmon.client.gui.widgets.DropDownScreen
dropDownManager, guiLeft, guiTop, xSize, ySize
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
ConstructorDescriptionBattleRulesPlayerScreen
(int battleQueryID, boolean isProposing) Initializes a battle rules screen for player-vs.-player battles. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
actionPerformed
(net.minecraft.client.gui.components.Button button) void
changeState
(EnumRulesGuiState state) Changes the state of the GUI.protected void
drawGuiContainerBackgroundLayer
(net.minecraft.client.gui.GuiGraphics graphics, float partialTicks, int mouseX, int mouseY) protected int
Returns the height of the background rectangle.void
init()
boolean
Returns true if this GUI should pause the game when it is displayed in single-playerboolean
keyPressed
(int keyCode, int scanCode, int modifiers) boolean
mouseClickedUnderMenus
(double x, double y, int mouseButton) Handles mouse input when a drop-down menu is not clicked.boolean
mouseScrolled
(double mouseX, double mouseY, double deltaX, double deltaY) void
removed()
void
render
(net.minecraft.client.gui.GuiGraphics matrix, int mouseX, int mouseY, float partialTicks) void
renderDirtBackground
(net.minecraft.client.gui.GuiGraphics p_282281_) void
tick()
Methods inherited from class com.pixelmonmod.pixelmon.client.gui.battles.rules.BattleRulesBaseScreen
charTyped, dimScreen, disableMenus, drawBackgroundUnderMenus, getExportText, getScreen, highlightButtons, importText, registerRules, setRules
Methods inherited from class com.pixelmonmod.pixelmon.client.gui.widgets.DropDownScreen
addDropDown, drawGuiContainerForegroundLayer, mouseClicked, mouseDragged, removeDropDown
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, isSelectAll, isValidCharacterForName, narrationEnabled, onClose, onFilesDrop, openLink, rebuildWidgets, removeWidget, renderBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, runNarration, scheduleNarration, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, shouldRunNarration, suppressNarration, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseReleased, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface com.pixelmonmod.pixelmon.client.gui.pokemoneditor.IImportableContainer
getPokemon, setPokemon
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
BattleRulesPlayerScreen
public BattleRulesPlayerScreen(int battleQueryID, boolean isProposing) Initializes a battle rules screen for player-vs.-player battles.- Parameters:
battleQueryID
- The ID of the battle query that this GUI is representing.isProposing
- Whether the player is currently proposing a set of rules.
-
-
Method Details
-
init
public void init()- Overrides:
init
in classBattleRulesBaseScreen
-
changeState
Changes the state of the GUI.- Parameters:
state
- The new state of the GUI.
-
tick
public void tick()- Overrides:
tick
in classnet.minecraft.client.gui.screens.Screen
-
render
public void render(net.minecraft.client.gui.GuiGraphics matrix, int mouseX, int mouseY, float partialTicks) - Specified by:
render
in interfacenet.minecraft.client.gui.components.Renderable
- Overrides:
render
in classDropDownScreen
-
drawGuiContainerBackgroundLayer
protected void drawGuiContainerBackgroundLayer(net.minecraft.client.gui.GuiGraphics graphics, float partialTicks, int mouseX, int mouseY) - Overrides:
drawGuiContainerBackgroundLayer
in classDropDownScreen
-
getBackgroundHeight
protected int getBackgroundHeight()Description copied from class:BattleRulesBaseScreen
Returns the height of the background rectangle.- Overrides:
getBackgroundHeight
in classBattleRulesBaseScreen
- Returns:
- The height of the background rectangle.
-
renderDirtBackground
public void renderDirtBackground(net.minecraft.client.gui.GuiGraphics p_282281_) - Overrides:
renderDirtBackground
in classnet.minecraft.client.gui.screens.Screen
-
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
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double deltaX, double deltaY) - Specified by:
mouseScrolled
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
mouseScrolled
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
mouseScrolled
in classDropDownScreen
-
mouseClickedUnderMenus
public boolean mouseClickedUnderMenus(double x, double y, int mouseButton) Description copied from class:DropDownScreen
Handles mouse input when a drop-down menu is not clicked.- Overrides:
mouseClickedUnderMenus
in classBattleRulesBaseScreen
- Parameters:
x
- The x coordinate of the mouse.y
- The y coordinate of the mouse.mouseButton
- The index of the clicked button.
-
actionPerformed
protected void actionPerformed(net.minecraft.client.gui.components.Button button) - Overrides:
actionPerformed
in classBattleRulesBaseScreen
-
removed
public void removed()- Overrides:
removed
in classBattleRulesBaseScreen
-
isPauseScreen
public boolean isPauseScreen()Returns true if this GUI should pause the game when it is displayed in single-player- Overrides:
isPauseScreen
in classDropDownScreen
-