From 6fe20212da8ffd39c90897d662d42ce4d64cf7c4 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Mon, 9 Jan 2017 21:57:24 +0300 Subject: [PATCH] aefaef --- .DS_Store | Bin 18436 -> 18436 bytes Applications.txt | 4 +-- Applications/.DS_Store | Bin 77828 -> 77828 bytes Applications/MineCode2/MineCode.lua | 47 +++++++--------------------- Applications/Stargate/Stargate.lua | 1 + lib/MineOSCore.lua | 2 +- 6 files changed, 15 insertions(+), 39 deletions(-) mode change 100644 => 100755 Applications/MineCode2/MineCode.lua diff --git a/.DS_Store b/.DS_Store index b4a1a0b251c4ff0d640666393788c5237146f252..164a098331d2cd09ee5ef60a564b648cb4eaca79 100644 GIT binary patch delta 500 zcmXYtOKTHR0EOq%f)luso212NRB9up(S{~{L`cxqN|9(S6dN_th{VjKrcDzuwQ6-4 z#kkPwMO1L3h!2X7GE}=1{R?sF%AMfSjnv1aW_!-zoR3poq`JtveG;GAFYOjzs}SmY zcu%12a@F0^<8AjFB4cLftg*6L$QLYAuIT?AwY(0*#awBOnv?JqiQY@r=L0eXlKCC(rR80H|O zjB|_$Qk*7-MV=|nbD0IMa*gZU<}UY8JZ6d4yx}dYeB!gJdDELZl82AD#fTb`PgKn} zt>!~PxAV`|&VUe7^Wc1@mO^Lrk**FQ(OnMU_+$?Q&iEmc&h$~nI6<08GR}OSb4)Ws zk&9g7$~r=o8{DMEEeGK~4|vEUp7M<6yx=9v*sSoL4}5Gu*@?DSLXY*w!#jH8Q58uf j?fyWhg*7`9T;0H$$^-}PiQRRn#|HWunLay`__FyQkj;OR delta 628 zcmYL_OK1~89LD$S!_MGHCs9iiSA;Y+Mq;THil&XW6{0qcEi|>&#NyiB%GNw;H`e-q zUg9HySQt?R#i%HHsv3(`5Y&@L4>@`A>|H@GI=fr&GVuStdHsH+C6t!%vX`Sp#CTO` z+jlP3XezJej9N4Ic$v??h4K}W(Y2zHEa>L6Y3NSl_xZOGlD6{$bB0{qm<9Yn$~BU* z%!_MRgjkqzi>A()`L&}F)vBM*jb|`UyE^H~qS9=;GFWq~s+soHI#fiaeP4AnT;oo4K6-P*KVPez AU;qFB 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 2f61c85ef68eaeef753a380bd20e5fb51d60785d..e3f387a2ff63783e8239996b57a2fae6b84c34d8 100644 GIT binary patch delta 167 zcmZp9z|!)7WkYv4hpDlpj)I}3!Q_Vy9-D8MZ{SB0X%8~uFf}m(sWAennOwU|ZhN^n zV<^+)#GS&M8;#5vw~I(K>N8Gm-`_H^L2fhmf#duWt1LHjUx3mNp!5eYy_K60OmF8F ZV7$YIY_!*QOL4}T96-I>xfQ^Qi~u%LJih<{ delta 221 zcmZp9z|!)7WkYxQEFK+qnf8@2~-#7_{9|oN*=xviaM&6;M@c0RTXNb_xIh 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