Class ImageToggleButton
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
info.u_team.u_team_core.gui.elements.ImageButton
info.u_team.u_team_core.gui.elements.ImageToggleButton
- 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
-
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 booleanprotected net.minecraft.resources.ResourceLocationprotected RGBAFields inherited from class info.u_team.u_team_core.gui.elements.ImageButton
image, imageColorFields inherited from class info.u_team.u_team_core.gui.elements.UButton
buttonColor, buttonTextureProvider, DEFAULT_NARRATION, disabledTextColor, EMTPY_PRESSABLE, LIGHT_GRAY, scale, textColor, WHITEFields 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
ConstructorsConstructorDescriptionImageToggleButton(int x, int y, int width, int height, net.minecraft.resources.ResourceLocation image, net.minecraft.resources.ResourceLocation toggleImage, boolean toggled) ImageToggleButton(int x, int y, int width, int height, net.minecraft.resources.ResourceLocation image, net.minecraft.resources.ResourceLocation toggleImage, boolean toggled, net.minecraft.client.gui.components.Button.OnPress pessable) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationgetCurrentImage(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) getCurrentImageColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) net.minecraft.resources.ResourceLocationbooleanvoidonPress()voidsetToggled(boolean toggled) voidsetToggleImage(net.minecraft.resources.ResourceLocation toggleImage) voidsetToggleImageColor(RGBA toggleImageColor) voidtoggle()Methods inherited from class info.u_team.u_team_core.gui.elements.ImageButton
getImage, getImageColor, renderForeground, setImage, setImageColorMethods inherited from class info.u_team.u_team_core.gui.elements.UButton
getButtonColor, getCurrentBackgroundColor, getCurrentScale, getCurrentText, getCurrentTextColor, getDisabledTextColor, getScale, getTextColor, renderBackground, renderWidget, renderWidgetTexture, setButtonColor, setCreateNarration, setDisabledTextColor, setPressable, setPressable, setScale, setTextColorMethods inherited from class net.minecraft.client.gui.components.Button
builder, createNarrationMessage, 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
-
toggleImage
protected net.minecraft.resources.ResourceLocation toggleImage -
toggleImageColor
-
toggled
protected boolean toggled
-
-
Constructor Details
-
ImageToggleButton
public ImageToggleButton(int x, int y, int width, int height, net.minecraft.resources.ResourceLocation image, net.minecraft.resources.ResourceLocation toggleImage, boolean toggled) -
ImageToggleButton
public ImageToggleButton(int x, int y, int width, int height, net.minecraft.resources.ResourceLocation image, net.minecraft.resources.ResourceLocation toggleImage, boolean toggled, net.minecraft.client.gui.components.Button.OnPress pessable)
-
-
Method Details
-
getToggleImage
public net.minecraft.resources.ResourceLocation getToggleImage() -
setToggleImage
public void setToggleImage(net.minecraft.resources.ResourceLocation toggleImage) -
getToggleImageColor
-
setToggleImageColor
-
isToggled
public boolean isToggled() -
setToggled
public void setToggled(boolean toggled) -
toggle
public void toggle() -
onPress
public void onPress()- Overrides:
onPressin classnet.minecraft.client.gui.components.Button
-
getCurrentImage
public net.minecraft.resources.ResourceLocation getCurrentImage(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Overrides:
getCurrentImagein classImageButton
-
getCurrentImageColor
public RGBA getCurrentImageColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick) - Overrides:
getCurrentImageColorin classImageButton
-