Class GuiTexture
java.lang.Object
codechicken.lib.gui.modular.lib.geometry.ConstrainedGeometry<GuiTexture>
codechicken.lib.gui.modular.elements.GuiElement<GuiTexture>
codechicken.lib.gui.modular.elements.GuiTexture
- All Implemented Interfaces:
BackgroundRender,ElementEvents,GuiParent<GuiTexture>,TooltipHandler<GuiTexture>
Created by brandon3055 on 28/08/2023
-
Field Summary
Fields inherited from class codechicken.lib.gui.modular.elements.GuiElement
hoverTime, initialized -
Constructor Summary
ConstructorsConstructorDescriptionGuiTexture(GuiParent<?> parent) GuiTexture(GuiParent<?> parent, SpriteSupplier spriteSupplier) -
Method Summary
Modifier and TypeMethodDescriptionEnables dynamic texture resizing though the use of cutting and tiling.dynamicTexture(int textureBorders) Enables dynamic texture resizing though the use of cutting and tiling.dynamicTexture(@Nullable Borders textureBorders) Enables dynamic texture resizing though the use of cutting and tiling.voidrenderBehind(net.minecraft.client.gui.GuiGraphics graphics, double mouseX, double mouseY, float partialTicks) Used to render content behind this elements child elements.setColour(int colourARGB) Allows you to set an argb colour.Allows you to set an argb colour provider.setMaterial(SpriteSupplier spriteSupplier) setRotation(int rotation) Sets the texture rotation, each integer increment will rotate the texture by 90 degrees.setRotation(Supplier<Integer> rotation) Sets the texture rotation, each integer increment will rotate the texture by 90 degrees.Methods inherited from class codechicken.lib.gui.modular.elements.GuiElement
addChild, addJeiDropTargets, addJeiExclusions, adoptChild, applyQueuedChildUpdates, blockMouseEvents, blockMouseOver, bringChildToForeground, font, getChildren, getJeiDropConsumer, getModularGui, getParent, getTooltip, getTooltipDelay, hoverTime, initElement, isDescendantOf, isEnabled, isJeiDropTarget, isJeiExcluded, isMouseOver, isOpaque, isRemoved, isTooltipEnabled, jeiExclude, mc, onScreenInit, removeChild, render, renderChild, renderOverlay, scaledScreenHeight, scaledScreenWidth, sendChildToBackground, sendChildToIndex, setEnabled, setEnabled, setEnableToolTip, setJeiDropTarget, setJeiExcluded, setOpaque, setRenderCull, setTooltip, setTooltipDelay, showToolTip, tick, toString, updateMouseOver, updateScreenDataMethods inherited from class codechicken.lib.gui.modular.lib.geometry.ConstrainedGeometry
addBoundsToRect, clearConstraints, clearGeometryCache, constrain, get, getChildBounds, getEnclosingRect, getParent, getPosition, getRectangle, placeInside, placeInside, placeOutside, placeOutside, setHeight, setPos, setSize, setWidth, setXPos, setYPos, strictMode, validate, xCenter, xMax, xMin, xSize, yCenter, yMax, yMin, ySizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface codechicken.lib.gui.modular.lib.ElementEvents
charTyped, charTyped, keyPressed, keyPressed, keyReleased, keyReleased, mouseClicked, mouseClicked, mouseMoved, mouseReleased, mouseReleased, mouseScrolled, mouseScrolledMethods inherited from interface codechicken.lib.gui.modular.lib.geometry.GuiParent
addChild, getValueMethods inherited from interface codechicken.lib.gui.modular.lib.TooltipHandler
renderTooltip, setTooltip, setTooltip, setTooltip, setTooltipSingle, setTooltipSingle
-
Constructor Details
-
GuiTexture
-
GuiTexture
-
-
Method Details
-
setMaterial
-
getSprite
-
dynamicTexture
Enables dynamic texture resizing though the use of cutting and tiling. Only works with textures that can be cut up and tiled without issues, e.g. background textures or button textures. This method uses the standard border with of 5 pixels on all sides. -
dynamicTexture
Enables dynamic texture resizing though the use of cutting and tiling. Only works with textures that can be cut up and tiled without issues, e.g. background textures or button textures. The border parameters indicate the width of border around the texture that must be maintained during the cutting and tiling process. For standardisation purposes the border width should be >= 5 -
dynamicTexture
Enables dynamic texture resizing though the use of cutting and tiling. Only works with textures that can be cut up and tiled without issues, e.g. background textures or button textures. The border parameters indicate the width of border around the texture that must be maintained during the cutting and tiling process. For standardisation purposes the border width should be >= 5 -
setColour
Allows you to set an argb colour. This colour will be applied when rendering the texture. -
setColour
Allows you to set an argb colour provider. This colour will be applied when rendering the texture. -
setRotation
Sets the texture rotation, each integer increment will rotate the texture by 90 degrees. (Not compatible with dynamic textures) -
setRotation
Sets the texture rotation, each integer increment will rotate the texture by 90 degrees. (Not compatible with dynamic textures) -
renderBehind
public void renderBehind(net.minecraft.client.gui.GuiGraphics graphics, double mouseX, double mouseY, float partialTicks) Description copied from interface:BackgroundRenderUsed to render content behind this elements child elements. When rendering element content, always use thePoseStackavailable via the providedWhere applicable, always use push/pop to ensure the stack is returned to its original state after your rendering is complete.invalid reference
GuiRender- Specified by:
renderBehindin interfaceBackgroundRender- Parameters:
graphics- Contains gui context information as well as essential render methods/utils including the PoseStack.
-