Commit 719eddd6 authored by Danny SMc's avatar Danny SMc

Updated thread creator

parent aaa4e879
--[[
Name: apps.all
Desc: All apps screen function
--]]
function program.apps.all()
base.screen.color("white")
program.draw.menubar("All Apps")
local scroll = 0
local function redraw(scroll)
end
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
elseif args[1] == "mouse_click" then
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then -- Scroll up
if not scroll == 0 then
scroll = scroll-1
redraw(scroll)
end
elseif args[2] == 1 then -- Scroll down
if not scroll == 3+items then
scroll = scroll+1
redraw(scroll)
end
end
end
end
end
--]]
\ No newline at end of file
......@@ -374,7 +374,7 @@ function program.main.home()
-- ["icon_name"] = "logout";
-- ["base_func"] = "account";
-- ["func_name"] = "logout";
["thrd_name"] = "Logout";
-- ["thrd_name"] = "Logout";
-- };
{
["icon_name"] = "appStore";
......@@ -489,20 +489,68 @@ function program.main.home()
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 4 and args[4] <= 7) then
local current = cpage + 2
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 4 and args[4] <= 7) then
local current = cpage + 3
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 3 and args[3] <= 16) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 4
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 5
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 6
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 3 and args[3] <= 16) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 7
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 8
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 9
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
end
end
elseif args[1] == "mouse_scroll" then
......
......@@ -130,20 +130,68 @@ function program.main.home()
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 4 and args[4] <= 7) then
local current = cpage + 2
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 4 and args[4] <= 7) then
local current = cpage + 3
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 3 and args[3] <= 16) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 4
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 5
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 9 and args[4] <= 12) then
local current = cpage + 6
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 3 and args[3] <= 16) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 7
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 19 and args[3] <= 32) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 8
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
elseif (args[3] >= 35 and args[3] <= 48) and (args[4] >= 14 and args[4] <= 17) then
local current = cpage + 9
if #iconnames >= current then
if not base.thread.find(iconnames[current]["thrd_name"]) then
base.thread.create(iconnames[current]["thrd_name"], program[iconnames[current]["base_func"]][iconnames[current]["func_name"]]);
end
base.thread.switch(iconnames[current]["thrd_name"])
end
end
end
elseif args[1] == "mouse_scroll" then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment