diff --git a/.DS_Store b/.DS_Store index b4a1a0b2..164a0983 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Applications.txt b/Applications.txt index 8d4094fc..3316ef66 100644 --- a/Applications.txt +++ b/Applications.txt @@ -838,7 +838,7 @@ type="Application", icon="IgorTimofeev/OpenComputers/master/Applications/Stargate/Icon.pic", createShortcut="desktop", - version=1.02, + version=1.03, resources={ { name="Gate.pic", @@ -873,7 +873,7 @@ type="Application", icon="IgorTimofeev/OpenComputers/master/Applications/MineCode2/Icon.pic", createShortcut="desktop", - version=1.01, + version=1.02, }, { name="MineOS/Applications/Battleship", diff --git a/Applications/.DS_Store b/Applications/.DS_Store index 2f61c85e..e3f387a2 100644 Binary files a/Applications/.DS_Store and b/Applications/.DS_Store differ diff --git a/Applications/MineCode2/MineCode.lua b/Applications/MineCode2/MineCode.lua old mode 100644 new mode 100755 index ac4fe401..8096c144 --- a/Applications/MineCode2/MineCode.lua +++ b/Applications/MineCode2/MineCode.lua @@ -1,31 +1,17 @@ --- _G.syntax = nil --- _G.filemanager = nil --- _G.doubleBuffering = nil -- package.loaded.doubleBuffering = nil -- package.loaded.syntax = nil --- package.loaded.filemanager = nil -- Адаптивная загрузка необходимых библиотек и компонентов -local libraries = { - ecs = "ECSAPI", - fs = "fs", - syntax = "syntax", - buffer = "buffer", - unicode = "unicode", - context = "context", - event = "event", - component = "component", - filemanager = "filemanager", -} - -local components = { - gpu = "gpu", -} - -for library in pairs(libraries) do if not _G[library] then _G[library] = require(libraries[library]) end end -for comp in pairs(components) do if not _G[comp] then _G[comp] = _G.component[components[comp]] end end -libraries, components = nil, nil +local ecs = require("ECSAPI") +local fs = require("filesystem") +local syntax = require("syntax") +local buffer = require("doubleBuffering") +local unicode = require("unicode") +local context = require("context") +local event = require("event") +local component = require("component") +local gpu = component.gpu --------------------------------------------------- Константы ------------------------------------------------------------------ @@ -39,7 +25,6 @@ local fromString = 1 local fromSymbol = 1 local scrollSpeed = 8 local showLuaSyntax = true -local showFilemanager = true local xCursor, yCursor = 1, 1 local textFieldPosition @@ -73,7 +58,6 @@ local topButtonsSymbols = { local sizes = { yTopBar = 2, topBarHeight = 3, - filemanagerWidth = math.floor(buffer.screen.width * 0.16), } --------------------------------------------------- Функции ------------------------------------------------------------------ @@ -81,13 +65,8 @@ local sizes = { local function recalculateSizes() sizes.yCode = sizes.yTopBar + sizes.topBarHeight sizes.codeHeight = buffer.screen.height - 1 - sizes.topBarHeight - if showFilemanager then - sizes.codeWidth = buffer.screen.width - sizes.filemanagerWidth - sizes.xCode = sizes.filemanagerWidth + 1 - else - sizes.codeWidth = buffer.screen.width - sizes.xCode = 1 - end + sizes.codeWidth = buffer.screen.width + sizes.xCode = 1 end --Объекты для тача @@ -215,15 +194,11 @@ end -- end -local function drawFileManager() - filemanager.draw(1, sizes.yCode, sizes.filemanagerWidth, buffer.screen.height - 4, fs.path(pathToFile), 1) -end local function drawAll(force) drawTopBar() drawInfoPanel() drawTopMenu() - if showFilemanager then drawFileManager() end drawCode() buffer.draw(force) end diff --git a/Applications/Stargate/Stargate.lua b/Applications/Stargate/Stargate.lua index 297521b9..6d0344c4 100755 --- a/Applications/Stargate/Stargate.lua +++ b/Applications/Stargate/Stargate.lua @@ -1,4 +1,5 @@ +local ecs = require("ECSAPI") local fs = require("filesystem") local image = require("image") local buffer = require("doubleBuffering") diff --git a/lib/MineOSCore.lua b/lib/MineOSCore.lua index 07936e2a..7a434787 100755 --- a/lib/MineOSCore.lua +++ b/lib/MineOSCore.lua @@ -567,7 +567,7 @@ function MineOSCore.safeLaunch(path, ...) local function launchMethod() loadSuccess(table.unpack(args)) end - + local function tracebackMethod(xpcallTraceback) local traceback, info, firstMatch = xpcallTraceback .. "\n" .. debug.traceback() for runLevel = 0, math.huge do