LibEmote is a library for emotes and textures, for example for Chat-Emote-Addons like pChat Emoji Extension or EmoteKEKW to make them compatible with each other.
How to use:
Emote Object:
Code:
--{
-- textures: string array,
-- scale: number,
-- emoteIndex: string of numbers,
-- name: string
--}
Get missing file texture:
Code:
LibEmote.GetMissing()
--Returns:
--texture: string
Get an empty emote object:
Code:
LibEmote.empty()
--Returns:
--emote object
Start emote selection window:
Code:
LibEmote.StartEmoteSelection(callback, packfilter, textsearch, endUiModeAfterSelect)
-- callback: function(texturePath (string))
-- packfilter: string (nilable) filter selection by an emote pack (from LibEmote.GetLoadedEmotePackNames())
-- textsearch: string (nilable) already put text in the search bar to filter the selection
-- endUiModeAfterSelect: boolean (nilable) end cursor ui mode after selection
Get texture of emote (e.g. for preview):
Code:
LibEmote.GetTextureByName(name, textureIndex)
-- name: string
-- textureIndex: (nilable) number
--Returns:
--texture path: string
Search for emotes by name:
Code:
LibEmote.SearchEmotesByName(name)
-- name: string
--Returns:
--emote objects: table
Get emote by exact name:
Code:
LibEmote.GetEmoteByName(name)
-- name: string
--Returns:
--emote object
Get all emote pack names:
Code:
LibEmote.GetLoadedEmotePackNames()
--Returns:
--table of strings
-- ! there can be icons without a pack name !
Get all emotes:
Code:
LibEmote.GetAllEmotes()
--Returns:
--emote objects: table
Get emote by index:
Code:
LibEmote.GetEmoteByIndex(index)
-- index: string
--Returns:
--emote object
Get emote index by name:
Code:
LibEmote.GetEmoteIndex(name)
-- name: string
--Returns:
--index: string
Add emotes:
Code:
LibEmote.InsertEmotes(emoteList, emotepackname)
--emoteList: table
--emotepackname: string (nilable)
--emote object:
--{
-- textures: table of strings,
-- scale: (nilable) number, -> will be set to 1 if nil
-- emoteIndex: string (needs to be unique!)
-- name: string
--}