After dropping the development of Frames a few months ago, I decided to make a successor for newer versions of computercraft. Although it has quite the same interface and functionality as Frames, it has different (and I hope better) code.
Little screenshot
Above: a craftOS-shell running lua
Below: the Taskforce taskbar with 3 tabs
Features
- Works on all sizes of displays, colored/non colored, even works on external monitors
- Has a windowmanager called 'tabland' that renders tabs, a taskbar and allows you to switch tabs with the TAB-key
- Has 'craftemu' which emulates the CraftOS shell, so you can run normal programs in a Taskforce tab.
- Mouse support for the taskbar
Upcoming Features
- Right-click menu for Tabs, with close and other API-programmable options.
- There will be a start-menu (letters 'tf') that works like a normal tab (Like the 'new tab' option in google chrome),
but I don't know exactly what I must put in there.
- The start-menu will have a right-click menu, so you can quickly shutdown, start a new shell Tab etc…
Instructions
- Run taskforce, press TAB to change tabs.
- Hold CRTL+T to exit Taskforce
NOTE: use "taskforce d" to enable debug labels
Download Latest version
Preview 3
http://pastebin.com/eBw7Mp2G
Changelog
- Preview 1 released
- Fixed term.clear bug in preview 2
- Added start menu, updated tabland to support mouseclicks in preview 3
API Documentation
Spoiler
API Documentationgrab
Low-level event grabber. It pulls events and then forwards the event to each of its 'event processors'.
After that it calls the 'renderer' and then it pulls another event.
local processor = grab.createProcessor()
Returns a new 'event processor'. After creating one you must define the key 'execute' with a function like so:
processor.label = "Something"
Define the label of the processor. Optional
processor.execute = function(…) end
Define the execute function of the processor. This will be called every time a new event comes, with the event as argument.
processor.kill()
Destroys a processor when it should be executed anymore.
grab.rendername = "Something"
Define the name of the renderer. Optional. Note there can only be one renderer.
grab.renderer = function(…) end
The renderer is called after the event processors have been called. The event is the argument.
grab.go()
Call this after the processors and renderer are ready. It will pull events and forward them to the processors, and call the renderer.
Hold CTRL+T to break the loop and return.
Here is an example of a redstone program:
Spoiler
local pro1 = grab.createProcessor()
pro1.label = "redstone forwarder"
pro1.execute = function(...)
rs.setOutput("left",rs.getInput("right"))
end
local pro2 = grab.createProcessor()
pro2.label = "redstone inverter"
pro2.execute = function(...)
rs.setOutput("front",not rs.getInput("back"))
end
grab.go()
License
Taskforce is public domain. This means you are free to use (parts of) the code in your own program.
Please report bugs and give me feedback, thanks :)/>