PokéRogue
    Preparing search index...

    Function getTextWithColors

    • Should only be used with BBCodeText (see addBBCodeTextObject).

      This does NOT work with UI showText or showDialogue methods.

      Method will do pattern match/replace and apply BBCode color/shadow styling to substrings within the content: @[<TextStyle>]{<text to color>}

      Parameters

      • content: string

        The string with styling that needs to be applied for the BBCodeText object

      • primaryStyle: TextStyle

        The primary style to use

      • OptionalforWindow: boolean

        Whether the text is going to be displayed in a window.
        It will replace all instances of the default MONEY TextStyle by TextStyle.MONEY_WINDOW

      Returns string

      passing a content string of `"@[SUMMARY_BLUE]{blue text} primaryStyle text @[SUMMARY_RED]{red text}"` will result in:
      - "blue text" with `TextStyle.SUMMARY_BLUE` applied
      - " primaryStyle text " with `primaryStyle` `TextStyle` applied
      - "red text" with `TextStyle.SUMMARY_RED` applied