local imgui = require 'imgui'
local key = require 'vkeys'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local main_window_state = imgui.ImBool(false)
math.randomseed(os.time())
function imgui.OnDrawFrame()
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(150, 200), imgui.Cond.FirstUseEver)
imgui.Begin('My window', main_window_state)
imgui.TextColored(imgui.ImVec4(math.random(0,1), math.random(0,1), math.random(0,1), 1.0), u8'Алёша')
imgui.End()
end
end
function main()
while true do wait(0)
if wasKeyPressed(key.VK_X) then main_window_state.v = not main_window_state.v end
imgui.Process = main_window_state.v
end
end