Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/its all about fonts the return #840

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[submodule "vendor/RED4ext.SDK"]
path = vendor/RED4ext.SDK
url = https://github.com/WopsS/RED4ext.SDK
url = https://github.com/WopsS/RED4ext.SDK.git
[submodule "vendor/imgui"]
path = vendor/imgui
url = ../../WSSDude/imgui.git
[submodule "vendor/luasocket"]
path = vendor/luasocket
url = https://github.com/diegonehab/luasocket.git
[submodule "vendor/imgui"]
path = vendor/imgui
url = https://github.com/Nats-ji/imgui.git
branch = docking-1.89.6-texture_update
16 changes: 14 additions & 2 deletions scripts/IconGlyphs/icons.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
-- Generated by https://github.com/Nats-ji/IconFontCppHeadersAndLuaTables for LuaJLT and Lua 5.3+
-- from https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/master/meta.json
-- for use with https://github.com/Templarian/MaterialDesign-Webfont/blob/master/fonts/materialdesignicons-webfont.ttf
local IconGlyphs = {
local IconGlyphs = {}

IconGlyphs.icons = {
AbTesting = "\u{f01c9}", -- U+F01C9 ab-testing, tags: Developer / Languages
Abacus = "\u{f16e0}", -- U+F16E0 abacus, tags: Math
AbjadArabic = "\u{f1328}", -- U+F1328 abjad-arabic, aliases: writing-system-arabic, tags: Alpha / Numeric
Expand Down Expand Up @@ -7099,4 +7101,14 @@ local IconGlyphs = {
ZodiacTaurus = "\u{f0a87}", -- U+F0A87 zodiac-taurus, aliases: horoscope-taurus
ZodiacVirgo = "\u{f0a88}", -- U+F0A88 zodiac-virgo, aliases: horoscope-virgo
}
return IconGlyphs

IconGlyphs.metatable = {
__index = function(table, key)
AddTextGlyphs(IconGlyphs.icons[key])
return IconGlyphs.icons[key]
end
}

setmetatable(IconGlyphs, IconGlyphs.metatable)

return IconGlyphs
10 changes: 8 additions & 2 deletions src/CET.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ LuaVM& CET::GetVM() noexcept
return m_vm;
}

Fonts& CET::GetFonts() noexcept
{
return m_fonts;
}

bool CET::IsRunning() noexcept
{
return s_isRunning;
Expand All @@ -70,8 +75,9 @@ CET::CET()
, m_persistentState(m_paths, m_options)
, m_bindings(m_paths, m_options)
, m_window(&m_bindings, &m_d3d12)
, m_d3d12(m_window, m_paths, m_options)
, m_vm(m_paths, m_bindings, m_d3d12)
, m_fonts(m_options, m_paths)
, m_d3d12(m_window, m_paths, m_options, m_fonts)
, m_vm(m_paths, m_bindings, m_d3d12, m_fonts)
, m_overlay(m_bindings, m_options, m_persistentState, m_vm)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/CET.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "d3d12/D3D12.h"
#include "overlay/Overlay.h"
#include "scripting/LuaVM.h"
#include "Fonts.h"

struct CET
{
Expand All @@ -23,6 +24,7 @@ struct CET
VKBindings& GetBindings() noexcept;
Overlay& GetOverlay() noexcept;
LuaVM& GetVM() noexcept;
Fonts& GetFonts() noexcept;

static bool IsRunning() noexcept;

Expand All @@ -34,6 +36,7 @@ struct CET
PersistentState m_persistentState;
VKBindings m_bindings;
Window m_window;
Fonts m_fonts;
D3D12 m_d3d12;
LuaVM m_vm;
Overlay m_overlay;
Expand Down
Loading
Loading