public class GuiModelessWindow
extends net.risingworld.api.gui.GuiPanel
The window has no behaviour, i.e. it just displays the texts and does nothing else; in particular, the player cannot interact with it in any way.
Important: due to the way Rising World plug-ins are loaded, this class cannot instantiated or used in any way from within the onEnable() method of a plug-in, as it is impossible to be sure that, at that moment, the RWGui plug-in has already been loaded.
The first moment one can be sure that all plug-ins have been loaded, and it is safe to use this class, is when (or after) the first player connects to the server (either dedicated or local).
Constructor and Description |
---|
GuiModelessWindow(net.risingworld.api.Plugin plugin,
net.risingworld.api.objects.Player player,
java.lang.String titleText,
java.util.List<java.lang.String> texts)
Creates a mode-less window with given title and sequence of textual strings.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Closes the window and destroys allocated resources.
|
void |
setTexts(java.util.List<java.lang.String> texts)
Set new texts into the window.
|
addChild, destroy, equals, getAlpha, getBorderColor, getBorderThickness, getColor, getHeight, getHoverColor, getID, getParent, getParentID, getPivot, getPositionX, getPositionY, getWidth, hashCode, isRelativeBorderThickness, isRelativePosition, isRelativeSize, isVisible, refresh, removeChild, removeFromParent, setAlpha, setBorderColor, setBorderColor, setBorderThickness, setColor, setColor, setPivot, setPosition, setSize, setVisible
public GuiModelessWindow(net.risingworld.api.Plugin plugin, net.risingworld.api.objects.Player player, java.lang.String titleText, java.util.List<java.lang.String> texts)
plugin
- the plug-in this window will belong toplayer
- the player this windows will appear fortitleText
- the title of the windowtexts
- the textual stringspublic void setTexts(java.util.List<java.lang.String> texts)
texts
- public void free()