Package com.badlogic.gdx.graphics.g2d
Class EmojiSupport
java.lang.Object
com.badlogic.gdx.graphics.g2d.EmojiSupport
Helper class to support emojis in libGDX.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEmojisToFont
(com.badlogic.gdx.graphics.g2d.BitmapFont bitmapFont) Add emojis to a font.filterEmojis
(String str, String baseColor) Filter a string to replace emojis with its index.void
load
(com.badlogic.gdx.files.FileHandle fileHandle) Load emojis from a file.void
load
(com.badlogic.gdx.files.FileHandle fileHandle, com.badlogic.gdx.graphics.Texture.TextureFilter textureFilter) Load emojis from a file.
-
Constructor Details
-
EmojiSupport
public EmojiSupport()
-
-
Method Details
-
load
public void load(com.badlogic.gdx.files.FileHandle fileHandle) Load emojis from a file.- Parameters:
fileHandle
- file where the emojis are located.
-
load
public void load(com.badlogic.gdx.files.FileHandle fileHandle, com.badlogic.gdx.graphics.Texture.TextureFilter textureFilter) Load emojis from a file.- Parameters:
fileHandle
- file where the emojis are located.textureFilter
- filter to apply to the emojis texture.
-
addEmojisToFont
public void addEmojisToFont(com.badlogic.gdx.graphics.g2d.BitmapFont bitmapFont) Add emojis to a font.- Parameters:
bitmapFont
- font to add emojis to.
-
filterEmojis
Filter a string to replace emojis with its index.- Parameters:
str
- string to filter.- Returns:
- filtered string.
-