Interface IDialog


  • public interface IDialog
    • Method Detail

      • getId

        int getId()
        Returns:
        The unique ID of this dialog
      • getName

        String getName()
        Returns:
        The title/name of this dialog
      • setName

        void setName​(String var1)
        Sets the title/name of this dialog.
        Parameters:
        var1 - The new dialog title
      • getText

        String getText()
        Returns:
        The dialog body text displayed to the player
      • setText

        void setText​(String var1)
        Sets the dialog body text displayed to the player.
        Parameters:
        var1 - The new dialog text
      • getQuest

        IQuest getQuest()
        Returns:
        The quest associated with this dialog, or null if none
      • setQuest

        void setQuest​(IQuest var1)
        Sets the quest associated with this dialog.
        Parameters:
        var1 - The quest to associate, or null to remove
      • getCommand

        String getCommand()
        Returns:
        The command executed when this dialog is shown
      • setCommand

        void setCommand​(String var1)
        Sets the command executed when this dialog is shown.
        Parameters:
        var1 - The command string
      • getOption

        IDialogOption getOption​(int var1)
        Gets a dialog option by its slot index.
        Parameters:
        var1 - The option slot index
        Returns:
        The dialog option at the given slot
      • getAvailability

        IAvailability getAvailability()
        Returns:
        The availability settings for this dialog
      • getCategory

        IDialogCategory getCategory()
        Returns:
        The category this dialog belongs to
      • setDarkenScreen

        void setDarkenScreen​(boolean darkenScreen)
        Sets whether the screen darkens when this dialog is displayed.
        Parameters:
        darkenScreen - True to darken the screen
      • getDarkenScreen

        boolean getDarkenScreen()
        Returns:
        Whether the screen darkens when this dialog is displayed
      • setDisableEsc

        void setDisableEsc​(boolean disableEsc)
        Sets whether the Escape key is disabled while this dialog is open.
        Parameters:
        disableEsc - True to disable the Escape key
      • getDisableEsc

        boolean getDisableEsc()
        Returns:
        Whether the Escape key is disabled while this dialog is open
      • setShowWheel

        void setShowWheel​(boolean showWheel)
        Sets whether the dialog option wheel is shown.
        Parameters:
        showWheel - True to show the option wheel
      • getShowWheel

        boolean getShowWheel()
        Returns:
        Whether the dialog option wheel is shown
      • setHideNPC

        void setHideNPC​(boolean hideNPC)
        Sets whether the NPC is hidden during this dialog.
        Parameters:
        hideNPC - True to hide the NPC
      • getHideNPC

        boolean getHideNPC()
        Returns:
        Whether the NPC is hidden during this dialog
      • setSound

        void setSound​(String sound)
        Sets the sound played when this dialog opens.
        Parameters:
        sound - The resource location of the sound
      • getSound

        String getSound()
        Returns:
        The resource location of the sound played when this dialog opens
      • save

        void save()
        Saves this dialog to the dialog controller.
      • setColor

        void setColor​(int color)
        Sets the text color of the dialog body.
        Parameters:
        color - The color as an integer (e.g. 0xe0e0e0)
      • getColor

        int getColor()
        Returns:
        The text color of the dialog body
      • setTitleColor

        void setTitleColor​(int titleColor)
        Sets the color of the dialog title.
        Parameters:
        titleColor - The color as an integer (e.g. 0xe0e0e0)
      • getTitleColor

        int getTitleColor()
        Returns:
        The color of the dialog title
      • renderGradual

        void renderGradual​(boolean gradual)
        Sets whether the dialog text renders character by character.
        Parameters:
        gradual - True to enable gradual text rendering
      • renderGradual

        boolean renderGradual()
        Returns:
        Whether the dialog text renders character by character
      • showPreviousBlocks

        void showPreviousBlocks​(boolean show)
        Sets whether previous dialog text blocks are shown.
        Parameters:
        show - True to show previous dialog blocks
      • showPreviousBlocks

        boolean showPreviousBlocks()
        Returns:
        Whether previous dialog text blocks are shown
      • showOptionLine

        void showOptionLine​(boolean show)
        Sets whether the separator line above dialog options is shown.
        Parameters:
        show - True to show the option line
      • showOptionLine

        boolean showOptionLine()
        Returns:
        Whether the separator line above dialog options is shown
      • setTextSound

        void setTextSound​(String textSound)
        Sets the sound played per character during gradual text rendering.
        Parameters:
        textSound - The resource location of the text sound
      • getTextSound

        String getTextSound()
        Returns:
        The resource location of the sound played per character during gradual text rendering
      • setTextPitch

        void setTextPitch​(float textPitch)
        Sets the pitch of the per-character text sound.
        Parameters:
        textPitch - The pitch value (default 1.0)
      • getTextPitch

        float getTextPitch()
        Returns:
        The pitch of the per-character text sound
      • setTitlePos

        void setTitlePos​(int pos)
        Sets the position of the dialog title.
        Parameters:
        pos - The title position value
      • getTitlePos

        int getTitlePos()
        Returns:
        The position of the dialog title
      • setNPCScale

        void setNPCScale​(float scale)
        Sets the render scale of the NPC in the dialog.
        Parameters:
        scale - The NPC scale (default 1.0)
      • getNpcScale

        float getNpcScale()
        Returns:
        The render scale of the NPC in the dialog
      • setNpcOffset

        void setNpcOffset​(int offsetX,
                          int offsetY)
        Sets the NPC render offset in the dialog.
        Parameters:
        offsetX - The horizontal offset in pixels
        offsetY - The vertical offset in pixels
      • getNpcOffsetX

        int getNpcOffsetX()
        Returns:
        The horizontal offset of the NPC render in pixels
      • getNpcOffsetY

        int getNpcOffsetY()
        Returns:
        The vertical offset of the NPC render in pixels
      • textWidthHeight

        void textWidthHeight​(int textWidth,
                             int textHeight)
        Sets the width and height of the dialog text area.
        Parameters:
        textWidth - The text area width in pixels
        textHeight - The text area height in pixels
      • getTextWidth

        int getTextWidth()
        Returns:
        The width of the dialog text area in pixels
      • setTextHeight

        int setTextHeight()
        Returns:
        The height of the dialog text area in pixels
      • setTextOffset

        void setTextOffset​(int offsetX,
                           int offsetY)
        Sets the offset of the dialog text area.
        Parameters:
        offsetX - The horizontal offset in pixels
        offsetY - The vertical offset in pixels
      • getTextOffsetX

        int getTextOffsetX()
        Returns:
        The horizontal offset of the dialog text area in pixels
      • getTextOffsetY

        int getTextOffsetY()
        Returns:
        The vertical offset of the dialog text area in pixels
      • setTitleOffset

        void setTitleOffset​(int offsetX,
                            int offsetY)
        Sets the offset of the dialog title.
        Parameters:
        offsetX - The horizontal offset in pixels
        offsetY - The vertical offset in pixels
      • getTitleOffsetX

        int getTitleOffsetX()
        Returns:
        The horizontal offset of the dialog title in pixels
      • getTitleOffsetY

        int getTitleOffsetY()
        Returns:
        The vertical offset of the dialog title in pixels
      • setOptionOffset

        void setOptionOffset​(int offsetX,
                             int offsetY)
        Sets the offset of the dialog options area.
        Parameters:
        offsetX - The horizontal offset in pixels
        offsetY - The vertical offset in pixels
      • getOptionOffsetX

        int getOptionOffsetX()
        Returns:
        The horizontal offset of the dialog options area in pixels
      • getOptionOffsetY

        int getOptionOffsetY()
        Returns:
        The vertical offset of the dialog options area in pixels
      • setOptionSpacing

        void setOptionSpacing​(int spaceX,
                              int spaceY)
        Sets the spacing between dialog options.
        Parameters:
        spaceX - The horizontal spacing in pixels
        spaceY - The vertical spacing in pixels
      • getOptionSpaceX

        int getOptionSpaceX()
        Returns:
        The horizontal spacing between dialog options in pixels
      • getOptionSpaceY

        int getOptionSpaceY()
        Returns:
        The vertical spacing between dialog options in pixels
      • addImage

        void addImage​(int id,
                      IDialogImage image)
        Adds an image to the dialog at the given ID.
        Parameters:
        id - The image ID
        image - The dialog image to add
      • getImage

        IDialogImage getImage​(int id)
        Gets a dialog image by its ID.
        Parameters:
        id - The image ID
        Returns:
        The dialog image, or null if not found
      • getImages

        IDialogImage[] getImages()
        Returns:
        An array of all dialog images
      • hasImage

        boolean hasImage​(int id)
        Checks whether an image with the given ID exists.
        Parameters:
        id - The image ID
        Returns:
        True if the image exists
      • removeImage

        void removeImage​(int id)
        Removes the image with the given ID.
        Parameters:
        id - The image ID to remove
      • clearImages

        void clearImages()
        Removes all images from this dialog.