Demo at work:
Download:
API: pastebin get UQM4T3J3 programs.lua
DEMO: pastebin get HiqdSExG demo.lua
To try it out, just download the api and run the demo
I actually made this with my coming OS in mind. Sure, give it a go!nice work ;)/> looks pretty cool.
Would it be ok if I use this in my OS? I surely will credit you
<greedy me>
It only costs one upvote!
</greedy me>
Upvote? Sorry i‘m not so often here..
the little green arrow in the bottom right of posts (your posts won't have one as you cannot upvote your own post).
function drawWindows()
while true do
local event, var1, var2, var3 = os.pullEventRaw()
if event == "terminate" then end
windows.update(kernel.programs, event, var1, var2, var3)
end
end
function taskBar()
windows.new(function()
shell.run("/PowerOS/sys/taskBar)")
end, 9, 1, 35, 2)
end
function drawDesktop()
opscy.drawColor(colors.white)
table.insert(kernel.programs, taskBar())
end
I tried to add this windows system to my OS and now I stuck at making a window handler.
- snip -
I need more of your code to help you. What does windows.update and windows.new do?
local windows = require(TheApiPath)
local program = require(TheApiPath)
Oops, I didn't spot that. I havn't worked with this api for quite some time, so I didn't notice.I need more of your code to help you. What does windows.update and windows.new do?
Uhh.. it's from your window API i just didlocal windows = require(TheApiPath)
instead oflocal program = require(TheApiPath)
It was all of my code that I posted which is for handling the Windows
function taskBar()
return windows.new(function()
shell.run("/PowerOS/sys/taskBar)")
end, 9, 1, 35, 2)
end
Oops, I didn't spot that. I havn't worked with this api for quite some time, so I didn't notice. Your issue is that the taskBar function never returns anything. Here is the fixed code:Uhh.. it's from your window API i just didI need more of your code to help you. What does windows.update and windows.new do?instead oflocal windows = require(TheApiPath)
It was all of my code that I posted which is for handling the Windowslocal program = require(TheApiPath)
function taskBar() return windows.new(function() shell.run("/PowerOS/sys/taskBar)") end, 9, 1, 35, 2) end