Package noppes.npcs.api.gui
Interface ITexturedRect
-
- All Superinterfaces:
ICustomGuiComponent
public interface ITexturedRect extends ICustomGuiComponent
Represents a textured rectangle component in a custom GUI. Allows configuration of texture resource, size, scale, and texture offset.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getHeight()
Returns the height of the rectangle.float
getScale()
Returns the scale factor of the rectangle.java.lang.String
getTexture()
Returns the texture resource location.int
getTextureX()
Returns the texture's x offset.int
getTextureY()
Returns the texture's y offset.int
getWidth()
Returns the width of the rectangle.ITexturedRect
setScale(float scale)
Sets the scale factor of the rectangle.ITexturedRect
setSize(int width, int height)
Sets the size of the rectangle.ITexturedRect
setTexture(java.lang.String texture)
Sets the texture resource location.ITexturedRect
setTextureOffset(int textureX, int textureY)
Sets the texture offset.-
Methods inherited from interface noppes.npcs.api.gui.ICustomGuiComponent
fromNBT, getAlpha, getColor, getHoverText, getID, getPosX, getPosY, getRotation, hasHoverText, setAlpha, setColor, setHoverText, setHoverText, setID, setPos, setRotation, toNBT
-
-
-
-
Method Detail
-
getTexture
java.lang.String getTexture()
Returns the texture resource location.- Returns:
- the texture as a string.
-
setTexture
ITexturedRect setTexture(java.lang.String texture)
Sets the texture resource location.- Parameters:
texture
- the texture resource location.- Returns:
- this textured rectangle instance.
-
getWidth
int getWidth()
Returns the width of the rectangle.- Returns:
- the width in pixels.
-
getHeight
int getHeight()
Returns the height of the rectangle.- Returns:
- the height in pixels.
-
setSize
ITexturedRect setSize(int width, int height)
Sets the size of the rectangle.- Parameters:
width
- the new width.height
- the new height.- Returns:
- this textured rectangle instance.
-
getScale
float getScale()
Returns the scale factor of the rectangle.- Returns:
- the scale.
-
setScale
ITexturedRect setScale(float scale)
Sets the scale factor of the rectangle.- Parameters:
scale
- the new scale.- Returns:
- this textured rectangle instance.
-
getTextureX
int getTextureX()
Returns the texture's x offset.- Returns:
- the x offset.
-
getTextureY
int getTextureY()
Returns the texture's y offset.- Returns:
- the y offset.
-
setTextureOffset
ITexturedRect setTextureOffset(int textureX, int textureY)
Sets the texture offset.- Parameters:
textureX
- the new x offset.textureY
- the new y offset.- Returns:
- this textured rectangle instance.
-
-