Interface DMDesign
public interface DMDesign
Represents a full dialogue design. (The visual part at least)
-
Method Summary
Modifier and TypeMethodDescriptionint
addWidget
(@NotNull DMImportedWidget widget, int height, int xOffset, int yOffset) Adds a widget with the lowest unused index, so it will be displayed on top.@Nullable DMImportedWidget
Gets the background of the design.int
Gets the height of the background.int
Gets the x offset of the background.int
Gets the y offset of the background.@Nullable DMFontConfig
Gets the font configuration of the design.@NotNull String
getName()
Gets the name of the design.@Nullable DMFontConfig
The font config used to display dialogue options.@Nullable DMImportedWidget
getWidget
(int index) Gets a widget with a specific index.int
getWidgetHeight
(int index) Gets the height of a widget.Gets the indexes of all the widgets in the design.int
getWidgetXOffset
(int index) Gets the x offset of a widget.int
getWidgetYOffset
(int index) Gets the y offset of a widget.int
Gets the x offset of the whole design.void
insertWidget
(int index, @NotNull DMImportedWidget widget, int height, int xOffset, int yOffset) Inserts a widget at a specific index, adding one value to the ones after it.void
moveWidget
(int from, int to) Move a widget from one index to another.void
removeWidget
(int index, boolean reduce) Removes a widget with a specific index.void
setBackground
(@NotNull DMImportedWidget background) Sets the background of the design.void
setBackgroundHeight
(int height) Sets the height of the background, this determines the total size of it.void
setBackgroundXOffset
(int x) Sets the x offset of the background.void
setBackgroundYOffset
(int y) Sets the y offset of the background.void
setFontConfig
(@NotNull DMFontConfig fontConfig) Sets the font configuration of the design.void
setImportedWidget
(int index, @NotNull DMImportedWidget widget) Sets an imported widget with a specific index.void
Sets the name of the font configuration.void
setOptionsFontConfig
(@NotNull DMFontConfig fontConfig) Sets the font config used to display dialogue options.void
setWidget
(int index, @NotNull DMImportedWidget widget, int height, int xOffset, int yOffset) Sets a widget with a specific index.void
setWidgetHeight
(int index, int height) Sets the height of a widget.void
setWidgetXOffset
(int index, int xOffset) Sets the x offset of a widget.void
setWidgetYOffset
(int index, int yOffset) Sets the y offset of a widget.void
setXOffset
(int x) Sets the x offset of the whole design.
-
Method Details
-
getName
Gets the name of the design.- Returns:
- The name of the design.
-
setName
Sets the name of the font configuration.- Parameters:
name
- The name of the font configuration.
-
getFontConfig
Gets the font configuration of the design.- Returns:
- The font configuration of the design.
-
setFontConfig
Sets the font configuration of the design.- Parameters:
fontConfig
- The font configuration of the design.
-
getOptionsFontConfig
The font config used to display dialogue options. You may want to display it somewhere else, that is why this feature exists.- Returns:
- The font config used to display dialogue options.
-
setOptionsFontConfig
Sets the font config used to display dialogue options.- Parameters:
fontConfig
- The font config used to display dialogue options.
-
getBackground
Gets the background of the design. This is a widget that will be used as the background.- Returns:
- The background of the design.
-
setBackground
Sets the background of the design.- Parameters:
background
- The widget to use as background.
-
setBackgroundHeight
void setBackgroundHeight(int height) Sets the height of the background, this determines the total size of it.- Parameters:
height
- The height of the background
-
getBackgroundHeight
int getBackgroundHeight()Gets the height of the background.- Returns:
- The height of the background.
-
setBackgroundXOffset
void setBackgroundXOffset(int x) Sets the x offset of the background.- Parameters:
x
- The x offset
-
getBackgroundXOffset
int getBackgroundXOffset()Gets the x offset of the background.- Returns:
- The x offset
-
setBackgroundYOffset
void setBackgroundYOffset(int y) Sets the y offset of the background.- Parameters:
y
- The y offset
-
getBackgroundYOffset
int getBackgroundYOffset()Gets the y offset of the background.- Returns:
- The y offset
-
setXOffset
void setXOffset(int x) Sets the x offset of the whole design.- Parameters:
x
- The x offset
-
getXOffset
int getXOffset()Gets the x offset of the whole design.- Returns:
- The x offset
-
setWidget
void setWidget(int index, @NotNull @NotNull DMImportedWidget widget, int height, int xOffset, int yOffset) Sets a widget with a specific index. The index is the order of the widget in the design, so if one widget has a higher index than another one, it will get displayed on top.- Parameters:
index
- The index of the widget.widget
- The widget to set.height
- The height of the widget.xOffset
- The x offset of the widget.yOffset
- The y offset of the widget.
-
setImportedWidget
Sets an imported widget with a specific index.- Parameters:
index
- The index of the widget.widget
- The widget to set.
-
setWidgetXOffset
void setWidgetXOffset(int index, int xOffset) Sets the x offset of a widget.- Parameters:
index
- The index of the widget.xOffset
- The x offset of the widget.
-
setWidgetYOffset
void setWidgetYOffset(int index, int yOffset) Sets the y offset of a widget.- Parameters:
index
- The index of the widget.yOffset
- The y offset of the widget.
-
setWidgetHeight
void setWidgetHeight(int index, int height) Sets the height of a widget.- Parameters:
index
- The index of the widget.height
- The height of the widget.
-
addWidget
Adds a widget with the lowest unused index, so it will be displayed on top.- Parameters:
widget
- The widget to add.height
- The height of the widget.xOffset
- The x offset of the widget.yOffset
- The y offset of the widget.- Returns:
- The index given to the added widget.
-
insertWidget
void insertWidget(int index, @NotNull @NotNull DMImportedWidget widget, int height, int xOffset, int yOffset) Inserts a widget at a specific index, adding one value to the ones after it.- Parameters:
index
- The index of the widget.widget
- The widget to insert.height
- The height of the widget.xOffset
- The x offset of the widget.yOffset
- The y offset of the widget.
-
moveWidget
void moveWidget(int from, int to) Move a widget from one index to another.- Parameters:
from
- The index of the widget to move.to
- The index to move the widget to.
-
removeWidget
void removeWidget(int index, boolean reduce) Removes a widget with a specific index.- Parameters:
index
- The index of the widget.reduce
- If true, the indexes of the widgets after this will be reduced by one.
-
getWidget
Gets a widget with a specific index.- Parameters:
index
- The index of the widget.- Returns:
- The widget with the given index.
-
getWidgetHeight
int getWidgetHeight(int index) Gets the height of a widget.- Parameters:
index
- The index of the widget.- Returns:
- The height of the widget.
-
getWidgetXOffset
int getWidgetXOffset(int index) Gets the x offset of a widget.- Parameters:
index
- The index of the widget.- Returns:
- The x offset of the widget.
-
getWidgetYOffset
int getWidgetYOffset(int index) Gets the y offset of a widget.- Parameters:
index
- The index of the widget.- Returns:
- The y offset of the widget.
-
getWidgetIndexes
Gets the indexes of all the widgets in the design.- Returns:
- The indexes of all the widgets in the design.
-