смена стилей

cort

Активный
Автор темы
283
90
Lua:
if menu == 5 then
            imgui.CenterText(u8'Выберите стиль')
            if imgui.Button(u8'Синий', imgui.ImVec2(50, 30)) then
                imgui.SwitchContext()
                themes.SwitchColorTheme(2)
            end
end

нажимаю на кнопку, а оно выдаёт

Lua:
[ML] (system) Namalsk Helper For Leaders: Loaded successfully.
[ML] (error) Namalsk Helper For Leaders: ...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:7: attempt to index global 'imgui' (a nil value)
stack traceback:
    ...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:7: in function <...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:6>
stack traceback:
    [C]: in function 'SwitchColorTheme'
    ...RolePlay\gtacr\moonloader\Namalsk Helper For Leaders.lua:611: in function 'OnDrawFrame'
    D:\Games\Namalsk RolePlay\gtacr\moonloader\lib\imgui.lua:1378: in function <D:\Games\Namalsk RolePlay\gtacr\moonloader\lib\imgui.lua:1367>
[ML] (error) Namalsk Helper For Leaders: Script died due to an error. (0F255EA4)

Вот файл imgui.themes.lua

Lua:
local imgui_lib = require 'imgui'

EXPORTS = {
    colorThemes = {"Синяя", "Красная", "Коричневая", "Аква", "Чёрная", "Фиолетовая", "Черно-оранжевая", "Оранжевая"},

    SwitchColorTheme = function(theme)
        local style = imgui.GetStyle()
        local colors = style.Colors
        local clr = imgui.Col
        local ImVec4 = imgui.ImVec4
        local ImVec2 = imgui.ImVec2

        style.WindowRounding         = 4.0
        style.WindowTitleAlign       = ImVec2(0.5, 0.5)
        style.ChildWindowRounding    = 2.0
        style.FrameRounding          = 2.0
        style.ItemSpacing            = ImVec2(10, 5)
        style.ScrollbarSize          = 15
        style.ScrollbarRounding      = 0
        style.GrabMinSize            = 9.6
        style.GrabRounding           = 1.0
        style.WindowPadding          = ImVec2(10, 10)
        style.AntiAliasedLines       = true
        style.AntiAliasedShapes      = true
        style.FramePadding           = ImVec2(5, 4)
        style.DisplayWindowPadding   = ImVec2(27, 27)
        style.DisplaySafeAreaPadding = ImVec2(5, 5)
        style.ButtonTextAlign        = ImVec2(0.5, 0.5)

        if theme == 1 or theme == nil then
            colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 2 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 3 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.23, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.23, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.39, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.28, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.43, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.43, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.25, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.25, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.43, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.43, 0.26, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.50, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.43, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 4 then 
            colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        
        elseif theme == 5 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 6 then
            colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
            colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
            colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
            colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
            colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
            colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
            colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
            colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
            colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
            colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
            colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
            colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
            colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
            colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
            colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
            colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
            colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
            colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
            colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
            colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
            colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
        elseif theme == 7 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 8 then
            colors[clr.Text]                 = ImVec4(0.92, 0.92, 0.92, 1.00)
            colors[clr.TextDisabled]         = ImVec4(0.44, 0.44, 0.44, 1.00)
            colors[clr.WindowBg]             = ImVec4(0.06, 0.06, 0.06, 1.00)
            colors[clr.ChildWindowBg]        = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.Border]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.FrameBg]              = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.FrameBgHovered]       = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.FrameBgActive]        = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.TitleBg]              = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.TitleBgActive]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.TitleBgCollapsed]     = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.MenuBarBg]            = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.ScrollbarBg]          = ImVec4(0.06, 0.06, 0.06, 0.53)
            colors[clr.ScrollbarGrab]        = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.ScrollbarGrabActive]  = ImVec4(0.81, 0.83, 0.81, 1.00)
            colors[clr.CheckMark]            = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.SliderGrab]           = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SliderGrabActive]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.Button]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.ButtonHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ButtonActive]         = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.Header]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.HeaderHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.HeaderActive]         = ImVec4(0.93, 0.65, 0.14, 1.00)
            colors[clr.Separator]            = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.SeparatorHovered]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SeparatorActive]      = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.ResizeGrip]           = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ResizeGripHovered]    = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ResizeGripActive]     = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.CloseButton]          = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.CloseButtonHovered]   = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]    = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]     = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
        end

    end
}
 
  • Злость
Реакции: SomaGnoma

YarikVL

Известный
Проверенный
4,766
1,820
Lua:
if menu == 5 then
            imgui.CenterText(u8'Выберите стиль')
            if imgui.Button(u8'Синий', imgui.ImVec2(50, 30)) then
                imgui.SwitchContext()
                themes.SwitchColorTheme(2)
            end
end

нажимаю на кнопку, а оно выдаёт

