public abstract class BattleRulesBaseScreen extends DropDownScreen implements IImportableContainer
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.client.gui.widget.button.Button |
battleTypeButton
The button used to switch between battle types.
|
protected int |
centerX
The x coordinate of the screen's center.
|
protected int |
centerY
The y coordinate of the screen's center.
|
protected int |
clauseListHeight
The height of clause lists.
|
protected net.minecraft.client.gui.widget.button.Button[] |
editButtons
Buttons used to edit the rules.
|
protected boolean |
editingEnabled
Whether rules can be edited.
|
protected OnOffButton |
fullHealButton
The button used to toggle full healing.
|
protected net.minecraft.client.gui.widget.button.Button |
importExportButton
The button used to navigate to the import/export screen.
|
protected OnOffButton |
raiseToCapButton
The button used to toggle the raise-to-cap rule.
|
protected int |
rectBottom
The y coordinate of the bottom of the screen.
|
protected java.util.List<DescriptiveText> |
ruleLabels
Rule labels and their descriptions.
|
protected BattleRules |
rules
The battle rules that are currently being edited in the screen.
|
protected java.util.List<BattleClause> |
selectedClauses
The clauses that have been selected to be included in the rules.
|
protected OnOffButton |
teamPreviewButton
The button used to toggle team preview.
|
protected java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> |
textFields
All text fields in the screen.
|
protected DropDown<Tier> |
tierMenu
The drop-down menu for tier selection.
|
protected int |
yChange
Changes the default y coordinates of screen elements.
|
dropDownManager, guiLeft, guiTop, xSize, ySize| Constructor and Description |
|---|
BattleRulesBaseScreen()
Initializes a battle rules screen.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
actionPerformed(net.minecraft.client.gui.widget.button.Button button) |
boolean |
charTyped(char key,
int keyCode) |
protected void |
dimScreen(com.mojang.blaze3d.matrix.MatrixStack matrix)
Darkens the whole screen.
|
protected boolean |
disableMenus()
Checks if drop-down menus are disabled and uninteractable.
|
protected void |
drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
Draws the screen background under the drop-down menus.
|
protected int |
getBackgroundHeight()
Returns the height of the background rectangle.
|
java.lang.String |
getExportText()
Gets exportable text for the current Pokémon.
|
net.minecraft.client.gui.screen.Screen |
getScreen()
Returns the screen containing the import/export.
|
protected void |
highlightButtons(com.mojang.blaze3d.matrix.MatrixStack matrix,
int highlightOffsetX,
int bottomOffset)
Highlights a part of the screen where buttons appear.
|
java.lang.String |
importText(java.lang.String importText)
Parses import text and saves it to the current Pokémon.
|
void |
init() |
boolean |
mouseClickedUnderMenus(double x,
double y,
int mouseButton)
Handles mouse input when a drop-down menu is not clicked.
|
protected void |
registerRules()
Registers entered fields in the screen into the rules object.
|
void |
removed() |
void |
setRules(BattleRules rules)
Updates the screen with a new set of rules.
|
addDropDown, drawGuiContainerBackgroundLayer, drawGuiContainerForegroundLayer, isPauseScreen, mouseClicked, mouseDragged, mouseScrolled, removeDropDown, renderaddButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorgetFocused, isDragging, setDragging, setFocusedblit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPokemon, setPokemonprotected BattleRules rules
protected java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> textFields
protected boolean editingEnabled
protected net.minecraft.client.gui.widget.button.Button importExportButton
protected OnOffButton raiseToCapButton
protected net.minecraft.client.gui.widget.button.Button battleTypeButton
protected OnOffButton fullHealButton
protected OnOffButton teamPreviewButton
protected net.minecraft.client.gui.widget.button.Button[] editButtons
protected java.util.List<DescriptiveText> ruleLabels
protected java.util.List<BattleClause> selectedClauses
protected int centerX
protected int centerY
protected int rectBottom
protected int yChange
protected int clauseListHeight
public BattleRulesBaseScreen()
public void init()
init in class DropDownScreenpublic void setRules(BattleRules rules)
rules - The rules to update the screen with.protected void drawBackgroundUnderMenus(com.mojang.blaze3d.matrix.MatrixStack matrix,
float partialTicks,
int mouseX,
int mouseY)
DropDownScreendrawBackgroundUnderMenus in class DropDownScreenpartialTicks - The current number of partial ticks.mouseX - The x coordinate of the mouse.mouseY - The y coordinate of the mouse.protected int getBackgroundHeight()
public boolean charTyped(char key,
int keyCode)
charTyped in interface net.minecraft.client.gui.IGuiEventListenercharTyped in interface net.minecraft.client.gui.INestedGuiEventHandlerpublic boolean mouseClickedUnderMenus(double x,
double y,
int mouseButton)
DropDownScreenmouseClickedUnderMenus in class DropDownScreenx - The x coordinate of the mouse.y - The y coordinate of the mouse.mouseButton - The index of the clicked button.protected void actionPerformed(net.minecraft.client.gui.widget.button.Button button)
protected void registerRules()
public java.lang.String getExportText()
IImportableContainergetExportText in interface IImportableContainerpublic java.lang.String importText(java.lang.String importText)
IImportableContainerimportText in interface IImportableContainerimportText - The text to save to the current Pokémon.public void removed()
removed in class net.minecraft.client.gui.screen.Screenprotected void dimScreen(com.mojang.blaze3d.matrix.MatrixStack matrix)
protected void highlightButtons(com.mojang.blaze3d.matrix.MatrixStack matrix,
int highlightOffsetX,
int bottomOffset)
highlightOffsetX - Half of the width of the highlight box.bottomOffset - The offset from the bottom of the box that the top of the highlight will be at.public net.minecraft.client.gui.screen.Screen getScreen()
IImportableContainergetScreen in interface IImportableContainerprotected boolean disableMenus()
DropDownScreendisableMenus in class DropDownScreen