local imgui = require 'imgui'
local window = imgui.ImBool(false)
function main()
sampRegisterChatCommand('imgui', function() window.v = not window.v end)
while true do
wait(0)
imgui.Process = window.v
end
end
function imgui.OnDrawFrame()
imgui.Begin('Test window', window)
imgui.BeginChild('##1', imgui.ImVec2(200, 50), true)
imgui.Text('First child')
imgui.Text('Standart Child BackGround')
imgui.EndChild()
imgui.PushStyleColor(imgui.Col.ChildWindowBg, imgui.ImVec4(0.48, 0.48, 0.48, 1.00))
imgui.BeginChild('##2', imgui.ImVec2(200, 50), true)
imgui.Text('Secondary child')
imgui.Text('Custom Child BackGround')
imgui.EndChild()
imgui.PopStyleColor(1)
imgui.BeginChild('##3', imgui.ImVec2(200, 50), true)
imgui.Text('Third child')
imgui.Text('Standart Child BackGround')
imgui.EndChild()
imgui.End()
end
function theme()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
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)
end
theme()