Klasse DialogueStyle

java.lang.Object
de.luckymcdev.foundryengine.common.dialogue.DialogueStyle

public class DialogueStyle extends Object
Style configuration for dialogue rendering.

Values are stored as named entries in a stack of DialogueStyle.StyleLayers. Getters resolve a key by walking the stack from the top down, falling back to DEFAULTS when no layer overrides it. This allows temporary overrides via push() / pop() while the tree-level base style stays intact.

  • Felddetails

  • Konstruktordetails

    • DialogueStyle

      public DialogueStyle()
  • Methodendetails

    • fromNbt

      public static DialogueStyle fromNbt(net.minecraft.nbt.CompoundTag tag)
    • push

      public void push()
      Pushes a new empty layer on top. Subsequent set(String, Object) calls write into this layer; pop() removes it again.
    • pop

      public @Nullable DialogueStyle.StyleLayer pop()
      Pops the top override layer. At least one layer is always kept.
      Gibt zurück:
      the removed layer, or null if none could be removed
    • reset

      public void reset()
      Discards all overrides, leaving a single base layer seeded from DEFAULTS.
    • peek

      public DialogueStyle.StyleLayer peek()
      The current top layer, used for writing.
    • get

      public Object get(String key)
      Resolves a value by walking the layers, falling back to DEFAULTS.
    • set

      public void set(String key, Object value)
      Writes a value into the current top layer.
    • unset

      public void unset(String key)
      Removes a value from the current top layer.
    • getDialogueBackground

      public Color getDialogueBackground()
    • setDialogueBackground

      public void setDialogueBackground(Color v)
    • getDialogueBorder

      public Color getDialogueBorder()
    • setDialogueBorder

      public void setDialogueBorder(Color v)
    • getDialogueBorderWidth

      public int getDialogueBorderWidth()
    • setDialogueBorderWidth

      public void setDialogueBorderWidth(int v)
    • getOptionsBackground

      public Color getOptionsBackground()
    • setOptionsBackground

      public void setOptionsBackground(Color v)
    • getOptionsBorder

      public Color getOptionsBorder()
    • setOptionsBorder

      public void setOptionsBorder(Color v)
    • getOptionsBorderWidth

      public int getOptionsBorderWidth()
    • setOptionsBorderWidth

      public void setOptionsBorderWidth(int v)
    • getButtonBackground

      public Color getButtonBackground()
    • setButtonBackground

      public void setButtonBackground(Color v)
    • getButtonHover

      public Color getButtonHover()
    • setButtonHover

      public void setButtonHover(Color v)
    • getButtonBorder

      public Color getButtonBorder()
    • setButtonBorder

      public void setButtonBorder(Color v)
    • getNavButtonBackground

      public Color getNavButtonBackground()
    • setNavButtonBackground

      public void setNavButtonBackground(Color v)
    • getNavButtonHover

      public Color getNavButtonHover()
    • setNavButtonHover

      public void setNavButtonHover(Color v)
    • getNavButtonBorder

      public Color getNavButtonBorder()
    • setNavButtonBorder

      public void setNavButtonBorder(Color v)
    • getOverlayColor

      public Color getOverlayColor()
    • setOverlayColor

      public void setOverlayColor(Color v)
    • getSpeakerFontSize

      public int getSpeakerFontSize()
    • setSpeakerFontSize

      public void setSpeakerFontSize(int v)
    • getDialogueFontSize

      public int getDialogueFontSize()
    • setDialogueFontSize

      public void setDialogueFontSize(int v)
    • getOptionFontSize

      public int getOptionFontSize()
    • setOptionFontSize

      public void setOptionFontSize(int v)
    • getMargin

      public int getMargin()
    • setMargin

      public void setMargin(int v)
    • getPanelHeight

      public int getPanelHeight()
    • setPanelHeight

      public void setPanelHeight(int v)
    • getButtonHeight

      public int getButtonHeight()
    • setButtonHeight

      public void setButtonHeight(int v)
    • getOptionGap

      public int getOptionGap()
    • setOptionGap

      public void setOptionGap(int v)
    • isTypewriterSoundEnabled

      public boolean isTypewriterSoundEnabled()
    • setTypewriterSoundEnabled

      public void setTypewriterSoundEnabled(boolean v)
    • getTypewriterCharsPerSecond

      public int getTypewriterCharsPerSecond()
    • setTypewriterCharsPerSecond

      public void setTypewriterCharsPerSecond(int v)
    • toNbt

      public net.minecraft.nbt.CompoundTag toNbt()