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)
local ss = imgui.ImBuffer(512)
local xz = imgui.ImInt(0)
function imgui.OnDrawFrame()
if main_window_state.v then
imgui.Begin('Test',main_window_state)
imgui.RadioButton(u8"Выключить", xz, 1)
imgui.RadioButton(u8"Включить", xz, 2)
imgui.SameLine()
if xz.v == 2 then
imgui.PushItemWidth(250)
imgui.InputText(u8' ', ss)
imgui.PopItemWidth()
end
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