Lua:
[ML] (system) Namalsk Helper For Leaders: Loaded successfully.
[ML] (error) Namalsk Helper For Leaders: ...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:7: attempt to index global 'imgui' (a nil value)
stack traceback:
    ...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:7: in function <...RolePlay\gtacr\moonloader\resource\NHFL\imgui_themes.lua:6>
stack traceback:
    [C]: in function 'SwitchColorTheme'
    ...RolePlay\gtacr\moonloader\Namalsk Helper For Leaders.lua:611: in function 'OnDrawFrame'
    D:\Games\Namalsk RolePlay\gtacr\moonloader\lib\imgui.lua:1378: in function <D:\Games\Namalsk RolePlay\gtacr\moonloader\lib\imgui.lua:1367>
[ML] (error) Namalsk Helper For Leaders: Script died due to an error. (0F255EA4)

Вот файл imgui.themes.lua

Lua:
local imgui_lib = require 'imgui'

EXPORTS = {
    colorThemes = {"Синяя", "Красная", "Коричневая", "Аква", "Чёрная", "Фиолетовая", "Черно-оранжевая", "Оранжевая"},

    SwitchColorTheme = function(theme)
        local style = imgui.GetStyle()
        local colors = style.Colors
        local clr = imgui.Col
        local ImVec4 = imgui.ImVec4
        local ImVec2 = imgui.ImVec2

        style.WindowRounding         = 4.0
        style.WindowTitleAlign       = ImVec2(0.5, 0.5)
        style.ChildWindowRounding    = 2.0
        style.FrameRounding          = 2.0
        style.ItemSpacing            = ImVec2(10, 5)
        style.ScrollbarSize          = 15
        style.ScrollbarRounding      = 0
        style.GrabMinSize            = 9.6
        style.GrabRounding           = 1.0
        style.WindowPadding          = ImVec2(10, 10)
        style.AntiAliasedLines       = true
        style.AntiAliasedShapes      = true
        style.FramePadding           = ImVec2(5, 4)
        style.DisplayWindowPadding   = ImVec2(27, 27)
        style.DisplaySafeAreaPadding = ImVec2(5, 5)
        style.ButtonTextAlign        = ImVec2(0.5, 0.5)

        if theme == 1 or theme == nil then
            colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 2 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 3 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.23, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.23, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.39, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.28, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.43, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.43, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.25, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.25, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.43, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.43, 0.26, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.50, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.43, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 4 then
            colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
       
        elseif theme == 5 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 6 then
            colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
            colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
            colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
            colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
            colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
            colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
            colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
            colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
            colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
            colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
            colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
            colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
            colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
            colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
            colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
            colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
            colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
            colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
            colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
            colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
            colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
        elseif theme == 7 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 8 then
            colors[clr.Text]                 = ImVec4(0.92, 0.92, 0.92, 1.00)
            colors[clr.TextDisabled]         = ImVec4(0.44, 0.44, 0.44, 1.00)
            colors[clr.WindowBg]             = ImVec4(0.06, 0.06, 0.06, 1.00)
            colors[clr.ChildWindowBg]        = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.Border]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.FrameBg]              = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.FrameBgHovered]       = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.FrameBgActive]        = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.TitleBg]              = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.TitleBgActive]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.TitleBgCollapsed]     = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.MenuBarBg]            = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.ScrollbarBg]          = ImVec4(0.06, 0.06, 0.06, 0.53)
            colors[clr.ScrollbarGrab]        = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.ScrollbarGrabActive]  = ImVec4(0.81, 0.83, 0.81, 1.00)
            colors[clr.CheckMark]            = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.SliderGrab]           = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SliderGrabActive]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.Button]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.ButtonHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ButtonActive]         = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.Header]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.HeaderHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.HeaderActive]         = ImVec4(0.93, 0.65, 0.14, 1.00)
            colors[clr.Separator]            = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.SeparatorHovered]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SeparatorActive]      = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.ResizeGrip]           = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ResizeGripHovered]    = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ResizeGripActive]     = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.CloseButton]          = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.CloseButtonHovered]   = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]    = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]     = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
        end

    end
}
Проще в один файл затолкнуть скрипт и стили ( чтоб с подкачкой не мучаться ). И тогда в инете много исходников найдёшь
 

SomaGnoma

Известный
436
150
Проще в один файл затолкнуть скрипт и стили ( чтоб с подкачкой не мучаться ). И тогда в инете много исходников найдёшь
Lua:
if menu == 5 then
            imgui.CenterText(u8'Выберите стиль')
            if imgui.Button(u8'Синий', imgui.ImVec2(50, 30)) then
                ChangeTheme(2)
            end
