local imgui = require 'mimgui'
local WinState = imgui.new.bool(1)
local buttonsArray = {
{'Button1', 'Some text one'},
{'But 2', 'Some text two'},
{'Smsdfs', 'Some te'},
{'rhyrhgf', 'Some txtne'},
{'dfgdr', 'Somtex one'},
{'cvb', 'Somtext one'},
}
local curAct = 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(500, 500), imgui.Cond.FirstUseEver)
imgui.Begin('##Window', WinState)
if imgui.BeginChild('Buttons', imgui.ImVec2(160, 250), true) then
for i = 1, #buttonsArray do
if imgui.Selectable(buttonsArray[i][1], i == curAct) then
curAct = i
end
end
imgui.EndChild()
end
imgui.SameLine()
if imgui.BeginChild('Name 2', imgui.ImVec2(imgui.GetWindowWidth()-190, 250), false) then
imgui.Text(buttonsArray[curAct][1])
imgui.Separator()
imgui.Text(buttonsArray[curAct][2])
imgui.EndChild()
end
imgui.End()
end)