1
0
mirror of https://github.com/kepler155c/opus synced 2026-05-17 19:02:10 +00:00

Initial commit

This commit is contained in:
kepler155c@gmail.com
2016-12-11 16:36:36 -05:00
parent fc243a9c12
commit 46d0c8d43d
6 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
# test
# Opus OS for computercraft
+1
View File
@@ -1,5 +1,6 @@
local function follow(id)
require = requireInjector(getfenv(1))
local GPS = require('gps')
local Socket = require('socket')
local Point = require('point')
+1
View File
@@ -1,4 +1,5 @@
turtle.run(function()
require = requireInjector(getfenv(1))
local GPS = require('gps')
local Socket = require('socket')
+1
View File
@@ -1,5 +1,6 @@
local function summon(id)
require = requireInjector(getfenv(1))
local GPS = require('gps')
local Socket = require('socket')
local Point = require('point')
+1
View File
@@ -1,4 +1,5 @@
local json = require('json')
local Util = require('util')
local TREE_URL = 'https://api.github.com/repos/%s/%s/git/trees/%s?recursive=1'
local FILE_URL = 'https://raw.github.com/%s/%s/%s/%s'
+5 -3
View File
@@ -1590,9 +1590,11 @@ end
function UI.ViewportWindow:setScrollPosition(offset)
local oldOffset = self.offy
self.offy = math.max(offset, 0)
local max = self.height
for _, child in ipairs(self.children) do
max = math.max(child.y + child.height - 1, max)
local max = self.ymax or self.height
if self.children then
for _, child in ipairs(self.children) do
max = math.max(child.y + child.height - 1, max)
end
end
self.offy = math.min(self.offy, max - self.height)
if self.offy ~= oldOffset then