TexturePackFont

From GiderosMobile
Revision as of 15:42, 6 September 2021 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ <!-- GIDEROSOBJ:Font --> '''Supported platforms:''' File:Platform android.pngFile:Platform ios.pngFile:Platform mac.pngFile:Platform pc.pngFile:Pla...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2021.9
Inherits from: FontBase

Description

The TexturePackFont class is used to make TexturePack usable as Fonts in TextField.

Example

Use these two files to create a `Font` object

local tp = TexturePack.new({"coin.png", "diamond.png", "heart.png"})
local font = TexturePackFont.new(tp,{C="coin.png", D="diamond.png", H="heart.png"},0.5)
local tf = TextField.new(font, "CCDHHH")
stage:addChild(tf)

Methods

TexturePackFont.new creates a new TexturePackFont object

Events

Constants