local imgui = require 'imgui'
local key = require 'vkeys'
local window = imgui.ImBool(false)
local inp = imgui.ImInt(1)
function imgui.OnDrawFrame()
if window.v then
imgui.Begin('My window', window)
if imgui.InputInt('inputint', inp, 1, 10) then
inp.v = inp.v < 1 and 1 or
inp.v > 256 and 256 or inp.v
end
for i = 1, inp.v do
imgui.Text('Hello world '..i)
end
imgui.End()
end
end
function main()
while true do wait(0)
imgui.Process = window.v
if wasKeyPressed(key.VK_X) then
window.v = not window.v
end
end
end