- Версия MoonLoader
- .026-beta
Как сделать чтобыть при нажатие на кнопку 1 окна закрывалось 1 окно открывалось 2 окно и по нажатие клавиши можно было спрятать
Есть такой код
Есть такой код
Lua:
local imgui = require 'imgui'
local main_window_state = imgui.ImBool(false)
function imgui.OnDrawFrame()
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(150, 200), imgui.Cond.FirstUseEver)
imgui.Begin('Gos cost ', main_window_state)
imgui.Text('State cost of accessories')
if imgui.Button('GO') then
printStringNow('DONE!', 1000)
if boolcheck.v then
imgui.Begin("2 window")
end
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