Class EmojiSupport

java.lang.Object
com.badlogic.gdx.graphics.g2d.EmojiSupport

public class EmojiSupport extends Object
Helper class to support emojis in libGDX.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public String filterEmojis(String str, String baseColor)
      Filter a string to replace emojis with its index.
      Parameters:
      str - string to filter.
      Returns:
      filtered string.