Как подключить imgui?

reblader

Участник
Автор темы
60
3
Версия MoonLoader
Другое
Привет всем. Я новичок в lua, хотел подключить Imgui (стиль), который сделал сам через imgui.editor
Искал в интернете, даже в чужих кодах пробывал не получилось..

ps: Умники, плиз, не долбите мозги. Для этого я отметил слово КРАСНЫМ цветом!

Lua:
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text]                   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled]           = ImVec4(0.38f, 0.42f, 0.53f, 1.00f);
colors[ImGuiCol_WindowBg]               = ImVec4(0.11f, 0.11f, 0.13f, 1.00f);
colors[ImGuiCol_ChildBg]                = ImVec4(0.61f, 0.61f, 0.61f, 0.00f);
colors[ImGuiCol_PopupBg]                = ImVec4(0.00f, 0.00f, 0.00f, 0.92f);
colors[ImGuiCol_Border]                 = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_BorderShadow]           = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
colors[ImGuiCol_FrameBg]                = ImVec4(0.22f, 0.24f, 0.30f, 0.58f);
colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.37f, 0.40f, 0.49f, 1.00f);
colors[ImGuiCol_FrameBgActive]          = ImVec4(0.24f, 0.25f, 0.31f, 1.00f);
colors[ImGuiCol_TitleBg]                = ImVec4(1.00f, 1.00f, 1.00f, 0.89f);
colors[ImGuiCol_TitleBgActive]          = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.58f, 0.58f, 0.58f, 0.20f);
colors[ImGuiCol_MenuBarBg]              = ImVec4(0.55f, 0.55f, 0.55f, 1.00f);
colors[ImGuiCol_ScrollbarBg]            = ImVec4(1.00f, 1.00f, 1.00f, 0.38f);
colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.22f, 0.24f, 0.30f, 0.69f);
colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.80f, 0.80f, 0.84f, 0.40f);
colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
colors[ImGuiCol_CheckMark]              = ImVec4(0.46f, 0.49f, 0.60f, 1.00f);
colors[ImGuiCol_SliderGrab]             = ImVec4(0.37f, 0.41f, 0.51f, 1.00f);
colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.55f, 0.55f, 0.55f, 0.60f);
colors[ImGuiCol_Button]                 = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_ButtonHovered]          = ImVec4(0.81f, 0.83f, 0.90f, 0.79f);
colors[ImGuiCol_ButtonActive]           = ImVec4(0.73f, 0.73f, 0.73f, 1.00f);
colors[ImGuiCol_Header]                 = ImVec4(0.84f, 0.84f, 1.00f, 0.45f);
colors[ImGuiCol_HeaderHovered]          = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_HeaderActive]           = ImVec4(1.00f, 1.00f, 1.00f, 0.80f);
colors[ImGuiCol_Separator]              = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.91f, 0.91f, 1.00f, 1.00f);
colors[ImGuiCol_SeparatorActive]        = ImVec4(0.59f, 0.59f, 0.59f, 1.00f);
colors[ImGuiCol_Tab]                    = ImVec4(0.34f, 0.34f, 0.34f, 0.79f);
colors[ImGuiCol_TabHovered]             = ImVec4(1.00f, 1.00f, 1.00f, 0.80f);
colors[ImGuiCol_TabActive]              = ImVec4(0.22f, 0.24f, 0.30f, 1.00f);
colors[ImGuiCol_TabUnfocused]           = ImVec4(0.48f, 0.48f, 0.48f, 0.84f);
 

reblader

Участник
Автор темы
60
3
засунь тему в функцию и вызывай после создания
слушай, ты так сказал, что я прям "понял, что аж весь LUA понял.."

ну как обычно подключай, f убери его в луа нет вроде
я не знаю как подключать imgui, только библиотеку..
мне лишь стиль подключить, дальше сам разберусь (возможн)
 

F0RQU1N and

Известный
1,310
495
я не знаю как подключать imgui, только библиотеку..
мне лишь стиль подключить, дальше сам разберусь (возможн)
смысл вопроса тогда? вопрос не в луашном имгуй, похоже, выучи сначало луа и сам imgui. этот генератор стилей генерирует c++ код, а не луа, но на луа очень просто его перевести. тут примеры тем https://www.blast.hk/threads/25442/ на мун имгуй, вот на обычном имгуе, с++ https://www.unknowncheats.me/forum/direct3d/213427-imgui-styles.html
 
  • Нравится
Реакции: reblader

#Northn

Police Helper «Reborn» — уже ШЕСТЬ лет!
Всефорумный модератор
2,637
2,487
Lua:
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00);
colors[clr.TextDisabled]           = ImVec4(0.38, 0.42, 0.53, 1.00);
colors[clr.WindowBg]               = ImVec4(0.11, 0.11, 0.13, 1.00);
colors[clr.ChildBg]                = ImVec4(0.61, 0.61, 0.61, 0.00);
colors[clr.PopupBg]                = ImVec4(0.00, 0.00, 0.00, 0.92);
colors[clr.Border]                 = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.BorderShadow]           = ImVec4(1.00, 1.00, 1.00, 0.00);
colors[clr.FrameBg]                = ImVec4(0.22, 0.24, 0.30, 0.58);
colors[clr.FrameBgHovered]         = ImVec4(0.37, 0.40, 0.49, 1.00);
colors[clr.FrameBgActive]          = ImVec4(0.24, 0.25, 0.31, 1.00);
colors[clr.TitleBg]                = ImVec4(1.00, 1.00, 1.00, 0.89);
colors[clr.TitleBgActive]          = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.TitleBgCollapsed]       = ImVec4(0.58, 0.58, 0.58, 0.20);
colors[clr.MenuBarBg]              = ImVec4(0.55, 0.55, 0.55, 1.00);
colors[clr.ScrollbarBg]            = ImVec4(1.00, 1.00, 1.00, 0.38);
colors[clr.ScrollbarGrab]          = ImVec4(0.22, 0.24, 0.30, 0.69);
colors[clr.ScrollbarGrabHovered]   = ImVec4(0.80, 0.80, 0.84, 0.40);
colors[clr.ScrollbarGrabActive]    = ImVec4(1.00, 1.00, 1.00, 0.60);
colors[clr.CheckMark]              = ImVec4(0.46, 0.49, 0.60, 1.00);
colors[clr.SliderGrab]             = ImVec4(0.37, 0.41, 0.51, 1.00);
colors[clr.SliderGrabActive]       = ImVec4(0.55, 0.55, 0.55, 0.60);
colors[clr.Button]                 = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.ButtonHovered]          = ImVec4(0.81, 0.83, 0.90, 0.79);
colors[clr.ButtonActive]           = ImVec4(0.73, 0.73, 0.73, 1.00);
colors[clr.Header]                 = ImVec4(0.84, 0.84, 1.00, 0.45);
colors[clr.HeaderHovered]          = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.HeaderActive]           = ImVec4(1.00, 1.00, 1.00, 0.80);
colors[clr.Separator]              = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.SeparatorHovered]       = ImVec4(0.91, 0.91, 1.00, 1.00);
colors[clr.SeparatorActive]        = ImVec4(0.59, 0.59, 0.59, 1.00);
colors[clr.Tab]                    = ImVec4(0.34, 0.34, 0.34, 0.79);
colors[clr.TabHovered]             = ImVec4(1.00, 1.00, 1.00, 0.80);
colors[clr.TabActive]              = ImVec4(0.22, 0.24, 0.30, 1.00);
colors[clr.TabUnfocused]           = ImVec4(0.48, 0.48, 0.48, 0.84);
 
  • Нравится
Реакции: reblader и Ninthmoon