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.OnPressNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriorityNested classes/interfaces inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider
TextSettingsProvider.TextRenderType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RGBAprotected TextureProviderprotected static final net.minecraft.client.gui.components.Button.CreateNarrationprotected RGBAprotected static final net.minecraft.client.gui.components.Button.OnPressprotected static final RGBAprotected floatprotected RGBAprotected static final RGBAFields inherited from class net.minecraft.client.gui.components.Button
createNarration, DEFAULT_HEIGHT, DEFAULT_WIDTH, onPress, SMALL_WIDTHFields inherited from class net.minecraft.client.gui.components.AbstractButton
TEXT_MARGIN, TEXTURE_BORDER_X, TEXTURE_BORDER_Y, TEXTURE_HEIGHT, TEXTURE_WIDTH, TEXTURE_Y_OFFSETFields inherited from class net.minecraft.client.gui.components.AbstractWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionUButton(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 TypeMethodDescriptiongetCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) floatgetCurrentScale(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) net.minecraft.network.chat.ComponentgetCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) floatgetScale()voidrenderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) voidrenderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) voidrenderWidget(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) voidrenderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) voidsetButtonColor(RGBA buttonColor) voidsetCreateNarration(net.minecraft.client.gui.components.Button.CreateNarration narration) voidsetDisabledTextColor(RGBA disabledTextColor) voidsetPressable(Runnable runnable) voidsetPressable(net.minecraft.client.gui.components.Button.OnPress pressable) voidsetScale(float scale) voidsetTextColor(RGBA textColor) Methods inherited from class net.minecraft.client.gui.components.Button
builder, createNarrationMessage, onPress, updateWidgetNarrationMethods inherited from class net.minecraft.client.gui.components.AbstractButton
getTextureY, keyPressed, onClick, renderStringMethods 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, wrapDefaultNarrationMessageMethods 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, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface info.u_team.u_team_core.api.gui.PerspectiveRenderable
renderMethods 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
-
LIGHT_GRAY
-
buttonTextureProvider
-
buttonColor
-
textColor
-
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
-
setCreateNarration
public void setCreateNarration(net.minecraft.client.gui.components.Button.CreateNarration narration) -
getButtonColor
-
setButtonColor
-
getTextColor
-
setTextColor
-
getDisabledTextColor
-
setDisabledTextColor
-
getScale
public float getScale() -
setScale
public void setScale(float scale) -
renderWidget
public void renderWidget(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Overrides:
renderWidgetin classnet.minecraft.client.gui.components.AbstractButton
-
renderWidgetTexture
public void renderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
renderWidgetTexturein interfaceWidgetRenderable
-
renderBackground
public void renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
renderBackgroundin interfacePerspectiveRenderable
-
renderForeground
public void renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
renderForegroundin interfacePerspectiveRenderable
-
getCurrentBackgroundColor
public RGBA getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
getCurrentBackgroundColorin interfaceBackgroundColorProvider
-
getCurrentText
public net.minecraft.network.chat.Component getCurrentText()- Specified by:
getCurrentTextin interfaceTextProvider
-
getCurrentTextColor
public RGBA getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
getCurrentTextColorin interfaceTextSettingsProvider
-
getCurrentScale
public float getCurrentScale(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Specified by:
getCurrentScalein interfaceScaleProvider
-