local imgui = require 'mimgui'
local WinState = imgui.new.bool(1)
local cTab = 1
imgui.OnFrame(function() return WinState[0] end, function(player)
imgui.SetNextWindowPos(imgui.ImVec2(500,500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(245, 270), imgui.Cond.Always)
imgui.Begin('##Window', WinState, imgui.WindowFlags.NoResize)
imgui.customTabs({'One','Two','Three'}, 0x700000FF)
imgui.Text(tostring(cTab))
imgui.End()
end)
function imgui.customTabs(buttons, color)
local dl = imgui.GetWindowDrawList()
imgui.PushStyleColor(imgui.Col.Button, imgui.ImVec4(0,0,0,0))
imgui.PushStyleColor(imgui.Col.ButtonHovered, imgui.ImVec4(0,0,0,0.10))
imgui.PushStyleColor(imgui.Col.ButtonActive, imgui.ImVec4(1,1,1,0.05))
for k, v in pairs(buttons) do
local p = imgui.GetCursorScreenPos()
if imgui.Button(v,imgui.ImVec2(130,40)) then cTab = k end
if k == cTab then
dl:AddRectFilled(imgui.ImVec2(p.x,p.y+10), imgui.ImVec2(p.x+4,p.y+30), color, 5);
end
end
imgui.PopStyleColor(3)
end