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 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.