- 226
- 35
- Версия MoonLoader
- .027.0-preview
Из-за чего такое может быть?
Предполагаю это из-за этого:
Lua:
imgui.OnInitialize(function()
sW, sH = getScreenResolution()
u32 = imgui.ColorConvertFloat4ToU32
imgui.GetIO().IniFilename = nil
local config = imgui.ImFontConfig()
config.MergeMode = true
config.PixelSnapH = true
iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85('solid'), 14, config, iconRanges)
local FONTS = imgui.GetIO().Fonts
local STYLE = imgui.GetStyle()
local COLOR = STYLE.Colors
local VEC4, c = imgui.ImVec4, imgui.Col
font = { B = {}, R = {} }
if doesFileExist(getWorkingDirectory()..'\\AdminTools\\avatar.jpg') then -- находим необходимую картинку с названием example.png в папке moonloader/resource/
Image = imgui.CreateTextureFromFile(getWorkingDirectory() .. '\\AdminTools\\avatar.jpg') -- если найдена, то записываем в переменную хендл картинки
end
if doesFileExist(getWorkingDirectory()..'\\AdminTools\\avatar.jpg') then -- находим необходимую картинку с названием example.png в папке moonloader/resource/
Share = imgui.CreateTextureFromFile(getWorkingDirectory() .. '\\AdminTools\\resource\\share.png') -- если найдена, то записываем в переменную хендл картинки
end
local builder = imgui.ImFontGlyphRangesBuilder()
builder:AddRanges(FONTS:GetGlyphRangesCyrillic())
builder:AddText("‚„…†‡€‰‹‘’“”•–-™›№")
local range = imgui.ImVector_ImWchar()
builder:BuildRanges(range)
config.MergeMode = true
config.PixelSnapH = true
iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85('solid'), 14, config, iconRanges)
font['R'][15] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_R, 15, nil, range[0].Data)
font['B'][15] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_B, 15, nil, range[0].Data)
font['R'][20] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_R, 20, nil, range[0].Data)
font['B'][20] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_B, 20, nil, range[0].Data)
font['R'][70] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_R, 70, nil, range[0].Data)
font['B'][70] = FONTS:AddFontFromMemoryCompressedBase85TTF(base85.SF_B, 70, nil, range[0].Data)
img = imgui.CreateTextureFromFileInMemory(imgui.new('const char*', base85.img), #base85.img)
-- STYLE
if target ~= -1 then
imgui.SwitchContext()
imgui.GetStyle().WindowPadding = imgui.ImVec2(10, 10)
imgui.GetStyle().ItemSpacing = imgui.ImVec2(5, 5)
imgui.GetStyle().WindowRounding = 5.0
imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.16, 0.16, 0.22, 0.50)
else
imgui.SwitchContext()
STYLE.WindowPadding = imgui.ImVec2(5, 5)
STYLE.ItemSpacing = imgui.ImVec2(10, 10)
STYLE.WindowBorderSize = 5.0
STYLE.WindowRounding = 10.0
STYLE.ChildRounding = 10.0
STYLE.FrameRounding = 5.0
COLOR[c.Text] = VEC4(1.00, 1.00, 1.00, 1.00)
COLOR[c.TextDisabled] = VEC4(1.00, 1.00, 1.00, 0.80)
COLOR[c.WindowBg] = VEC4(0.13, 0.12, 0.18, 1.00)
COLOR[c.ChildBg] = VEC4(0.18, 0.17, 0.23, 1.00)
COLOR[c.PopupBg] = VEC4(0.30, 0.30, 0.30, 1.00)
COLOR[c.Border] = VEC4(0.60, 0.50, 0.95, 1.00)
COLOR[c.Separator] = VEC4(0.50, 0.50, 0.50, 0.90)
COLOR[c.FrameBg] = VEC4(0.60, 0.50, 0.95, 0.20)
COLOR[c.FrameBgHovered] = VEC4(0.60, 0.50, 0.95, 0.50)
COLOR[c.FrameBgActive] = VEC4(0.60, 0.50, 0.95, 1.00)
COLOR[c.SliderGrab] = VEC4(1.00, 1.00, 1.00, 0.50)
COLOR[c.SliderGrabActive] = VEC4(1.00, 1.00, 1.00, 1.00)
COLOR[c.CheckMark] = VEC4(1.00, 1.00, 1.00, 1.00)
COLOR[c.Button] = VEC4(0.60, 0.50, 0.95, 0.50)
COLOR[c.ButtonHovered] = VEC4(0.65, 0.55, 0.75, 0.50)
COLOR[c.ButtonActive] = VEC4(0.65, 0.55, 0.75, 1.00)
COLOR[c.ScrollbarBg] = VEC4(0.60, 0.50, 0.95, 0.30)
COLOR[c.ScrollbarGrab] = VEC4(0.60, 0.50, 0.95, 0.80)
COLOR[c.ScrollbarGrabHovered] = VEC4(0.60, 0.50, 0.95, 0.30)
COLOR[c.ScrollbarGrabActive] = VEC4(0.60, 0.50, 0.95, 0.30)
COLOR[c.TextSelectedBg] = VEC4(1.00, 1.00, 1.00, 0.30)
COLOR[c.ModalWindowDimBg] = VEC4(0.00, 0.00, 0.00, 0.60)
end
end)