mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-18 01:05:15 +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,21 +1,76 @@
|
||||
package noppes.npcs.api.gui;
|
||||
|
||||
public interface IScroll extends ICustomGuiComponent {
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
IScroll setSize(int width, int height);
|
||||
|
||||
String[] getList();
|
||||
|
||||
IScroll setList(String[] textList);
|
||||
|
||||
int getDefaultSelection();
|
||||
|
||||
IScroll setDefaultSelection(int defaultSelection);
|
||||
|
||||
boolean isMultiSelect();
|
||||
|
||||
IScroll setMultiSelect(boolean selectMultiple);
|
||||
}
|
||||
package noppes.npcs.api.gui;
|
||||
|
||||
/**
|
||||
* Represents a scrollable list component in a custom GUI.
|
||||
* Provides methods to control size, selection, and the displayed list.
|
||||
*/
|
||||
public interface IScroll extends ICustomGuiComponent {
|
||||
|
||||
/**
|
||||
* Returns the width of the scroll component.
|
||||
*
|
||||
* @return the width in pixels.
|
||||
*/
|
||||
int getWidth();
|
||||
|
||||
/**
|
||||
* Returns the height of the scroll component.
|
||||
*
|
||||
* @return the height in pixels.
|
||||
*/
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* Sets the size of the scroll component.
|
||||
*
|
||||
* @param width the new width.
|
||||
* @param height the new height.
|
||||
* @return this scroll instance.
|
||||
*/
|
||||
IScroll setSize(int width, int height);
|
||||
|
||||
/**
|
||||
* Returns the list of text entries displayed in the scroll.
|
||||
*
|
||||
* @return an array of strings.
|
||||
*/
|
||||
String[] getList();
|
||||
|
||||
/**
|
||||
* Sets the list of text entries to display.
|
||||
*
|
||||
* @param textList an array of strings.
|
||||
* @return this scroll instance.
|
||||
*/
|
||||
IScroll setList(String[] textList);
|
||||
|
||||
/**
|
||||
* Returns the default selection index.
|
||||
*
|
||||
* @return the default selection.
|
||||
*/
|
||||
int getDefaultSelection();
|
||||
|
||||
/**
|
||||
* Sets the default selection index.
|
||||
*
|
||||
* @param defaultSelection the selection index.
|
||||
* @return this scroll instance.
|
||||
*/
|
||||
IScroll setDefaultSelection(int defaultSelection);
|
||||
|
||||
/**
|
||||
* Checks whether multiple selections are allowed.
|
||||
*
|
||||
* @return true if multi-select is enabled.
|
||||
*/
|
||||
boolean isMultiSelect();
|
||||
|
||||
/**
|
||||
* Sets whether multiple selections are allowed.
|
||||
*
|
||||
* @param selectMultiple true to allow multi-select.
|
||||
* @return this scroll instance.
|
||||
*/
|
||||
IScroll setMultiSelect(boolean selectMultiple);
|
||||
}
|
||||
Reference in new issue
Block a user