Interface DMDesign


public interface DMDesign
Represents a full dialogue design. (The visual part at least)
  • Method Details

    • getName

      @NotNull @NotNull String getName()
      Gets the name of the design.
      Returns:
      The name of the design.
    • setName

      void setName(@NotNull @NotNull String name)
      Sets the name of the font configuration.
      Parameters:
      name - The name of the font configuration.
    • getFontConfig

      @Nullable @Nullable DMFontConfig getFontConfig()
      Gets the font configuration of the design.
      Returns:
      The font configuration of the design.
    • setFontConfig

      void setFontConfig(@NotNull @NotNull DMFontConfig fontConfig)
      Sets the font configuration of the design.
      Parameters:
      fontConfig - The font configuration of the design.
    • getOptionsFontConfig

      @Nullable @Nullable DMFontConfig 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

      void setOptionsFontConfig(@NotNull @NotNull DMFontConfig fontConfig)
      Sets the font config used to display dialogue options.
      Parameters:
      fontConfig - The font config used to display dialogue options.
    • getBackground

      @Nullable @Nullable DMImportedWidget 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

      void setBackground(@NotNull @NotNull DMImportedWidget background)
      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

      void setImportedWidget(int index, @NotNull @NotNull DMImportedWidget widget)
      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

      int addWidget(@NotNull @NotNull DMImportedWidget widget, int height, int xOffset, int yOffset)
      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

      @Nullable @Nullable DMImportedWidget getWidget(int index)
      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

      List<Integer> getWidgetIndexes()
      Gets the indexes of all the widgets in the design.
      Returns:
      The indexes of all the widgets in the design.