Class EnhancedTextFieldWidget

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.EditBox
com.pixelmonmod.pixelmon.client.gui.widgets.text.ColouredTextFieldWidget
com.pixelmonmod.pixelmon.client.gui.widgets.text.EnhancedTextFieldWidget
All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
TransparentTextFieldWidget

public class EnhancedTextFieldWidget extends ColouredTextFieldWidget
Represents an enhanced text field that can be edited by the player.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Pattern
     
    protected net.minecraft.network.chat.Component
     
     

    Fields inherited from class net.minecraft.client.gui.components.EditBox

    BACKWARDS, bordered, canLoseFocus, CURSOR_APPEND_CHARACTER, CURSOR_BLINK_INTERVAL_MS, CURSOR_INSERT_COLOR, CURSOR_INSERT_WIDTH, cursorPos, DEFAULT_TEXT_COLOR, displayPos, filter, focusedTime, font, formatter, FORWARDS, highlightPos, hint, isEditable, maxLength, responder, SPRITES, suggestion, textColor, textColorUneditable, value

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, focused, height, hoverOrFocusedStartTime, isHovered, message, MIN_SCROLL_PERIOD, packedFGColor, PERIOD_PER_SCROLLED_PIXEL, tabOrderGroup, tooltipMsDelay, UNSET_FG_COLOR, visible, wasHoveredOrFocused, width, x, y

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnhancedTextFieldWidget(net.minecraft.client.gui.Font font, int x, int y, int width, int height, net.minecraft.client.gui.components.EditBox root, net.minecraft.network.chat.Component value)
     
    EnhancedTextFieldWidget(net.minecraft.client.gui.Font font, int x, int y, int width, int height, net.minecraft.network.chat.Component value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
     
    getValue(boolean ignoreColorCodes)
     
    void
    renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks)
     
    void
    setPlaceholder(net.minecraft.network.chat.Component placeholder)
     
    void
     

    Methods inherited from class com.pixelmonmod.pixelmon.client.gui.widgets.text.ColouredTextFieldWidget

    setHighlightColor

    Methods inherited from class net.minecraft.client.gui.components.EditBox

    canConsumeInput, charTyped, createNarrationMessage, deleteChars, deleteWords, getCursorPosition, getHighlighted, getInnerWidth, getMaxLength, getScreenX, getValue, getWordPosition, insertText, isBordered, isMouseOver, isVisible, keyPressed, moveCursor, moveCursorTo, moveCursorToEnd, moveCursorToStart, nextFocusPath, onClick, playDownSound, renderHighlight, setBordered, setCanLoseFocus, setCursorPosition, setEditable, setFilter, setFocused, setFormatter, setHighlightPos, setHint, setMaxLength, setResponder, setSuggestion, setTextColor, setTextColorUneditable, setValue, setVisible, updateWidgetNarration

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    clearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onRelease, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    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.GuiEventListener

    getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods inherited from interface net.minecraft.client.gui.components.Renderable

    render
  • Field Details

    • COLOR_CODE_PATTERN

      protected static final Pattern COLOR_CODE_PATTERN
    • placeholder

      protected net.minecraft.network.chat.Component placeholder
    • tooltip

  • Constructor Details

    • EnhancedTextFieldWidget

      public EnhancedTextFieldWidget(net.minecraft.client.gui.Font font, int x, int y, int width, int height, net.minecraft.network.chat.Component value)
    • EnhancedTextFieldWidget

      public EnhancedTextFieldWidget(net.minecraft.client.gui.Font font, int x, int y, int width, int height, @Nullable net.minecraft.client.gui.components.EditBox root, net.minecraft.network.chat.Component value)
  • Method Details

    • getPlaceholder

      public net.minecraft.network.chat.Component getPlaceholder()
    • setPlaceholder

      public void setPlaceholder(net.minecraft.network.chat.Component placeholder)
    • setTooltip

      public void setTooltip(InvisibleButtonWithTooltip.OnHover tooltip)
    • getValue

      public String getValue(boolean ignoreColorCodes)
    • renderWidget

      public void renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks)
      Overrides:
      renderWidget in class ColouredTextFieldWidget