Class UButton

java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
info.u_team.u_team_core.gui.elements.UButton
All Implemented Interfaces:
BackgroundColorProvider, PerspectiveRenderable, Scalable, ScaleProvider, TextProvider, TextSettingsProvider, WidgetRenderable, 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:
ActivatableButton, CheckboxButton, ImageButton

public class UButton extends net.minecraft.client.gui.components.Button implements WidgetRenderable, BackgroundColorProvider, TextProvider, Scalable, ScaleProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.Button

    net.minecraft.client.gui.components.Button.Builder, net.minecraft.client.gui.components.Button.CreateNarration, net.minecraft.client.gui.components.Button.OnPress

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

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority

    Nested classes/interfaces inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider

    TextSettingsProvider.TextRenderType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected RGBA
     
    protected TextureProvider
     
    protected static final net.minecraft.client.gui.components.Button.CreateNarration
     
    protected RGBA
     
    protected static final net.minecraft.client.gui.components.Button.OnPress
     
    protected static final RGBA
     
    protected float
     
    protected RGBA
     
    protected static final RGBA
     

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

    createNarration, DEFAULT_HEIGHT, DEFAULT_WIDTH, onPress, SMALL_WIDTH

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

    TEXT_MARGIN, TEXTURE_BORDER_X, TEXTURE_BORDER_Y, TEXTURE_HEIGHT, TEXTURE_WIDTH, TEXTURE_Y_OFFSET

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

    ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, visible, WIDGETS_LOCATION, width, x, y

    Fields inherited from class net.minecraft.client.gui.GuiComponent

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text)
     
    UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, net.minecraft.client.gui.components.Button.OnPress pressable)
     
    UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, net.minecraft.client.gui.components.Button.OnPress pressable, net.minecraft.client.gui.components.Button.CreateNarration narration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    float
    getCurrentScale(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    net.minecraft.network.chat.Component
     
    getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
     
    float
     
     
    void
    renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    renderWidget(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    renderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    setButtonColor(RGBA buttonColor)
     
    void
    setCreateNarration(net.minecraft.client.gui.components.Button.CreateNarration narration)
     
    void
    setDisabledTextColor(RGBA disabledTextColor)
     
    void
     
    void
    setPressable(net.minecraft.client.gui.components.Button.OnPress pressable)
     
    void
    setScale(float scale)
     
    void
    setTextColor(RGBA textColor)
     

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

    builder, createNarrationMessage, onPress, updateWidgetNarration

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

    getTextureY, keyPressed, onClick, renderString

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

    clicked, createTooltipPositioner, defaultButtonNarrationText, getHeight, getMessage, getRectangle, getTabOrderGroup, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFocused, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    Methods inherited from class net.minecraft.client.gui.GuiComponent

    blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, vLine

    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

    charTyped, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled

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

    setPosition

    Methods inherited from interface info.u_team.u_team_core.api.gui.PerspectiveRenderable

    render

    Methods inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider

    getCurrentTextFont, getCurrentTextRenderType
  • Field Details

    • EMTPY_PRESSABLE

      protected static final net.minecraft.client.gui.components.Button.OnPress EMTPY_PRESSABLE
    • DEFAULT_NARRATION

      protected static final net.minecraft.client.gui.components.Button.CreateNarration DEFAULT_NARRATION
    • WHITE

      protected static final RGBA WHITE
    • LIGHT_GRAY

      protected static final RGBA LIGHT_GRAY
    • buttonTextureProvider

      protected TextureProvider buttonTextureProvider
    • buttonColor

      protected RGBA buttonColor
    • textColor

      protected RGBA textColor
    • disabledTextColor

      protected RGBA disabledTextColor
    • scale

      protected float scale
  • Constructor Details

    • UButton

      public UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text)
    • UButton

      public UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, net.minecraft.client.gui.components.Button.OnPress pressable)
    • UButton

      public UButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, net.minecraft.client.gui.components.Button.OnPress pressable, net.minecraft.client.gui.components.Button.CreateNarration narration)
  • Method Details

    • setPressable

      public void setPressable(net.minecraft.client.gui.components.Button.OnPress pressable)
    • setPressable

      public void setPressable(Runnable runnable)
    • setCreateNarration

      public void setCreateNarration(net.minecraft.client.gui.components.Button.CreateNarration narration)
    • getButtonColor

      public RGBA getButtonColor()
    • setButtonColor

      public void setButtonColor(RGBA buttonColor)
    • getTextColor

      public RGBA getTextColor()
    • setTextColor

      public void setTextColor(RGBA textColor)
    • getDisabledTextColor

      public RGBA getDisabledTextColor()
    • setDisabledTextColor

      public void setDisabledTextColor(RGBA disabledTextColor)
    • getScale

      public float getScale()
      Specified by:
      getScale in interface Scalable
    • setScale

      public void setScale(float scale)
      Specified by:
      setScale in interface Scalable
    • renderWidget

      public void renderWidget(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Overrides:
      renderWidget in class net.minecraft.client.gui.components.AbstractButton
    • renderWidgetTexture

      public void renderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      renderWidgetTexture in interface WidgetRenderable
    • renderBackground

      public void renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      renderBackground in interface PerspectiveRenderable
    • renderForeground

      public void renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      renderForeground in interface PerspectiveRenderable
    • getCurrentBackgroundColor

      public RGBA getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      getCurrentBackgroundColor in interface BackgroundColorProvider
    • getCurrentText

      public net.minecraft.network.chat.Component getCurrentText()
      Specified by:
      getCurrentText in interface TextProvider
    • getCurrentTextColor

      public RGBA getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      getCurrentTextColor in interface TextSettingsProvider
    • getCurrentScale

      public float getCurrentScale(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      getCurrentScale in interface ScaleProvider