Latest Update:
Fixed a mass of bugs with the application and re-designed the ticket list layout.
Bugs/Errors:
Bug reports are welcomed and can be submitted here http://git.dannysmc....coverApp/issues (just make an account) or submitted in the tickets section on the DiscoverApp.
Discover App Vs. Discover App Store
Well for one, as you may know, I have an online system of integrated API's that are available for anyone to use, well the Discover App Store was actually using all of these API's at once, and it started becoming less and less based around an App Store, and more of a base application for the Discover Network. So after some thought I have decided to actually re-make the Discover App Store into the Discover Network Base App. So the DiscoverApp uses all the systems that are exposed by the Discover Network API.
About Emails:
Spoiler
I know a lot of users like making random accounts with fake emails and of course it's not a problem, the only thing I have is that emails are used to allow you to recover your account or to send you notifications. So if you do not put your email in there will be a problem when it comes to me having to try and find your account and manually reset it, so my suggestion is to actually add a valid email so when you do forget your password, there is a chance of me finding it!Download:
Just run the following to install the Discover App:
pastebin run MmnFkANZ
Features:
Spoiler
- Intuitive User Interface with Multitasking,
- Should auto-read and import config files from the Discover config file,
- Should auto-check updates
- Account Management, (Login, Logout, Register),
- App Store, with filters like categories, versions, newest, search, packages, downloads etc.
- Commenting system for apps,
- Snippet Store, basic just for holding code snippets,
- Cloud storage, still in beta,
- Mailbox, basic emailing with attachment support.
- Newsfeed (same as old App Store),
- Chat rooms (in alpha, so test a lot),
- Profiles, create your own
- Check out the account management,
- Tickets (use this to submit help or bugs),
- Plugins manager - with support for extending functionality using plugins,
- Settings, is dynamic, lists config options from Internal code,
- Crash management,
- Power options,
Plugins / How they work:
Spoiler
So plugins work as additional extended functionality. Currently there are some callbacks and a few other bits, but nothing that gives a lot of information. I plan to expand the plugins a lot to add more functionality for people who want to have more customised experiences. Plugins were built so that they can add additional content and change the layouts of things add/remove things. This also added the ability for OS owners to be able to install the Discover App (with their own plugins) to customise it to their needs.An example plugin is here: http://git.dannysmc.com/snippets/18
We shall go through how it all works in the comments of the code, one of the things to note is how what I call screens work. In otherwords each time you go to another page, it is called a screen. Each screen is a function with a set of event managers, that control that page, each screen is seperate to any other code to make it easier to manage and it works with my builder program; also helps with using multitasking.
--NOTE Here you can add your own information.
--[[
Name: Example Plugin
Desc: A basic example plugin
Auth: DannySMc
]]
--NOTE This sets the base function and the entry function for the program to call, remember all of these need to be unique, as it does not automatically make them unique yet. For example, Plugin is the base table for all plugins, and example is the example sub array with all that plugins functions in for other pages etc etc. The 'entry' is the function that it will call to initialise the plugin, you can customise it by changing it to what you want, also remember to change 'example' to your app name, no caps, and no hyphens.
-- @base example
-- @func entry
--NOTE This just creates the namespace, make sure to swap example with what you set as @base.
--// Create plugin namespace
Plugin.example = {};
--NOTE This is the core function, the entry initialiser function for your plugin, all start code should be put here.
--// Create init function
function Plugin.example.entry()
--// Sets screen colour
base.screen.colour("lightBlue")
--// Center text and write
base.draw.textc("Initialising Example Plugin", 9, false, "white", "lightBlue")
--// Wait one second
sleep(1)
--// This is the logo for the home menu
--// Quick Image Format Intro: it's 14 x 4 big, each row is a row on the Y and X is each value, inside the row, the value works as so:
--// TEXT-COLOUR : BACKGROUND-COLOUR : CHARACTER: Colours go 0-9 a-f. Characters are anything but make sure you escape anything that needs it.
local exampleicon = {
{"a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: "};
{"a:a: ","a:a: ","a:a: ","a:a: ","0:a:E","0:a:x","0:a:a","0:a:m","0:a:p","0:a:l","0:a:e","a:a: ","a:a: ","a:a: "};
{"a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","0:a:I","0:a:c","0:a:o","0:a:n","a:a: ","a:a: ","a:a: ","a:a: ","a:a: "};
{"a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: ","a:a: "};
};
--NOTE The below two functions allow you to add new icons to the library, and then add a new menu entry to the homepage.
--// Will add the menu icon into the existing icon library
DiscoverApp.Register.MenuIcon("ExamplePlugin", exampleicon);
--// Will register a menu entry to the home page
DiscoverApp.Register.MenuEntry("ExamplePlugin", "example", "new", "NewEx", false);
--NOTE this allows you to interface to the core settings manager for the Discover App. It also allows you to create your own settings and then allow users to edit them, so like colours, or other bits; maybe you want to use the Store to add krist support who knows?
--// Lets create an example setting called: ExampleSetting that has the value of true
DiscoverApp.Settings.Create("ExampleSetting", true);
--// This will save the config
DiscoverApp.Settings.Save();
--// This will reimport the settings;
DiscoverApp.Settings.Reload();
--// So DiscoverApp has callbacks for certain events, so create the functions below you wish to use,
--// Then register the functions like so:
--// Login Callback (runs before the actual login)
DiscoverApp.Callbacks.Register("login", "example", "login")
--// Logout callback (runs before the logout)
DiscoverApp.Callbacks.Register("logout", "example", "logout")
--// Startup callback (runs after plugin import)
DiscoverApp.Callbacks.Register("startup", "example", "startup")
--// Shutdown callback (runs before anything else does)
DiscoverApp.Callbacks.Register("shutdown", "example", "shutdown")
--NOTE On callbacks you can see that there is only 4 callbacks at the moment, there will be more, like when you download an app etc etc, but the first parameter is the callback to attach to, the second is the sub array (so the @base value) and the last one is the function to call, if you scroll down you will see these functions defined.
--// Thread Management
--NOTE This is basic thread management, you can also create background tasks, but I have not perfected the documentation as of yet.
--[[
DiscoverApp.Thread.Create(name, function);
DiscoverApp.Thread.Find(name);
DiscoverApp.Thread.Switch(name);
DiscoverApp.Thread.List();
DiscoverApp.Thread.Remove(name);
]]
end
--// Create actual scree/function
function program.example.new()
--// Set screen colour before drawing menu
base.screen.colour("lightBlue")
--// Set base scroll value
local scroll = 0;
local exampleData = {"Data1";"Data2";"Data3";"Data4";"Data5";"Data6";"Data7";"Data8";"Data9";"Data10";"Data11";"Data12";"Data13";"Data14";"Data15";"Data16";"Data17";"Data18";"Data19";}
--// Draw menubar with title
program.draw.menubar("Example")
--// Render function for on screen drawing, useful when you want to do scrolling etc
local function render(scroll)
base.draw.textc("Nice one! Example plugin is now usable", 19, false, "white", "lightBlue");
for i=1, 14 do
base.draw.box(1, 51, i+3, 1, false, "lightBlue", "lightBlue")
base.draw.texta(tostring(i+scroll) .. " -> " .. tostring(exampleData[i+scroll]), 3, i+3, false, "grey", "lightBlue")
end
--// Lets get our custom setting and output it (remember you can have however many settings you want)
local setting = DiscoverApp.Settings.Retrieve("ExampleSetting")
base.draw.textr(tostring(setting), 10, false, "white", "lightBlue")
end
--// Run render with scroll first to draw screen
render(scroll)
--// Create event loop
while true do
--// Wait/Catch for events
local args = { os.pullEvent() }
--// If the timer event fires redraw menu so the clock works
if args[1] == "timer" then
--// Re-draw menu for clock
program.draw.menubar("Example")
--// On mouse click
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Example", args[3], args[4])
end
--// On mouse scroll
elseif args[1] == "mouse_scroll" then
--// On scroll up
if args[2] == -1 then
--// Check scroll is bigger than 0 otherwise do nothing
if scroll > 0 then
--// Increment scroll value
scroll = scroll -1
--// Redraw screen with scroll
render(scroll)
end
--// On scroll down
elseif args[2] == 1 then
--// If scroll + screensize (usually 14) is smaller than the length of the exampleData count then scroll down
if scroll + 14 < #exampleData then
--// Increment scroll
scroll = scroll + 1
--// Redraw screen with scroll
render(scroll)
end
end
end
end
end
--// Create login callback function
function program.example.login()
base.gui.alert("LOGIN CALLBACK FIRED!");
sleep(1)
end
--// Create logout callback function
function program.example.logout()
base.gui.alert("LOGOUT CALLBACK FIRED!");
sleep(1)
end
--// Create shutdown callback function
function program.example.shutdown()
base.gui.alert("SHUTDOWN CALLBACK FIRED!");
sleep(1)
end
--// Create startup callback function
function program.example.startup()
base.gui.alert("STARTUP CALLBACK FIRED!");
sleep(1)
end
Images are found here:
http://blog.dannysmc...p-beta-release/