Skip to content
Beelzebub edited this page Oct 31, 2022 · 6 revisions

Emoji.lua - a way to add emotions in your Gmod UI (or anywhere else)

Reading the documentation here should answer most of your questions.
If you are still having questions, visit our Discord guild.


Synopsis

local lib = include("emoji.lua")

local emojis = lib.Collection()
:Add(lib.Emojis("Be1zebub/Emoji.lua", "emoji", "emoji/noto"))
:Add(lib.Emojis("Be1zebub/Emoji.lua", "elite-pepe"))
:Add(lib.Emojis("Be1zebub/Emoji.lua", "elite-gorgeous"))
:Add(lib.Emojis("Be1zebub/Emoji.lua", "elite-roflan"))

for _, part in ipairs(emojis:Parse(text)) do
	if part.IsEmoji then
		pnl:AddMaterialByURL(part:URL())
		-- pnl:AddMaterial(part:Material(nil, "smooth mips"))
	else
		pnl:AddText(part)
	end
end

To learn more

More detail example

Usage example

Clone this wiki locally