Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
GUI 1 fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
ajh123 committed Aug 21, 2022
1 parent 421b746 commit 13d1705
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ win.blit("\141"..("\140"):rep(w-2).."\142",("8"):rep(w),("f"):rep(w))
t_win.clear()
local old_term = term.redirect(t_win)
local shell_coro = coroutine.create(function()
api.create.button({
local w, h = term.getSize()
local gui = api.create_gui(g_win)
local frame = gui.create.frame({
x=0,y=0,width=w,height=h,
dragger={x=0,y=0,width=0,height=0}
})
local sGui = frame.child
sGui.create.button({
x=5,y=6,width=10,height=3,
background_color=colors.green,
text=gui.text{
Expand All @@ -105,6 +112,7 @@ local shell_coro = coroutine.create(function()
os.reboot()
end
})
gui.execute()
end)
local function update_shell()
sleep(0.05)
Expand Down

0 comments on commit 13d1705

Please sign in to comment.