Class GuiTexture
java.lang.Object
codechicken.lib.gui.modular.lib.geometry.ConstrainedGeometry<T>
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(@NotNull GuiParent<?> parent) GuiTexture(@NotNull GuiParent<?> parent, Material material) GuiTexture(@NotNull GuiParent<?> parent, Supplier<Material> supplier) -
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(Borders textureBorders) Enables dynamic texture resizing though the use of cutting and tiling.@Nullable MaterialvoidrenderBackground(GuiRender render, 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(Material material) setMaterial(Supplier<Material> supplier) 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, getCombinedElementDepth, 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, setZStacking, showToolTip, tick, toString, updateMouseOver, updateScreenData, zStackingMethods 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.BackgroundRender
getBackgroundDepthMethods 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
- Parameters:
parent- parentGuiParent.
-
GuiTexture
-
GuiTexture
-
-
Method Details
-
setMaterial
-
setMaterial
-
getMaterial
-
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) -
renderBackground
Description copied from interface:BackgroundRenderUsed to render content behind this elements child elements. When rendering element content, always use thePoseStackavailable via the providedGuiRenderWhere applicable, always use push/pop to ensure the stack is returned to its original state after your rendering is complete.- Specified by:
renderBackgroundin interfaceBackgroundRender- Parameters:
render- Contains gui context information as well as essential render methods/utils including the PoseStack.
-