• Preparing search index...
  • The search index is not available
Source Academy Modules
  • Source Academy Modules
  • game
  • create_text_config

Function create_text_config

  • create_text_config(font_family?, font_size?, color?, stroke?, stroke_thickness?, align?): ObjectConfig
  • 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

    • Defined in bundles/game/functions.ts:213

Settings

Member Visibility

Theme

Source Academy Modules
  • Loading...

Generated using TypeDoc