1
0
mirror of https://github.com/kepler155c/opus synced 2026-01-11 01:19:05 +00:00
This commit is contained in:
kepler155c@gmail.com
2017-04-05 12:35:03 -04:00
parent 72bd16502b
commit 6754eb98d3
3 changed files with 33 additions and 15 deletions

View File

@@ -86,7 +86,15 @@ function methodsPage:enable(p)
self.peripheral = p or self.peripheral
local p = peripheral.wrap(self.peripheral.side)
if not p.getAdvancedMethodsData then
if p.getDocs then
self.grid.values = { }
for k,v in pairs(p.getDocs()) do
table.insert(self.grid.values, {
name = k,
doc = v,
})
end
elseif not p.getAdvancedMethodsData then
self.grid.values = { }
for name,f in pairs(p) do
table.insert(self.grid.values, {
@@ -134,6 +142,12 @@ function methodsPage.viewportConsole:draw()
return 2
end
if method.doc then
c:print(method.doc, nil, colors.yellow)
c.ymax = c.cursorY + 1
return
end
if method.description then
c:print(method.description)
end