TexturePackFont.new: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 3: Line 3:


=== Description ===
=== Description ===
Creates a new [[TexturePackFont]] object.
Creates a new '''TexturePackFont''' object.
<source lang="lua">
<source lang="lua">
TexturePackFont.new(texturePack,mappings,scale,anchor)
TexturePackFont.new(texturePack,mappings,scale,anchor)
Line 9: Line 9:


=== Parameters ===
=== Parameters ===
'''texturePack''': (TexturePack) The [[TexturePack]] object that will be wrapped in this font<br/>
'''texturePack''': (TexturePack) the TexturePack object that will be wrapped in this font<br/>
'''mappings''': (table) A character to filename map to assictae characters with TexturePack images<br/>
'''mappings''': (table) a character to filename map to associate characters with TexturePack images<br/>
'''scale''': (double) A scale factor to apply to the texture pack images (default = 1)<br/>
'''scale''': (double) a scale factor to apply to the texture pack images (default = 1)<br/>
'''anchor''': (double) Where the images should be laid relative to the text baseline (default = 1)<br/>
'''anchor''': (double) where the images should be laid relative to the text baseline (default = 1)<br/>


{{TexturePackFont}}
{{TexturePackFont}}

Revision as of 13:14, 8 June 2023

Available since: Gideros 2021.9
Class: TexturePackFont

Description

Creates a new TexturePackFont object.

TexturePackFont.new(texturePack,mappings,scale,anchor)

Parameters

texturePack: (TexturePack) the TexturePack object that will be wrapped in this font
mappings: (table) a character to filename map to associate characters with TexturePack images
scale: (double) a scale factor to apply to the texture pack images (default = 1)
anchor: (double) where the images should be laid relative to the text baseline (default = 1)