mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 12:15:13 +00:00
GUI Api
This commit is contained in:
1 parent
8c2c226d34
commit
a876b4d191
9 files changed
+933
-193
No files matched your search
@@ -1,23 +1,84 @@
|
||||
package noppes.npcs.api.gui;
|
||||
|
||||
public interface ITexturedRect extends ICustomGuiComponent {
|
||||
String getTexture();
|
||||
|
||||
ITexturedRect setTexture(String texture);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
ITexturedRect setSize(int width, int height);
|
||||
|
||||
float getScale();
|
||||
|
||||
ITexturedRect setScale(float scale);
|
||||
|
||||
int getTextureX();
|
||||
|
||||
int getTextureY();
|
||||
|
||||
ITexturedRect setTextureOffset(int textureX, int textureY);
|
||||
}
|
||||
package noppes.npcs.api.gui;
|
||||
|
||||
/**
|
||||
* Represents a textured rectangle component in a custom GUI.
|
||||
* Allows configuration of texture resource, size, scale, and texture offset.
|
||||
*/
|
||||
public interface ITexturedRect extends ICustomGuiComponent {
|
||||
|
||||
/**
|
||||
* Returns the texture resource location.
|
||||
*
|
||||
* @return the texture as a string.
|
||||
*/
|
||||
String getTexture();
|
||||
|
||||
/**
|
||||
* Sets the texture resource location.
|
||||
*
|
||||
* @param texture the texture resource location.
|
||||
* @return this textured rectangle instance.
|
||||
*/
|
||||
ITexturedRect setTexture(String texture);
|
||||
|
||||
/**
|
||||
* Returns the width of the rectangle.
|
||||
*
|
||||
* @return the width in pixels.
|
||||
*/
|
||||
int getWidth();
|
||||
|
||||
/**
|
||||
* Returns the height of the rectangle.
|
||||
*
|
||||
* @return the height in pixels.
|
||||
*/
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* Sets the size of the rectangle.
|
||||
*
|
||||
* @param width the new width.
|
||||
* @param height the new height.
|
||||
* @return this textured rectangle instance.
|
||||
*/
|
||||
ITexturedRect setSize(int width, int height);
|
||||
|
||||
/**
|
||||
* Returns the scale factor of the rectangle.
|
||||
*
|
||||
* @return the scale.
|
||||
*/
|
||||
float getScale();
|
||||
|
||||
/**
|
||||
* Sets the scale factor of the rectangle.
|
||||
*
|
||||
* @param scale the new scale.
|
||||
* @return this textured rectangle instance.
|
||||
*/
|
||||
ITexturedRect setScale(float scale);
|
||||
|
||||
/**
|
||||
* Returns the texture's x offset.
|
||||
*
|
||||
* @return the x offset.
|
||||
*/
|
||||
int getTextureX();
|
||||
|
||||
/**
|
||||
* Returns the texture's y offset.
|
||||
*
|
||||
* @return the y offset.
|
||||
*/
|
||||
int getTextureY();
|
||||
|
||||
/**
|
||||
* Sets the texture offset.
|
||||
*
|
||||
* @param textureX the new x offset.
|
||||
* @param textureY the new y offset.
|
||||
* @return this textured rectangle instance.
|
||||
*/
|
||||
ITexturedRect setTextureOffset(int textureX, int textureY);
|
||||
}
|
||||
Reference in new issue
Block a user