• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
ImGui, Lua and Font Icons

Release ImGui, Lua and Font Icons 1.0

No permission to download

Coldblooded

Zero Fuchs Given
Creator
Joined
Mar 23, 2019
RedCents
8,961¢
Pronouns
He/Him
We have both the Material Design and Font Awesome fonts included in our ImGui integration. But I wanted an easy way to display fonts for buttons and displays in my Lua scripts.

I tracked down some old C header files for Material Design and Font Awesome (much easier to work with UTF-8 than Unicode in Lua). Took those and converted them. This file, when included (and you have some kind of autocompletion in VSCode will provide an easy way to choose and use icons in your ImGui apps.

Put the file in the "lib" subdirectory in your Lua script folder and include the file
[CODE lang="Lua" title="Lua include example"]local require ICON = require('lib.icons')[/CODE]

You'll get a full list of available Icons.
1645376483672.png

I wrote a quick loop to just run thru them all and display them on the screen with the code below:
[CODE title="Icon Display Gui"]--- @type Mq
local mq = require('mq')

--- @type ImGui
require 'ImGui'

local ICON = require('lib.icons')

local openGUI = true
local shouldDrawGUI = true

local function DrawMainWindow()
if not openGUI then return end
openGUI, shouldDrawGUI = ImGui.Begin('Example Icon App', openGUI)
if shouldDrawGUI then

for key, value in pairs(ICON) do
ImGui.Text(string.format('%s : %s', value, key))
end

end
ImGui.End()
end

mq.imgui.init('Icon Example', DrawMainWindow)

while openGUI do
mq.delay(1000)
end[/CODE]

Which gives us output like this:

1645376733286.png
 

Attachments

This is awesome, thank you!

I made a small modification adding a filter to the example which is helpful for me when cross-referencing icons on FA, etc since I am not using the EmmyLua autocompletions right now. I realize this is trivial but it might be helpful to someone.

1645399936081.png
 

Attachments

They are at the top of this thread, you can download them, or you can "watch" them and when you start your RedGuides launcher, I believe they are downloaded to the lib folder automagically.
 
where can I find for download the lib.icons file please? for line local ICON = require('lib.icons')
I too was a bit confused by this. The Download link downloads a ZIP that contains a lib\icons.Lua file. This is actually the example program and should not go in your lib folder. The attachment in the OP is the file that you want in the lib folder.
 
Just found this. Nice. I actually did something similar as well. Got tired of typing the names just to see what the icon was. :) Hover the icon for the name.
Untitled.jpg
 

Attachments

They’re from fontawesome you can look them up on the website. Well, half of them are. The other half are from material design.
 
I started with my own simple table based view, then i found this.

Here is a few modifications.
locked the search bar to the top so you can scroll without it leaving your view.
right click any row and copy the name to clipboard, so you can just paste it into your script.
 

Attachments

Release ImGui, Lua and Font Icons

Users who are viewing this thread

Back
Top
Cart