- 1,296
- 615
GameFixerпод красивым интерфейсом я имею в виду что-то типо такого: Посмотреть вложение 169451
А в чём собственно разница?так там же на мимгуи не?
local sw, sh = getScreenResolution()
local tf, str, sizeof = imgui.new, ffi.string, ffi.sizeof
local main_window = tf.bool(true)
local main_color = imgui.ImVec4(0.21, 0.71, 0.80, 1.00)
imgui.OnInitialize(function()
local config = imgui.ImFontConfig()
config.MergeMode = true
local glyph_ranges = imgui.GetIO().Fonts:GetGlyphRangesCyrillic()
local iconRanges = imgui.new.ImWchar[3](fa.min_range, fa.max_range, 0)
imgui.GetIO().Fonts:AddFontFromFileTTF('trebucbd.ttf', 14.0, nil, glyph_ranges)
icon = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fa-solid-900.ttf', 14.0, config, iconRanges)
titleFont = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 20.0, _, glyph_ranges)
titleFont_colors = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 18.0, _, glyph_ranges)
imgui.GetIO().IniFilename = nil
imgui.DarkTheme()
end)
local HeaderButton = function(bool, str_id)
local DL = imgui.GetWindowDrawList()
local ToU32 = imgui.ColorConvertFloat4ToU32
local result = false
local label = string.gsub(str_id, "##.*$", "")
local duration = { 0.5, 0.3 }
local cols = {
idle = imgui.GetStyle().Colors[imgui.Col.Text],
hovr = main_color,
slct = imgui.GetStyle().Colors[imgui.Col.Text]
}
if not AI_HEADERBUT then AI_HEADERBUT = {} end
if not AI_HEADERBUT[str_id] then
AI_HEADERBUT[str_id] = {
color = bool and cols.slct or cols.idle,
clock = os.clock() + duration[1],
h = {
state = bool,
alpha = bool and 1.00 or 0.00,
clock = os.clock() + duration[2],
}
}
end
local pool = AI_HEADERBUT[str_id]
local degrade = function(before, after, start_time, duration)
local result = before
local timer = os.clock() - start_time
if timer >= 0.00 then
local offs = {
x = after.x - before.x,
y = after.y - before.y,
z = after.z - before.z,
w = after.w - before.w
}
result.x = result.x + ( (offs.x / duration) * timer )
result.y = result.y + ( (offs.y / duration) * timer )
result.z = result.z + ( (offs.z / duration) * timer )
result.w = result.w + ( (offs.w / duration) * timer )
end
return result
end
local pushFloatTo = function(p1, p2, clock, duration)
local result = p1
local timer = os.clock() - clock
if timer >= 0.00 then
local offs = p2 - p1
result = result + ((offs / duration) * timer)
end
return result
end
local set_alpha = function(color, alpha)
return imgui.ImVec4(color.x, color.y, color.z, alpha or 1.00)
end
local labelsize = imgui.CalcTextSize(label)
imgui.SetCursorPosX(150 / 2 - labelsize.x / 2)
imgui.BeginGroup()
local pos = imgui.GetCursorPos()
local p = imgui.GetCursorScreenPos()
imgui.TextColored(pool.color, label)
local s = imgui.GetItemRectSize()
local hovered = imgui.IsItemHovered()
local clicked = imgui.IsItemClicked()
if pool.h.state ~= hovered and not bool then
pool.h.state = hovered
pool.h.clock = os.clock()
end
if clicked then
pool.clock = os.clock()
result = true
end
if os.clock() - pool.clock <= duration[1] then
pool.color = degrade(
imgui.ImVec4(pool.color),
bool and cols.slct or (hovered and cols.hovr or cols.idle),
pool.clock,
duration[1]
)
else
pool.color = bool and cols.slct or (hovered and cols.hovr or cols.idle)
end
if pool.h.clock ~= nil then
if os.clock() - pool.h.clock <= duration[2] then
pool.h.alpha = pushFloatTo(
pool.h.alpha,
pool.h.state and 1.00 or 0.00,
pool.h.clock,
duration[2]
)
else
pool.h.alpha = pool.h.state and 1.00 or 0.00
if not pool.h.state then
pool.h.clock = nil
end
end
local max = s.x / 2
local Y = p.y + s.y + 3
local mid = p.x + max
DL:AddLine(imgui.ImVec2(mid, Y), imgui.ImVec2(mid + (max * pool.h.alpha), Y), ToU32(set_alpha(pool.color, pool.h.alpha)), 3)
DL:AddLine(imgui.ImVec2(mid, Y), imgui.ImVec2(mid - (max * pool.h.alpha), Y), ToU32(set_alpha(pool.color, pool.h.alpha)), 3)
end
imgui.EndGroup()
return result
end
--[[ navbar ]]--
local navigation = {
selectedTab = 1,
list = {u8"Настройки", u8"Информация"}
}
local main_title = ""
local main_title_pos = 250
--[[ saving values ]]--
local gcR, gcG, gcB = torgb(cfg.colors.global_chat)
local wcR, wcG, wcB = torgb(cfg.colors.world_chat)
--[[ coloredit3 ]]--
local global_chat = tf.float[3](gcR / 255, gcG / 255, gcB / 255)
local world_chat = tf.float[3](wcR / 255, wcG / 255, wcB / 255)
--[[ changecolor_window ]]--
local changeColor = false
local global_chat_action = false
local world_chat_action = false
--[[ bool ]]--
local global_chat_bool, world_chat_bool = tf.bool(cfg.bool.global_chat), tf.bool(cfg.bool.world_chat)
--[[ main ]]--
local main_window = imgui.OnFrame(
function() return main_window[0] end,
function(self)
imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2 + 50), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(660, 450), imgui.Cond.FirstUseEver)
imgui.Begin("Custom Training Colors", main_window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoTitleBar)
imgui.PushStyleVarFloat(imgui.StyleVar.ChildRounding, 5)
imgui.PushStyleColor(imgui.Col.ChildBg, imgui.ImVec4(0, 0, 0, 0.30))
imgui.BeginChild("Navbar", imgui.ImVec2(160, 400), true)
imgui.PushFont(titleFont)
imgui.SetCursorPos(imgui.ImVec2(10, 40))
imgui.Text("Custom Training")
imgui.PopFont()
imgui.PushFont(titleFont_colors)
imgui.SetCursorPos(imgui.ImVec2(53, 57))
imgui.Text("Colors")
imgui.PopFont()
imgui.SetCursorPosY(90)
imgui.BeginGroup()
for i, title in ipairs(navigation.list) do
if HeaderButton(navigation.selectedTab == i, title) then
navigation.selectedTab = i
end
imgui.NewLine()
end
imgui.EndGroup()
imgui.SetCursorPos(imgui.ImVec2(30, 365))
imgui.TextDisabled("by default.zone")
imgui.SetCursorPosX(22)
imgui.TextDisabled("Script version: "..thisScript().version)
imgui.EndChild()
imgui.PopStyleColor()
imgui.PopStyleVar(1)
imgui.SameLine()
imgui.SetCursorPosX(150)
imgui.BeginChild('Selected Tab', imgui.ImVec2(510, 400), true)
imgui.BeginGroup() -- main title, close button
imgui.SetCursorPos(imgui.ImVec2(main_title_pos, 10))
imgui.PushFont(titleFont)
imgui.Text(main_title)
imgui.PopFont()
imgui.BeginGroup()
imgui.SetCursorPos(imgui.ImVec2(473, -10))
imgui.PushStyleColor(imgui.Col.ButtonHovered, imgui.ImVec4(0.5, 0, 0, 1))
imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 10)
if imgui.Button("##close-button", imgui.ImVec2(47, 47)) then main_window[0] = false end
imgui.PopStyleVar(1)
imgui.PopStyleColor(1)
imgui.EndGroup()
imgui.EndGroup()
if navigation.selectedTab == 1 then
main_title = "SETTINGS"
main_title_pos = 220
imgui.SetCursorPosX(10)
imgui.BeginGroup()
imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 5)
if imgui.Checkbox(u8" Менять цвет глобального чата ", global_chat_bool) then
cfg.bool.global_chat = global_chat_bool[0]
save()
end
imgui.SameLine()
if global_chat_bool[0] then
if imgui.Button(fa.ICON_FA_COGS.."##globalchat_change", imgui.ImVec2(27, 26)) then
changeColor = not changeColor
global_chat_action = not global_chat_action
end
end
imgui.SetCursorPosY(70)
if imgui.Checkbox(u8" Менять цвет чата мира ", world_chat_bool) then
cfg.bool.world_chat = world_chat_bool[0]
save()
end
imgui.SameLine()
if world_chat_bool[0] then
if imgui.Button(fa.ICON_FA_COGS.."##worldchat_change", imgui.ImVec2(27, 26)) then
changeColor = not changeColor
world_chat_action = not world_chat_action
end
end
imgui.PopStyleVar(1)
imgui.EndGroup()
elseif navigation.selectedTab == 2 then
main_title = "INFORMATION"
main_title_pos = 200
-- сделаешь что надо тут
end
imgui.EndChild()
if changeColor then
imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 5)
imgui.SetCursorPos(imgui.ImVec2(80, 410))
imgui.PushStyleColor(imgui.Col.ChildBg, imgui.ImVec4(0.12, 0.12, 0.12, 1.00))
imgui.PushStyleVarFloat(imgui.StyleVar.ChildRounding, 5)
imgui.BeginChild("Change Color", imgui.ImVec2(510, 24), true)
imgui.PushItemWidth(433)
if global_chat_action then
if imgui.ColorEdit3("##global_chat_action", global_chat) then
cfg.colors.global_chat = bit.tohex(join_argb(0, global_chat[0] * 255, global_chat[1] * 255, global_chat[2] * 255), 6)
end
end
if world_chat_action then
if imgui.ColorEdit3("##world_chat_action", world_chat) then
cfg.colors.world_chat = bit.tohex(join_argb(0, world_chat[0] * 255, world_chat[1] * 255, world_chat[2] * 255), 6)
end
end
imgui.SameLine()
if imgui.Button(u8"Установить") then changeColor = false; save() end
imgui.EndChild()
imgui.PopStyleVar(1)
imgui.PopStyleColor(1)
imgui.PopStyleVar(1)
else
global_chat_action = false
world_chat_action = false
end
imgui.End()
end
)
--[[ DarkTheme, значения менял там, на будущее ]]--
function imgui.DarkTheme()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
imgui.SwitchContext()
--==[ STYLE ]==--
style.WindowPadding = imgui.ImVec2(0,0)
style.FramePadding = imgui.ImVec2(5, 5)
style.ItemSpacing = imgui.ImVec2(0, 0)
style.ItemInnerSpacing = imgui.ImVec2(0, 0)
style.TouchExtraPadding = imgui.ImVec2(0, 0)
style.IndentSpacing = 0
style.ScrollbarSize = 10
style.GrabMinSize = 10
--==[ BORDER ]==--
style.WindowBorderSize = 0
style.ChildBorderSize = 0
style.PopupBorderSize = 0
style.FrameBorderSize = 0
style.TabBorderSize = 1
--==[ ROUNDING ]==--
style.WindowRounding = 7
style.ChildRounding = 0
style.FrameRounding = 0
style.PopupRounding = 5
style.ScrollbarRounding = 5
style.GrabRounding = 5
style.TabRounding = 5
--==[ ALIGN ]==--
style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
style.ButtonTextAlign = imgui.ImVec2(0.5, 0.5)
style.SelectableTextAlign = imgui.ImVec2(0.5, 0.5)
--==[ COLORS ]==--
colors[clr.Text] = imgui.ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.TextDisabled] = imgui.ImVec4(0.50, 0.50, 0.50, 1.00)
colors[clr.WindowBg] = imgui.ImVec4(0.07, 0.07, 0.07, 0)
colors[clr.ChildBg] = imgui.ImVec4(0.07, 0.07, 0.07, 1.00)
colors[clr.PopupBg] = imgui.ImVec4(0.07, 0.07, 0.07, 1.00)
colors[clr.Border] = imgui.ImVec4(0.25, 0.25, 0.26, 0.54)
colors[clr.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.FrameBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.FrameBgHovered] = imgui.ImVec4(0.25, 0.25, 0.26, 1.00)
colors[clr.FrameBgActive] = imgui.ImVec4(0.25, 0.25, 0.26, 1.00)
colors[clr.TitleBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.TitleBgActive] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.TitleBgCollapsed] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.MenuBarBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.ScrollbarBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.ScrollbarGrab] = imgui.ImVec4(0.00, 0.00, 0.00, 1.00)
colors[clr.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.41, 0.41, 1.00)
colors[clr.ScrollbarGrabActive] = imgui.ImVec4(0.51, 0.51, 0.51, 1.00)
colors[clr.CheckMark] = imgui.ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.SliderGrab] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00)
colors[clr.SliderGrabActive] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00)
colors[clr.Button] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.ButtonHovered] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00)
colors[clr.ButtonActive] = imgui.ImVec4(0.41, 0.41, 0.41, 1.00)
colors[clr.Header] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.HeaderHovered] = imgui.ImVec4(0.20, 0.20, 0.20, 1.00)
colors[clr.HeaderActive] = imgui.ImVec4(0.47, 0.47, 0.47, 1.00)
colors[clr.Separator] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.SeparatorHovered] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.SeparatorActive] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.ResizeGrip] = imgui.ImVec4(1.00, 1.00, 1.00, 0.25)
colors[clr.ResizeGripHovered] = imgui.ImVec4(1.00, 1.00, 1.00, 0.67)
colors[clr.ResizeGripActive] = imgui.ImVec4(1.00, 1.00, 1.00, 0.95)
colors[clr.Tab] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00)
colors[clr.TabHovered] = imgui.ImVec4(0.28, 0.28, 0.28, 1.00)
colors[clr.TabActive] = imgui.ImVec4(0.30, 0.30, 0.30, 1.00)
colors[clr.TabUnfocused] = imgui.ImVec4(0.07, 0.10, 0.15, 0.97)
colors[clr.TabUnfocusedActive] = imgui.ImVec4(0.14, 0.26, 0.42, 1.00)
colors[clr.PlotLines] = imgui.ImVec4(0.61, 0.61, 0.61, 1.00)
colors[clr.PlotLinesHovered] = imgui.ImVec4(1.00, 0.43, 0.35, 1.00)
colors[clr.PlotHistogram] = imgui.ImVec4(0.90, 0.70, 0.00, 1.00)
colors[clr.PlotHistogramHovered] = imgui.ImVec4(1.00, 0.60, 0.00, 1.00)
colors[clr.TextSelectedBg] = imgui.ImVec4(1.00, 0.00, 0.00, 0.35)
colors[clr.DragDropTarget] = imgui.ImVec4(1.00, 1.00, 0.00, 0.90)
colors[clr.NavHighlight] = imgui.ImVec4(0.26, 0.59, 0.98, 1.00)
colors[clr.NavWindowingHighlight] = imgui.ImVec4(1.00, 1.00, 1.00, 0.70)
colors[clr.NavWindowingDimBg] = imgui.ImVec4(0.80, 0.80, 0.80, 0.20)
colors[clr.ModalWindowDimBg] = imgui.ImVec4(0.00, 0.00, 0.00, 0.70)
end
название не о чём не говорит?спизжено у чапо + улучшено(норм анимация выбора окна(Настройки, информация) + не уебищная кнопка закрытия)
мне впадлу кидать весь код, скину только мимгуи
Lua:local sw, sh = getScreenResolution() local tf, str, sizeof = imgui.new, ffi.string, ffi.sizeof local main_window = tf.bool(true) local main_color = imgui.ImVec4(0.21, 0.71, 0.80, 1.00) imgui.OnInitialize(function() local config = imgui.ImFontConfig() config.MergeMode = true local glyph_ranges = imgui.GetIO().Fonts:GetGlyphRangesCyrillic() local iconRanges = imgui.new.ImWchar[3](fa.min_range, fa.max_range, 0) imgui.GetIO().Fonts:AddFontFromFileTTF('trebucbd.ttf', 14.0, nil, glyph_ranges) icon = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fa-solid-900.ttf', 14.0, config, iconRanges) titleFont = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 20.0, _, glyph_ranges) titleFont_colors = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 18.0, _, glyph_ranges) imgui.GetIO().IniFilename = nil imgui.DarkTheme() end) local HeaderButton = function(bool, str_id) local DL = imgui.GetWindowDrawList() local ToU32 = imgui.ColorConvertFloat4ToU32 local result = false local label = string.gsub(str_id, "##.*$", "") local duration = { 0.5, 0.3 } local cols = { idle = imgui.GetStyle().Colors[imgui.Col.Text], hovr = main_color, slct = imgui.GetStyle().Colors[imgui.Col.Text] } if not AI_HEADERBUT then AI_HEADERBUT = {} end if not AI_HEADERBUT[str_id] then AI_HEADERBUT[str_id] = { color = bool and cols.slct or cols.idle, clock = os.clock() + duration[1], h = { state = bool, alpha = bool and 1.00 or 0.00, clock = os.clock() + duration[2], } } end local pool = AI_HEADERBUT[str_id] local degrade = function(before, after, start_time, duration) local result = before local timer = os.clock() - start_time if timer >= 0.00 then local offs = { x = after.x - before.x, y = after.y - before.y, z = after.z - before.z, w = after.w - before.w } result.x = result.x + ( (offs.x / duration) * timer ) result.y = result.y + ( (offs.y / duration) * timer ) result.z = result.z + ( (offs.z / duration) * timer ) result.w = result.w + ( (offs.w / duration) * timer ) end return result end local pushFloatTo = function(p1, p2, clock, duration) local result = p1 local timer = os.clock() - clock if timer >= 0.00 then local offs = p2 - p1 result = result + ((offs / duration) * timer) end return result end local set_alpha = function(color, alpha) return imgui.ImVec4(color.x, color.y, color.z, alpha or 1.00) end local labelsize = imgui.CalcTextSize(label) imgui.SetCursorPosX(150 / 2 - labelsize.x / 2) imgui.BeginGroup() local pos = imgui.GetCursorPos() local p = imgui.GetCursorScreenPos() imgui.TextColored(pool.color, label) local s = imgui.GetItemRectSize() local hovered = imgui.IsItemHovered() local clicked = imgui.IsItemClicked() if pool.h.state ~= hovered and not bool then pool.h.state = hovered pool.h.clock = os.clock() end if clicked then pool.clock = os.clock() result = true end if os.clock() - pool.clock <= duration[1] then pool.color = degrade( imgui.ImVec4(pool.color), bool and cols.slct or (hovered and cols.hovr or cols.idle), pool.clock, duration[1] ) else pool.color = bool and cols.slct or (hovered and cols.hovr or cols.idle) end if pool.h.clock ~= nil then if os.clock() - pool.h.clock <= duration[2] then pool.h.alpha = pushFloatTo( pool.h.alpha, pool.h.state and 1.00 or 0.00, pool.h.clock, duration[2] ) else pool.h.alpha = pool.h.state and 1.00 or 0.00 if not pool.h.state then pool.h.clock = nil end end local max = s.x / 2 local Y = p.y + s.y + 3 local mid = p.x + max DL:AddLine(imgui.ImVec2(mid, Y), imgui.ImVec2(mid + (max * pool.h.alpha), Y), ToU32(set_alpha(pool.color, pool.h.alpha)), 3) DL:AddLine(imgui.ImVec2(mid, Y), imgui.ImVec2(mid - (max * pool.h.alpha), Y), ToU32(set_alpha(pool.color, pool.h.alpha)), 3) end imgui.EndGroup() return result end --[[ navbar ]]-- local navigation = { selectedTab = 1, list = {u8"Настройки", u8"Информация"} } local main_title = "" local main_title_pos = 250 --[[ saving values ]]-- local gcR, gcG, gcB = torgb(cfg.colors.global_chat) local wcR, wcG, wcB = torgb(cfg.colors.world_chat) --[[ coloredit3 ]]-- local global_chat = tf.float[3](gcR / 255, gcG / 255, gcB / 255) local world_chat = tf.float[3](wcR / 255, wcG / 255, wcB / 255) --[[ changecolor_window ]]-- local changeColor = false local global_chat_action = false local world_chat_action = false --[[ bool ]]-- local global_chat_bool, world_chat_bool = tf.bool(cfg.bool.global_chat), tf.bool(cfg.bool.world_chat) --[[ main ]]-- local main_window = imgui.OnFrame( function() return main_window[0] end, function(self) imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2 + 50), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5)) imgui.SetNextWindowSize(imgui.ImVec2(660, 450), imgui.Cond.FirstUseEver) imgui.Begin("Custom Training Colors", main_window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoTitleBar) imgui.PushStyleVarFloat(imgui.StyleVar.ChildRounding, 5) imgui.PushStyleColor(imgui.Col.ChildBg, imgui.ImVec4(0, 0, 0, 0.30)) imgui.BeginChild("Navbar", imgui.ImVec2(160, 400), true) imgui.PushFont(titleFont) imgui.SetCursorPos(imgui.ImVec2(10, 40)) imgui.Text("Custom Training") imgui.PopFont() imgui.PushFont(titleFont_colors) imgui.SetCursorPos(imgui.ImVec2(53, 57)) imgui.Text("Colors") imgui.PopFont() imgui.SetCursorPosY(90) imgui.BeginGroup() for i, title in ipairs(navigation.list) do if HeaderButton(navigation.selectedTab == i, title) then navigation.selectedTab = i end imgui.NewLine() end imgui.EndGroup() imgui.SetCursorPos(imgui.ImVec2(30, 365)) imgui.TextDisabled("by default.zone") imgui.SetCursorPosX(22) imgui.TextDisabled("Script version: "..thisScript().version) imgui.EndChild() imgui.PopStyleColor() imgui.PopStyleVar(1) imgui.SameLine() imgui.SetCursorPosX(150) imgui.BeginChild('Selected Tab', imgui.ImVec2(510, 400), true) imgui.BeginGroup() -- main title, close button imgui.SetCursorPos(imgui.ImVec2(main_title_pos, 10)) imgui.PushFont(titleFont) imgui.Text(main_title)в imgui.PopFont() imgui.BeginGroup() imgui.SetCursorPos(imgui.ImVec2(473, -10)) imgui.PushStyleColor(imgui.Col.ButtonHovered, imgui.ImVec4(0.5, 0, 0, 1)) imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 10) if imgui.Button("##close-button", imgui.ImVec2(47, 47)) then main_window[0] = false end imgui.PopStyleVar(1) imgui.PopStyleColor(1) imgui.EndGroup() imgui.EndGroup() if navigation.selectedTab == 1 then main_title = "SETTINGS" main_title_pos = 220 imgui.SetCursorPosX(10) imgui.BeginGroup() imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 5) if imgui.Checkbox(u8" Менять цвет глобального чата ", global_chat_bool) then cfg.bool.global_chat = global_chat_bool[0] save() end imgui.SameLine() if global_chat_bool[0] then if imgui.Button(fa.ICON_FA_COGS.."##globalchat_change", imgui.ImVec2(27, 26)) then changeColor = not changeColor global_chat_action = not global_chat_action end end imgui.SetCursorPosY(70) if imgui.Checkbox(u8" Менять цвет чата мира ", world_chat_bool) then cfg.bool.world_chat = world_chat_bool[0] save() end imgui.SameLine() if world_chat_bool[0] then if imgui.Button(fa.ICON_FA_COGS.."##worldchat_change", imgui.ImVec2(27, 26)) then changeColor = not changeColor world_chat_action = not world_chat_action end end imgui.PopStyleVar(1) imgui.EndGroup() elseif navigation.selectedTab == 2 then main_title = "INFORMATION" main_title_pos = 200 -- сделаешь что надо тут end imgui.EndChild() if changeColor then imgui.PushStyleVarFloat(imgui.StyleVar.FrameRounding, 5) imgui.SetCursorPos(imgui.ImVec2(80, 410)) imgui.PushStyleColor(imgui.Col.ChildBg, imgui.ImVec4(0.12, 0.12, 0.12, 1.00)) imgui.PushStyleVarFloat(imgui.StyleVar.ChildRounding, 5) imgui.BeginChild("Change Color", imgui.ImVec2(510, 24), true) imgui.PushItemWidth(433) if global_chat_action then if imgui.ColorEdit3("##global_chat_action", global_chat) then cfg.colors.global_chat = bit.tohex(join_argb(0, global_chat[0] * 255, global_chat[1] * 255, global_chat[2] * 255), 6) end end if world_chat_action then if imgui.ColorEdit3("##world_chat_action", world_chat) then cfg.colors.world_chat = bit.tohex(join_argb(0, world_chat[0] * 255, world_chat[1] * 255, world_chat[2] * 255), 6) end end imgui.SameLine() if imgui.Button(u8"Установить") then changeColor = false; save() end imgui.EndChild() imgui.PopStyleVar(1) imgui.PopStyleColor(1) imgui.PopStyleVar(1) else global_chat_action = false world_chat_action = false end imgui.End() end ) --[[ DarkTheme, значения менял там, на будущее ]]-- function imgui.DarkTheme() local style = imgui.GetStyle() local colors = style.Colors local clr = imgui.Col imgui.SwitchContext() --==[ STYLE ]==-- style.WindowPadding = imgui.ImVec2(0,0) style.FramePadding = imgui.ImVec2(5, 5) style.ItemSpacing = imgui.ImVec2(0, 0) style.ItemInnerSpacing = imgui.ImVec2(0, 0) style.TouchExtraPadding = imgui.ImVec2(0, 0) style.IndentSpacing = 0 style.ScrollbarSize = 10 style.GrabMinSize = 10 --==[ BORDER ]==-- style.WindowBorderSize = 0 style.ChildBorderSize = 0 style.PopupBorderSize = 0 style.FrameBorderSize = 0 style.TabBorderSize = 1 --==[ ROUNDING ]==-- style.WindowRounding = 7 style.ChildRounding = 0 style.FrameRounding = 0 style.PopupRounding = 5 style.ScrollbarRounding = 5 style.GrabRounding = 5 style.TabRounding = 5 --==[ ALIGN ]==-- style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5) style.ButtonTextAlign = imgui.ImVec2(0.5, 0.5) style.SelectableTextAlign = imgui.ImVec2(0.5, 0.5) --==[ COLORS ]==-- colors[clr.Text] = imgui.ImVec4(1.00, 1.00, 1.00, 1.00) colors[clr.TextDisabled] = imgui.ImVec4(0.50, 0.50, 0.50, 1.00) colors[clr.WindowBg] = imgui.ImVec4(0.07, 0.07, 0.07, 0) colors[clr.ChildBg] = imgui.ImVec4(0.07, 0.07, 0.07, 1.00) colors[clr.PopupBg] = imgui.ImVec4(0.07, 0.07, 0.07, 1.00) colors[clr.Border] = imgui.ImVec4(0.25, 0.25, 0.26, 0.54) colors[clr.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00) colors[clr.FrameBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.FrameBgHovered] = imgui.ImVec4(0.25, 0.25, 0.26, 1.00) colors[clr.FrameBgActive] = imgui.ImVec4(0.25, 0.25, 0.26, 1.00) colors[clr.TitleBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.TitleBgActive] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.TitleBgCollapsed] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.MenuBarBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.ScrollbarBg] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.ScrollbarGrab] = imgui.ImVec4(0.00, 0.00, 0.00, 1.00) colors[clr.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.41, 0.41, 1.00) colors[clr.ScrollbarGrabActive] = imgui.ImVec4(0.51, 0.51, 0.51, 1.00) colors[clr.CheckMark] = imgui.ImVec4(1.00, 1.00, 1.00, 1.00) colors[clr.SliderGrab] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00) colors[clr.SliderGrabActive] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00) colors[clr.Button] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.ButtonHovered] = imgui.ImVec4(0.21, 0.20, 0.20, 1.00) colors[clr.ButtonActive] = imgui.ImVec4(0.41, 0.41, 0.41, 1.00) colors[clr.Header] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.HeaderHovered] = imgui.ImVec4(0.20, 0.20, 0.20, 1.00) colors[clr.HeaderActive] = imgui.ImVec4(0.47, 0.47, 0.47, 1.00) colors[clr.Separator] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.SeparatorHovered] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.SeparatorActive] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.ResizeGrip] = imgui.ImVec4(1.00, 1.00, 1.00, 0.25) colors[clr.ResizeGripHovered] = imgui.ImVec4(1.00, 1.00, 1.00, 0.67) colors[clr.ResizeGripActive] = imgui.ImVec4(1.00, 1.00, 1.00, 0.95) colors[clr.Tab] = imgui.ImVec4(0.12, 0.12, 0.12, 1.00) colors[clr.TabHovered] = imgui.ImVec4(0.28, 0.28, 0.28, 1.00) colors[clr.TabActive] = imgui.ImVec4(0.30, 0.30, 0.30, 1.00) colors[clr.TabUnfocused] = imgui.ImVec4(0.07, 0.10, 0.15, 0.97) colors[clr.TabUnfocusedActive] = imgui.ImVec4(0.14, 0.26, 0.42, 1.00) colors[clr.PlotLines] = imgui.ImVec4(0.61, 0.61, 0.61, 1.00) colors[clr.PlotLinesHovered] = imgui.ImVec4(1.00, 0.43, 0.35, 1.00) colors[clr.PlotHistogram] = imgui.ImVec4(0.90, 0.70, 0.00, 1.00) colors[clr.PlotHistogramHovered] = imgui.ImVec4(1.00, 0.60, 0.00, 1.00) colors[clr.TextSelectedBg] = imgui.ImVec4(1.00, 0.00, 0.00, 0.35) colors[clr.DragDropTarget] = imgui.ImVec4(1.00, 1.00, 0.00, 0.90) colors[clr.NavHighlight] = imgui.ImVec4(0.26, 0.59, 0.98, 1.00) colors[clr.NavWindowingHighlight] = imgui.ImVec4(1.00, 1.00, 1.00, 0.70) colors[clr.NavWindowingDimBg] = imgui.ImVec4(0.80, 0.80, 0.80, 0.20) colors[clr.ModalWindowDimBg] = imgui.ImVec4(0.00, 0.00, 0.00, 0.70) end
я больше привык на имгуиА в чём собственно разница?
mimgui - это и есть ImGUI, просто более качественный и стабильный билд, который содержит в себе практически все возможности фреймворка и максимально приближен к оригинальному варианту, написанному на Си. Dear ImGUI - то, что ты называешь просто ImGUI, это по сути устаревший порт, использование которого не рекомендуется в связи с его сильным устареванием и нестабильностью работы.
как писал кто то, досих пор сидеть на имгуи = себя не уважать
я тоже однажды привыкнул к имгуи, но потом мне написал один челик и почти за один день адаптировался к мимгуи, и тебе советуюя больше привык на имгуи
а ты смотрел как он выглядит на деле?:это не красивый интерфейс
ты похоже не совсем понимаешь что такое красивый интерфейс.а ты смотрел как он выглядит на деле?: