Source Academy Modules
    Preparing search index...

    Function create_text_config

    • Create text config object, can be used to stylise text object.

      font_family: for available font_family, see: https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names

      align: must be either 'left', 'right', 'center', or 'justify'

      For more details about text config, see: https://photonstorm.github.io/phaser3-docs/Phaser.Types.GameObjects.Text.html#.TextStyle

      Parameters

      • font_family: string = 'Courier'

        font to be used

      • font_size: string = '16px'

        size of font, must be appended with 'px' e.g. '16px'

      • color: string = '#fff'

        colour of font, in hex e.g. '#fff'

      • stroke: string = '#fff'

        colour of stroke, in hex e.g. '#fff'

      • stroke_thickness: number = 0

        thickness of stroke

      • align: string = 'left'

        text alignment

      Returns ObjectConfig

      text config