turtle5204

DeltaOS Docs

Jul 18th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. Working with DeltaOS:
  2.  
  3. DeltaOS comes packed with developer apis,
  4. read this if you want to take advantage
  5. of these APIS!
  6.  
  7. Installer - pastebin run 9FiUs9pZ
  8.  
  9. [] = Required
  10. {} = Optional
  11. ==
  12. GRAPHICS API
  13.  
  14.  
  15. graphics.reset({bgColor}, {textColor})
  16. Pretty simple. Resets the screen, with the background color/text if specified.
  17. bgColor can be nil if you want to only change the text color.
  18.  
  19. graphics.drawLine([y], [color])
  20. Draws a line across that Y coordinate with the color specified.
  21.  
  22. graphics.drawImage([x], [y], [imagePath])
  23. I don't need to explain this.
  24. ==
  25. SHA256 API
  26.  
  27. sha256.hash([text])
  28. Hashes string TEXT with SHA256. Returns the hashed string.
  29.  
  30. sha256.sHash([text], [salt])
  31. Hashes string TEXT with SHA256 and the hash SALT
  32. ==
  33. USERS API
  34.  
  35. users.getUserName()
  36. Gets the logged in user.
  37.  
  38. users.getPassword([user])
  39. Returns the password of user.
  40. Always returns a hashed password.
  41.  
  42. users.isUser([user])
  43. I don't need to explain this.
  44.  
  45. users.isRoot([user])
  46. Still don't need to explain this.
  47. ==
  48. Icons API
  49.  
  50. icons.addIcon([progPath], [iconPath], [name], {x}, {y})
  51. Adds an icon to the desktop.
  52.  
  53. icons.removeIcon([iconName])
  54. This explains itself.
  55. ==
  56. Settings API
  57.  
  58. settings.getSetting([settingName], {settingNumber})
  59. Returns the setting. Will return a table if there is no settingNumber,
  60. will return string/number if there is settingNumber
  61.  
  62. settings.addSetting([settingName], [settingNumber], [newValue])
  63. Creates/Changes a setting.
Advertisement
Add Comment
Please, Sign In to add comment