end
function ChangeTheme(theme)

        local style = imgui.GetStyle()
        local colors = style.Colors
        local clr = imgui.Col
        local ImVec4 = imgui.ImVec4
        local ImVec2 = imgui.ImVec2
        imgui.SwitchContext()
        style.WindowRounding         = 4.0
        style.WindowTitleAlign       = ImVec2(0.5, 0.5)
        style.ChildWindowRounding    = 2.0
        style.FrameRounding          = 2.0
        style.ItemSpacing            = ImVec2(10, 5)
        style.ScrollbarSize          = 15
        style.ScrollbarRounding      = 0
        style.GrabMinSize            = 9.6
        style.GrabRounding           = 1.0
        style.WindowPadding          = ImVec2(10, 10)
        style.AntiAliasedLines       = true
        style.AntiAliasedShapes      = true
        style.FramePadding           = ImVec2(5, 4)
        style.DisplayWindowPadding   = ImVec2(27, 27)
        style.DisplaySafeAreaPadding = ImVec2(5, 5)
        style.ButtonTextAlign        = ImVec2(0.5, 0.5)

        if theme == 1 or theme == nil then
            colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 2 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 3 then
            colors[clr.FrameBg]                = ImVec4(0.48, 0.23, 0.16, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.48, 0.23, 0.16, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.88, 0.39, 0.24, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Button]                 = ImVec4(0.98, 0.43, 0.26, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.98, 0.28, 0.06, 1.00)
            colors[clr.Header]                 = ImVec4(0.98, 0.43, 0.26, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.98, 0.43, 0.26, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.98, 0.43, 0.26, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.25, 0.10, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.75, 0.25, 0.10, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.98, 0.43, 0.26, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.43, 0.26, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.43, 0.26, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.50, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.43, 0.26, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
        elseif theme == 4 then
            colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
            colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
            colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
            colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
            colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
            colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
            colors[clr.Separator]              = colors[clr.Border]
            colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
            colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
            colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
            colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
            colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
            colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
            colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
            colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
            colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]                = colors[clr.PopupBg]
            colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
            colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
       
        elseif theme == 5 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.SliderGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 6 then
            colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
            colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
            colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
            colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
            colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
            colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
            colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
            colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
            colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
            colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
            colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
            colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
            colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
            colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
            colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
            colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
            colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
            colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
            colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
            colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
            colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
            colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
            colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
            colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
            colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
            colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
        elseif theme == 7 then
            colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
            colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
            colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
            colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
            colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
            colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
            colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
            colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
            colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
            colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
            colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
            colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
            colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
            colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
            colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
            colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
            colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
            colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
            colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
            colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
            colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
        elseif theme == 8 then
            colors[clr.Text]                 = ImVec4(0.92, 0.92, 0.92, 1.00)
            colors[clr.TextDisabled]         = ImVec4(0.44, 0.44, 0.44, 1.00)
            colors[clr.WindowBg]             = ImVec4(0.06, 0.06, 0.06, 1.00)
            colors[clr.ChildWindowBg]        = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.PopupBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.ComboBg]              = ImVec4(0.08, 0.08, 0.08, 0.94)
            colors[clr.Border]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.BorderShadow]         = ImVec4(0.00, 0.00, 0.00, 0.00)
            colors[clr.FrameBg]              = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.FrameBgHovered]       = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.FrameBgActive]        = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.TitleBg]              = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.TitleBgActive]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.TitleBgCollapsed]     = ImVec4(0.00, 0.00, 0.00, 0.51)
            colors[clr.MenuBarBg]            = ImVec4(0.11, 0.11, 0.11, 1.00)
            colors[clr.ScrollbarBg]          = ImVec4(0.06, 0.06, 0.06, 0.53)
            colors[clr.ScrollbarGrab]        = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ScrollbarGrabHovered] = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.ScrollbarGrabActive]  = ImVec4(0.81, 0.83, 0.81, 1.00)
            colors[clr.CheckMark]            = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.SliderGrab]           = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SliderGrabActive]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.Button]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.ButtonHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ButtonActive]         = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.Header]               = ImVec4(0.51, 0.36, 0.15, 1.00)
            colors[clr.HeaderHovered]        = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.HeaderActive]         = ImVec4(0.93, 0.65, 0.14, 1.00)
            colors[clr.Separator]            = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.SeparatorHovered]     = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.SeparatorActive]      = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.ResizeGrip]           = ImVec4(0.21, 0.21, 0.21, 1.00)
            colors[clr.ResizeGripHovered]    = ImVec4(0.91, 0.64, 0.13, 1.00)
            colors[clr.ResizeGripActive]     = ImVec4(0.78, 0.55, 0.21, 1.00)
            colors[clr.CloseButton]          = ImVec4(0.47, 0.47, 0.47, 1.00)
            colors[clr.CloseButtonHovered]   = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.CloseButtonActive]    = ImVec4(0.98, 0.39, 0.36, 1.00)
            colors[clr.PlotLines]            = ImVec4(0.61, 0.61, 0.61, 1.00)
            colors[clr.PlotLinesHovered]     = ImVec4(1.00, 0.43, 0.35, 1.00)
            colors[clr.PlotHistogram]        = ImVec4(0.90, 0.70, 0.00, 1.00)
            colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
            colors[clr.TextSelectedBg]       = ImVec4(0.26, 0.59, 0.98, 0.35)
            colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
        end
 end
а че так не сделать?