public class GuiDialogueBox extends GuiModalWindow
A GuiDialogueBox is simply a GuiModalWindow allowing more complex layout structures by nesting other GuiLayout element hierarchically. All notes about GuiModalWindow apply to GuiDialogueBox too.
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).
autoClose, callback, layout, listenerRef, plugin, prevWindow, titleBar
Constructor and Description |
---|
GuiDialogueBox(net.risingworld.api.Plugin plugin,
java.lang.String title,
int layoutType,
RWGui.RWGuiCallback callback)
Creates a new GuiDialogueBox.
|
Modifier and Type | Method and Description |
---|---|
GuiLayout |
addNewLayoutChild(int layoutType,
int layoutFlags)
Adds a new GuiLayout as a direct child of this dialogue box.
|
GuiLayout |
addNewTableLayoutChild(int colNum,
int rowNum,
int flags)
Adds a new GuiTableLayout as a direct child of this dialogue box.
|
addChild, addChild, close, free, getItemId, layout, onClick, onTextEntry, pop, poppush, push, removeChild, setCallback, setMargin, setPadding, show
destroy, equals, getAlpha, getBorderColor, getBorderThickness, getColor, getHeight, getHoverColor, getID, getParent, getParentID, getPivot, getPositionX, getPositionY, getWidth, hashCode, isRelativeBorderThickness, isRelativePosition, isRelativeSize, isVisible, refresh, removeFromParent, setAlpha, setBorderColor, setBorderColor, setBorderThickness, setColor, setColor, setPivot, setPosition, setSize, setVisible
public GuiDialogueBox(net.risingworld.api.Plugin plugin, java.lang.String title, int layoutType, RWGui.RWGuiCallback callback)
plugin
- the plug-in the DialogueBox is intended for. This
is only needed to manage the internal event listener
and has no effects on the plug-in itself.title
- the text of the title.layoutType
- the type of the layout (one of the RWGui.LAYOUT_HORIZ
or RWGui.LAYOUT_VERT values)callback
- the callback object to which to report events. Can
be null, but in this case no event will reported
until an actual callback object is set with the
setCallback() method.public GuiLayout addNewLayoutChild(int layoutType, int layoutFlags)
layoutType
- either RWGui.LAYOUT_HORIZ or RWGui.LAYOUT_VERTlayoutFlags
- one of the RWGui.LAYOUT_H_* and/or RWGui.LAYOUT_V_*
flags, according to the layout type.public GuiLayout addNewTableLayoutChild(int colNum, int rowNum, int flags)
colNum
- the number of columns the table will haverowNum
- the number of rows the table will have.flags
- currently not used, set to 0.