Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------
- -- This program was designed for --
- -- the Minecraft mod ComputerCraft --
- -------------------------------------
- -----------------------------------
- -- WARNING --
- -- This program is not meant to --
- -- be downloaded. --
- -- To install CyberOS on your --
- -- ComputerCraft device just run --
- -- the following line on it: --
- -- pastebin run qJSSf0qg --
- -----------------------------------
- -----------------------------------
- -- COMPUTER API --
- -- This is the superclass of all --
- -- "Computer" devices. --
- -- It handles all the common --
- -- computer stuff (mainly --
- -- computer-specific apps). --
- -----------------------------------
- class = {}
- class.__index = class
- setmetatable(class, {__index = CyberOs.class})
- function class:initDeviceApi()
- print("Implement something in initDeviceApi")
- end
- function class:drawIcons(icons)
- for i, name in ipairs(icons) do
- if i<15 then
- img = loadImageTheme("App"..name)
- paintutils.drawImage(img,3+10*((i-1)%5),4+math.floor((i-1)/5)*6)
- CyberAPI.blit(name, "0", "f",3+10*((i-1)%5)+math.floor((7-string.len(name))/2), 8+math.floor((i-1)/5)*6)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement