From b060198a3e0d9efe1fb08b9bca53fe7e489a2ac5 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Fri, 6 Jan 2017 20:40:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=81=D1=8C=D0=BA=D0=B0!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MineOS/OS.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/MineOS/OS.lua b/MineOS/OS.lua index 07144bdc..aa4aef65 100755 --- a/MineOS/OS.lua +++ b/MineOS/OS.lua @@ -58,7 +58,7 @@ local sizes = { ySpaceBetweenIcons = 1, } -local currentWorkpathHistoryIndex, workpathHistory = 1, {"/"} +local currentWorkpathHistoryIndex, workpathHistory = 1, {MineOSCore.paths.desktop} local workspace local currentDesktop, countOfDesktops = 1 @@ -101,8 +101,14 @@ local function updateDesktopCounters() table.remove(workpathHistory, #workpathHistory) changeWorkpath(#workpathHistory) workspace.updateFileList() - end - x = x + 3 + end; x = x + 3 + end + if workpathHistory[currentWorkpathHistoryIndex] ~= "/" then + workspace.desktopCounters:addButton(x, 1, 4, 1, nil, 0xEEEEEE, nil, 0x888888, "Root").onTouch = function() + table.insert(workpathHistory, "/") + changeWorkpath(#workpathHistory) + workspace.updateFileList() + end; x = x + 6 end for i = 1, countOfDesktops do workspace.desktopCounters:addButton(x, 1, 1, 1, nil, i == currentDesktop and 0xEEEEEE or 0xBBBBBB, nil, 0x888888, "●").onTouch = function() @@ -110,8 +116,7 @@ local function updateDesktopCounters() currentDesktop = i workspace.updateFileList() end - end - x = x + 3 + end; x = x + 3 end end