Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Fixes for #146.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed May 3, 2020
1 parent 86b35ad commit 9cd0b96
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function PixelVisionOS:CloseModal()

RestoreTilemapCache()

self.modalCloseDelay = .25
self.modalCloseDelay = .15
self.modalCloseTime = 0

self.activeModal = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end

function WorkspaceTool:StartFileOperation(srcPath, destPath, action)

-- print("StartFileOperation", srcPath, destPath)
-- print("StartFileOperation", srcPath, destPath, action)

-- Test to see if the action is delete
if(action == "delete") then
Expand All @@ -92,7 +92,7 @@ function WorkspaceTool:StartFileOperation(srcPath, destPath, action)
-- Figure out the final path for the file
local finalDestPath = NewWorkspacePath(destPath.Path .. filePath.Path:sub(#srcPath.Path + 1))

-- print("filePath", filePath.Path, destPath.Path, finalDestPath.Path)
print("filePath", filePath.Path, destPath.Path, finalDestPath.Path)

if(filePath.isDirectory and filePath.Path == destPath.Path) then

Expand Down
12 changes: 8 additions & 4 deletions Disks/PixelVisionOS/System/Tools/WorkspaceTool/code-window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,9 @@ end

function WorkspaceTool:FileDropAction(src, dest)

-- print("drop",self.currentPath.path, src.iconPath, src.iconPath.parentPath, dest.iconPath)

local srcPath = src.iconPath.parentPath
-- build a list of files to process
local destPath = dest.iconPath

Expand Down Expand Up @@ -857,7 +860,7 @@ function WorkspaceTool:FileDropAction(src, dest)

local action = "move"

local srcSeg = self.currentPath.GetDirectorySegments()
local srcSeg = srcPath.GetDirectorySegments()
local destSeg = destPath.GetDirectorySegments()

if(srcSeg[1] == "Tmp" and srcSeg[2] == "Trash") then
Expand All @@ -872,19 +875,20 @@ function WorkspaceTool:FileDropAction(src, dest)
return

else
print("Trash")
-- print("Trash")
action = "throw out"
end
elseif(srcSeg[1] == "Disks" and destSeg[1] == "Disks") then
if(srcSeg[2] ~= destSeg[2]) then
-- print("Copy")
action = "copy"
end
elseif(srcSeg[1] ~= destSeg[1]) then
action = "copy"
end

-- Perform the file action
self:StartFileOperation(self.currentPath, destPath, action)
self:StartFileOperation(srcPath, destPath, action)

end

Expand Down Expand Up @@ -1056,7 +1060,7 @@ function WorkspaceTool:GetDirectoryContents(workspacePath)

local srcSeg = workspacePath.GetDirectorySegments()

print("ValidateGameInDir", dump(srcSeg))
-- print("ValidateGameInDir", dump(srcSeg))

local totalSeg = #srcSeg

Expand Down
5 changes: 4 additions & 1 deletion Disks/PixelVisionOS/System/Tools/WorkspaceTool/saves.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"GameChip":
{
"savedData":{

"sessionID": "202005030916473679",
"scrollPos": "0",
"selection": "10",
"lastPath": "/Workspace/NewProjectB/"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected void CallStep()

try
{
Console.WriteLine("calling " + stepQueue[currentStep]);
// Console.WriteLine("calling " + stepQueue[currentStep]);
LuaScript.Call(LuaScript.Globals[stepQueue[currentStep]]);
StepCompleted();
}
Expand Down

0 comments on commit 9cd0b96

Please sign in to comment.