This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Konlab's profile picture

Multiselection file browser - Lattice

Started by Konlab, 13 August 2015 - 08:53 AM
Konlab #1
Posted 13 August 2015 - 10:53 AM
Looking for a file browser with many functions?
Try Lattice!
Pre 1.0 released! But instead of releasing 1.0 I am working on a completly new Lattice - Lattice 1.1, which will sandbox itself better, it will have multitasking - windowed and tabbed at the same time, it will support file extensions and it will have custom file-metadata! I'm working on Lattice, but if you want to make it priority #1 on my CC todo list please vote in the poll.
Screenshots:
Detail view:

Multiselection options:

The "+" menu:

Prompt when trying to drag&release a file into a dir:

Old screenies (similar to current version, old theme), theres more of them!
SpoilerMy root in list view, currently multi-selecting 4 files/dirs:

File options:

Dir options:

Options (accessible by clicking the "+" button or by right-clicking empty)

Of course, you can multiselect and right click in ALL VIEWS!
More: visit http://imgur.com/a/3LCcq

Download:

Pre 1.0a - pastebin get 5A2xujvw Lattice
or pastebin

Changelog:
SpoilerPre 1.0a - pastebin get 5A2xujvw Lattice
Code stabilized, added file sorting, new default theme! Fixed some bugs, new hotkey for toggling view: "O" (the letter)
File dragging added

Beta 1.0i - pastebin get JG7pvHpM Lattice
Added theme support #1

Beta 1.0h - pastebin get z3gZXxba Lattice
GUI rework #2:
Added "Views" - list, detail and icon views
Fixed scrolling and other bugs
Download file now makes a request first, before downloading

Beta 1.0g - pastebin get dExXjLe9 Lattice
GUI rework #1, right click menus, new hotkeys

Beta 1.0f - pastebin get k7e55GJ9 Lattice
reduced flickering and fixed file finding

Beta 1.0e - pastebin get tPAdEqgB Lattice
first fully working version of multiselection

Beta 1.0d - pastebin get pB7KR4mU Lattice
fix + more multiselect functions

Beta 1.0c - pastebin get RxihHjH4 Lattice
More hotkeys, fixes and first version of multi-selection (buggy, not done)

Beta 1.0b - pastebin get 0PQKdFwC Lattice
added hotkeys, find file (buggy in this version)

Beta 1.0 - pastebin get JrFU5u4J FileBrowser
First release that crashes - fix by LDDestroirer: http://pastebin.com/4JztmQ8N - thanks!
If you find bugs or have suggestions please reply!

​Features:
GUI, with click support
double-click support
right click menus
PDA support
All basic features (delete, move, copy, rename, new file/dir, run, edit, paint, open with… and more!)
Download files from pastebin or other whitelisted websites
Find file with wildcards
Multi selection
Browsing history with back button
Hotkey support
Tap the bar showing the path to change path directly
3 different views: list, detail, icon
Optional arguments when running in shell to set initial directory and sandboxing
Multi copy, move, delete, and rename (replace in name with optional pattern support)
Themes
File sorting
Mouse drag support
Drag files to the top bar to move them into parent directory
and MUCH more…

Credits:
SpoilerKonlab - made the app

LDDestroier - Name suggestion (Lattice)

Thanks to everyone who replied and specially thanks for bug reports and suggestions!

Including it in your OSes:
Just include it, feel free to modify it (if you can, the code is long, that's why will be some concepts changed in next update)

NOTE:
The program doesnt crashes when u try to run it, it was only the original (BETA 1.0a) version, its fixed, so the crash Twijn and everybody else in page 1 is talking about is gone.
Edited on 18 October 2015 - 01:52 PM
Twijn #2
Posted 13 August 2015 - 07:03 PM
Not to be rude or anything but why would you post a program that clearly does not work?
flaghacker #3
Posted 13 August 2015 - 09:59 PM
Not to be rude or anything but why would you post a program that clearly does not work?

That's the point… Tell him your cc version, what happened, when it happened… He's trying to find bugs here!
H4X0RZ #4
Posted 13 August 2015 - 10:08 PM
Not to be rude or anything but why would you post a program that clearly does not work?

That's the point… Tell him your cc version, what happened, when it happened… He's trying to find bugs here!

But then, shouldn't it be in General or AaP? I think the programs section is only for finished programs.
flaghacker #5
Posted 14 August 2015 - 12:12 AM
But then, shouldn't it be in General or AaP? I think the programs section is only for finished programs.

In my opinion, no. General is for program previews without code, and Ask a pro is for asking questions. This post is a release of an unstable program, so it belongs in programs…
Twijn #6
Posted 14 August 2015 - 02:46 AM
But then, shouldn't it be in General or AaP? I think the programs section is only for finished programs.

In my opinion, no. General is for program previews without code, and Ask a pro is for asking questions. This post is a release of an unstable program, so it belongs in programs…

I don't need to say anything. It will error no matter what. Did he not run it before he posted it?

I had to fix 3 errors to get it to work which shouldn't exist on a program in here. And the errors weren't even bugs or anything, it was just bad coding. I almost think that this was the person's first program and he never ran it, he just posted it on here.
Edited on 14 August 2015 - 12:59 AM
Konlab #7
Posted 15 August 2015 - 08:56 AM
I can run it without errors
LeDark Lua #8
Posted 15 August 2015 - 11:21 AM
But then, shouldn't it be in General or AaP? I think the programs section is only for finished programs.

In my opinion, no. General is for program previews without code, and Ask a pro is for asking questions. This post is a release of an unstable program, so it belongs in programs…

I don't need to say anything. It will error no matter what. Did he not run it before he posted it?

I had to fix 3 errors to get it to work which shouldn't exist on a program in here. And the errors weren't even bugs or anything, it was just bad coding. I almost think that this was the person's first program and he never ran it, he just posted it on here.
Ehm dude, he needs to find bugs, could you please post the bugs here and not fix them by yourself?

Error:
BIOS:14: [string "FileBrowser"]:34: '}' expected (to close '{' at line 29)
Just delete the one of the 'end's and then there will be no bugs. atleast for now.
Edited on 15 August 2015 - 09:23 AM
Twijn #9
Posted 15 August 2015 - 04:40 PM
But then, shouldn't it be in General or AaP? I think the programs section is only for finished programs.

In my opinion, no. General is for program previews without code, and Ask a pro is for asking questions. This post is a release of an unstable program, so it belongs in programs…

I don't need to say anything. It will error no matter what. Did he not run it before he posted it?

I had to fix 3 errors to get it to work which shouldn't exist on a program in here. And the errors weren't even bugs or anything, it was just bad coding. I almost think that this was the person's first program and he never ran it, he just posted it on here.
Ehm dude, he needs to find bugs, could you please post the bugs here and not fix them by yourself?

Error:
BIOS:14: [string "FileBrowser"]:34: '}' expected (to close '{' at line 29)
Just delete the one of the 'end's and then there will be no bugs. atleast for now.

I'm not telling him the bugs because they will happen no matter what, all he needs to do is run his program and he will easily be able to see them. If you fix the one you posted then there will be about 1 or 2 more after that
LeDark Lua #10
Posted 15 August 2015 - 05:56 PM
Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.
H4X0RZ #11
Posted 15 August 2015 - 07:07 PM
Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.

Why? How could this program break an emulator in Löve? (e.g. CCLite)
Twijn #12
Posted 15 August 2015 - 07:45 PM
Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.

No, I use the ComputerCraft mod in Minecraft.

There are bugs with this app in everything that uses Lua.
LeDark Lua #13
Posted 15 August 2015 - 07:52 PM
Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.
Why? How could this program break an emulator in Löve? (e.g. CCLite)
Try to run OneOS on CCLite. I get errors every time.

Try to run OneOS on CCEMURedux works fine.

Try to run OneOS on Minecraft CC mod works fine.
Twijn #14
Posted 15 August 2015 - 08:42 PM
Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.
Why? How could this program break an emulator in Löve? (e.g. CCLite)
Try to run OneOS on CCLite. I get errors every time.

Try to run OneOS on CCEMURedux works fine.

Try to run OneOS on Minecraft CC mod works fine.

This is different then those, they are just things that will not work with anything that uses Lua. If you have ran the program then looked at the lines that made errors then you would know that it won't work.
LeDark Lua #15
Posted 15 August 2015 - 08:57 PM
I refered to oeede's "OneOS" operating system or OneOperatingSystem.
CherryPie #16
Posted 16 August 2015 - 07:54 PM
Hmmm. I'm not good at names but what about something like the windows Pathfinder maybe Stringfinder or Filefinder…

I'll let you know if i come up with a better one :)/> Good luck with your program!

Twijn do you use an emulator? If so do you use Love2D emulators? Then there will be bugs with this app.

No, I use the ComputerCraft mod in Minecraft.

There are bugs with this app in everything that uses Lua.

It works for him… Tell him where in the code the problem is so others won't have it because he can't find it.
Twijn #17
Posted 17 August 2015 - 12:16 AM
Anyone that knows Lua, look at this link (which is his code): http://pastebin.com/JrFU5u4J

Lines 29-35. It is what's crashing.
LDDestroier #18
Posted 17 August 2015 - 03:54 AM
I fixed the bug (which was very easy), and fixed the whitespacing so you can look at it better (which was HARD), so just paste this into the pastebin:
Spoiler

local tArgs = { ... }
local home
local root
local clipboard
if #tArgs > 0 then
home = tArgs[1]
else
home = ""
end
if #tArgs > 1 then
root = tArgs[2]
else
root = "/"
end
history = {}
history[1] = root .. home
local w,h = term.getSize()
local function split(inputstr, sep)
if sep == nil then
  sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  t[i] = str
  i = i + 1
end
return t
end
historyclear = function()
history = {}
history[1] = root..home
end
shellcom = {historyclear}
local function diabox(txt)
term.setBackgroundColor(colors.white)
term.setTextColor(colors.black)
paintutils.drawFilledBox(math.floor(w/2-(#txt+2)/2),math.floor(h/2)-2,math.floor(w/2+(#txt+2)/2),math.floor(h/2)+2,colors.white)
term.setCursorPos(math.floor(w/2-(#txt+2)/2)+1,math.floor(h/2)-1)
term.write(txt)
term.setCursorPos(math.floor(w/2-(#txt+2)/2)+1,math.floor(h/2)+1)
end
function readtextbox(txt)
diabox(txt)
return read()
end
function buttonbox(txt,buttons)
if type(buttons) ~= "table" then
  buttons = {{" Yes ",colors.red,colors.white},{" No ",colors.gray,colors.white}}
end
if txt == "" or txt == nil then
  txt = " Are you sure? "
end
local x,y
diabox(txt)
for i=1,#buttons do
  x,y = term.getCursorPos()
  x = math.floor((w/2-(#txt+2)/2)+((#txt+2)/i)*(i-1)) + 1
  term.setCursorPos(x,y)
  term.setBackgroundColor(buttons[i][2])
  term.setTextColor(buttons[i][3])
  term.write(buttons[i][1])  
end
while true do
  local _,b,x2,y2 = os.pullEvent("mouse_click")
  if b == 1 and y == y2 then
   for i=1,#buttons do
	local x = math.floor((w/2-(#txt+2)/2)+((#txt+2)/i)*(i-1)) + 1
	if x2 > x - 1 and x2 < x + #buttons[i][1] then
	 return i
	end
   end
  end
end
end
local function clear()
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.black)
term.clear()
term.setCursorPos(1,1)
end
local function list(path,scroll,selected)
clear()
local items = fs.list(path)
for i=scroll+1,scroll+h-2 do
  if type(items[i]) == "string" then
   if i ~= selected then
	if not fs.isDir(path..items[i]) then
	 term.setTextColor(colors.black)
	else
	 term.setTextColor(colors.yellow)
	end
   else
	term.setTextColor(colors.white)
   end
   print(items[i])
  end
end
return items
end
local function drawMenu(path)
term.setBackgroundColor(colors.blue)
term.setTextColor(colors.white)
term.setCursorPos(1,h-1)
term.clearLine()
term.setCursorPos(1,h-1)
term.write(path)
term.setCursorPos(1,h)
term.clearLine()
term.setCursorPos(1,h)
term.write("| New | MkDir | More | Root | Home | Back | Exit |")
end
local function rPrint(txt,y)
if y == nil then _,y = term.getCursorPos() end
term.setCursorPos(w-#txt,y)
term.write(txt)
term.setCursorPos(1,y+1)
end
local function popupMenu(isDir)
paintutils.drawFilledBox(math.floor(w/2),1,w,h-1)
if (isDir) then
  rPrint("Open",2)
  rPrint("Unpack")
else
  rPrint("Edit",2)
  rPrint("Paint")
  rPrint("Open with ...")
  rPrint("Run")
  rPrint("Run w/Args")
end
rPrint("Rename",7)
rPrint("Move")
rPrint("Copy")
rPrint("Copy to clipboard")
rPrint("Delete")
rPrint("Deselect")
end
local function createNewName(name,type)
if type == nil then type = 1 end
if type == 1 then return "Unpacked_" .. name end
if type == 2 then return name .. math.random(1,10000) end
return name .. "_pasted"
end
local function drawLine(y,txt,col)
if type(col) == nil then col = colors.white end
term.setCursorPos(1,y)
term.clearLine()
term.setCursorPos(math.floor(w/2-#txt/2),y)
term.write(txt)
end
local function customShell()
clear()
while true do
  term.setCursorPos(1,h)
  term.clearLine()
  term.setCursorPos(1,h)
  term.write("? ")
  local command = read()
  clear()
  term.setCursorPos(1,1)
  if command == "exit" then return end
  if type(shellcom[command]) == "function" then
   shellcom[command]()
  else
   print("Not a command")
  end
end
end
local function downloadfile(path)
clear()
local url = readtextbox("	  Please enter url	  ")
clear()
print("Progress:")
print("Downloading...")
local httpgot = http.get(url)
print("Done")
local name = readtextbox("Please name the file")
while fs.exists(path..name) do name = createNewName(name,3) end
local file = fs.open(path..name,"w")
file.write(httpgot.readAll())
file.close()
httpgot.close()
clear()
buttonbox("File downloaded",{{"OK",colors.gray,colors.white}})
end
local function more(path) --draw ui
while true do
  clear()
  print("More actions:")
  term.setTextColor(colors.black)
  drawLine(3,"Shell")
  drawLine(5,"Download file")
  drawLine(7,"Paste from clipboard")
  drawLine(9,"Paste from pastebin.com")
  drawLine(11,"Open webpage")
  drawLine(13,"New file...")
  drawLine(15,"Go back")
  --get event
  local _,_,_,y = os.pullEvent()
  if y == 3 then
   customShell()
  elseif y == 5 then
   downloadfile(path)
  elseif y == 7 then
   if fs.exists(clipboard) then
	if clipboard:sub(#clipboard,#clipboard) == "/" then clipboard = clipboard:sub(1,#clipboard-1) end
	local splitted = split(clipboard,"/")
	local name = splitted[#splitted]
	while fs.exists(path..name) do name = createNewName(name,3) end
	fs.copy(clipboard,path..name)
	buttonbox("Pasted as "..name.." in directory "..path,{{"OK",colors.gray,colors.white}})
   else
	buttonbox("File not found: "..clipboard,{{"OK",colors.gray,colors.white}})
   end
  elseif y == 9 then
   --paste from pastebin
   local name
   repeat
	name = readtextbox("Please enter a filename")
   until not fs.exists(path..name)
   local url = readtextbox("Please enter the pastebin URL")
   term.setCursorPos(1,1)
   term.setBackgroundColor(colors.white)
   term.setTextColor(colors.gray)
   term.clear()
   print("Downloading file: ")
   shell.run("pastebin get "..url.." "..path..name)
   print("Ended. Press any key to continue")
   os.pullEvent()
   elseif y == 11 then
   --open webpage:
   local url = readtextbox("   Please enter the url   ")
   local httpsth = http.get(url)
   local cont = httpsth.readAll()
   httpsth.close()
   clear()
   print(cont)
   os.pullEvent()
  elseif y == 13 then
   --new file options
   clear()
   local exc = buttonbox("Please choose a program",{{"Paint",colors.yellow,colors.black},{"Custom",colors.yellow,colors.black}})
   clear()
   local filename = readtextbox("Please enter a filename")
   if not fs.exists(path..filename) then
	if exc == 1 then
	 shell.run("paint",path..filename)
	else
	 clear()
	 local prog = readtextbox("Please choose a program "..root)
	 shell.run(prog,path..filename)
	end
   end
  elseif y == 15 then
   return
  end
end
end
local path = root .. home
local scroll = 0
local selected = 0
local items
local endprogram = false
while not endprogram do
repeat
  items = list(path,scroll,selected)
  drawMenu(path)
  if items[selected] ~= nil then popupMenu(fs.isDir(path..items[selected])) end
  local e,b,x,y = os.pullEvent()
  if e == "mouse_click" then
   if items[selected] ~= nil and x > math.floor(w/2) and y < h-1 then
	if fs.isDir(path..items[selected]) then
	 --folder specific
	 if y == 2 then
	  path = path .. items[selected] .. "/"
	  selected = 0
	  scroll = 0
	  history[#history+1] = path
	 elseif y == 3 then
	  local con = fs.list(path..items[selected].."/")
	  for i=1,#con do
	   local altname = con[i]
	   while fs.exists(path..altname) do
		altname = createNewName(altname)
	   end
	   fs.move(path..items[selected].."/"..con[i],path..altname)	  
	  end
	  fs.delete(path..items[selected])
	  selected = 0
	 end
	else
	 --file specific
	 if y == 2 then
	  --edit
	  shell.run("edit",path.. items[selected])
	 elseif y == 3 then
	  --open with paint
	  shell.run("paint",path..items[selected])
	 elseif y == 4 then
	  --open with...
	  local program = readtextbox("Please choose a program: "..root)
	  if program ~= nil or program ~= "" then
	   shell.run(root..program,path..items[selected])
	  end	  
	 elseif y == 5 then
	  term.setBackgroundColor(colors.black)
	  term.setTextColor(colors.white)
	  term.clear()
	  term.setCursorPos(1,1)
	  os.pullEvent()
	  shell.run(path..items[selected])
	  sleep(0)
	  print("Press any key to continue")
	  os.pullEvent("key")
	 elseif y == 6 then
	  local args = readtextbox("Please enter all arguments to run with!")
	  term.setBackgroundColor(colors.black)
	  term.setTextColor(colors.white)
	  term.clear()
	  term.setCursorPos(1,1)
	  os.pullEvent()
	  shell.run(path..items[selected] .. " " .. args)
	  sleep(0)
	  print("Press any key to continue")
	  os.pullEvent("key")
	 end
	end
	--universal
	if y == 7 then
	 local nname = readtextbox("Please enter the new name (empty = cancel)")
	 if nname ~= nil or nname ~= "" then
	  if not fs.exists(path..nname) then
	   fs.move(path..items[selected],path..nname)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	   selected = 0
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 8 then
	 --move
	 local dest = readtextbox("Move to (empty=cancel) "..root)	
	 if dest ~= nil or dest ~= "" then
	  if not fs.exists(root..dest) then
	   fs.move(path..items[selected],root..dest)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 9 then
	 --copy
	 local destination = readtextbox("Copy to (emplty=cancel) "..root)
	 if destination ~= nil or destination ~= "" then
	  if not fs.exists(root..destination) then
	   fs.copy(path..items[selected],root..destination)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 10 then
	 --clipboard
	 clipboard = path .. items[selected]
	elseif y == 11 then
	 --delete
	 local bclicked = buttonbox()
	 if bclicked == 1 then
	  fs.delete(path..items[selected])
	  clear()
	  buttonbox("File deleted",{{"OK",colors.gray,colors.white}})
	  selected = 0
	 end
	elseif y == 12 then
	 selected = 0
	end
	break
   end
   if y == h-1 then
	local npath = readtextbox("Enter new path: (empty=cancel) "..root)
	if npath ~= nil and npath ~= "" and fs.isDir(root..npath) then
	 path = root .. npath
	 selected = 0
	 scroll = 0
	end
	history[#history+1] = path
   elseif y == h then
	--new
	if x > 1 and x < 7 then
	 local name = readtextbox("Filename: (empty=cancel)  ")
	 if name ~= nil or name ~= "" then
	  if not fs.exists(path..name) then
	   shell.run("edit",path..name)
	  end
	 end
	end
	if x > 7 and x < 15 then
	 local name = readtextbox("Directory's name: (empty=cancel)")  
	 if name ~= nil or name ~= "" then
	  if not fs.exists(path..name) then
	   fs.makeDir(path..name)
	  end
	 end
	end
	if x > 15 and x < 22 then
	 --more...
	 more(path)
	end
	if x > 22 and x < 29 then
	 path = root
	 history[#history+1] = path
	 selected = 0
	 scroll = 0
	end
	if (x > 29 and x < 36) and fs.exists(root .. home) then
	 path = root .. home
	 history[#history+1] = path
	 selected = 0
	 scroll = 0
	end
	if x > 36 and x < 43 then
	 while true do
	  history[#history] = nil
	  if #history == 0 then
	   if fs.exists(root..home) then
		path = root..home
		history[1] = path
	   elseif fs.exists(root) then
		path = root
		history[1] = path
	   else
		error("Root folder deleted",0)
	   end
	  end
	  if fs.exists(history[#history]) then
	   path = history[#history]
	   break
	  end
	 end
	 selected = 0
	end
	if x > 43 and x < 50 then
	 term.setBackgroundColor(colors.black)
	 term.setTextColor(colors.white)
	 term.setCursorPos(1,1)
	 term.clear()
	 return
	end
   elseif e == "mouse_scroll" then
	if b == 1 and #items - scroll > h-2 then
	 scroll = scroll + 1
	end
	if b == -1 and scroll > 0 then
	 scroll = scroll - 1
	end
   else
	if y + scroll == selected then
	 if items[selected] ~= nil then
	  if fs.isDir(path..items[selected]) then
	   path = path .. items[selected] .. "/"
	   history[#history+1] = path
	   selected = 0
	   scroll = 0
	  else
	   term.setBackgroundColor(colors.black)
	   term.setTextColor(colors.white)
	   term.setCursorPos(1,1)
	   term.clear()
	   shell.run(path..items[selected])
	  end
	 end
	else
	 selected = y + scroll
	end
   end
  end
until true
end
Or just duplicate this
pastebin
http://pastebin.com/4JztmQ8N, because the
 doesn't pick up tab, I don't think.

Other than the tiny bug, you got yourself a cool program! Looks really nice!
Edited on 17 August 2015 - 01:55 AM
Konlab #19
Posted 23 August 2015 - 01:19 PM
I fixed the bug (which was very easy), and fixed the whitespacing so you can look at it better (which was HARD), so just paste this into the pastebin:
Spoiler

local tArgs = { ... }
local home
local root
local clipboard
if #tArgs > 0 then
home = tArgs[1]
else
home = ""
end
if #tArgs > 1 then
root = tArgs[2]
else
root = "/"
end
history = {}
history[1] = root .. home
local w,h = term.getSize()
local function split(inputstr, sep)
if sep == nil then
  sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  t[i] = str
  i = i + 1
end
return t
end
historyclear = function()
history = {}
history[1] = root..home
end
shellcom = {historyclear}
local function diabox(txt)
term.setBackgroundColor(colors.white)
term.setTextColor(colors.black)
paintutils.drawFilledBox(math.floor(w/2-(#txt+2)/2),math.floor(h/2)-2,math.floor(w/2+(#txt+2)/2),math.floor(h/2)+2,colors.white)
term.setCursorPos(math.floor(w/2-(#txt+2)/2)+1,math.floor(h/2)-1)
term.write(txt)
term.setCursorPos(math.floor(w/2-(#txt+2)/2)+1,math.floor(h/2)+1)
end
function readtextbox(txt)
diabox(txt)
return read()
end
function buttonbox(txt,buttons)
if type(buttons) ~= "table" then
  buttons = {{" Yes ",colors.red,colors.white},{" No ",colors.gray,colors.white}}
end
if txt == "" or txt == nil then
  txt = " Are you sure? "
end
local x,y
diabox(txt)
for i=1,#buttons do
  x,y = term.getCursorPos()
  x = math.floor((w/2-(#txt+2)/2)+((#txt+2)/i)*(i-1)) + 1
  term.setCursorPos(x,y)
  term.setBackgroundColor(buttons[i][2])
  term.setTextColor(buttons[i][3])
  term.write(buttons[i][1])  
end
while true do
  local _,b,x2,y2 = os.pullEvent("mouse_click")
  if b == 1 and y == y2 then
   for i=1,#buttons do
	local x = math.floor((w/2-(#txt+2)/2)+((#txt+2)/i)*(i-1)) + 1
	if x2 > x - 1 and x2 < x + #buttons[i][1] then
	 return i
	end
   end
  end
end
end
local function clear()
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.black)
term.clear()
term.setCursorPos(1,1)
end
local function list(path,scroll,selected)
clear()
local items = fs.list(path)
for i=scroll+1,scroll+h-2 do
  if type(items[i]) == "string" then
   if i ~= selected then
	if not fs.isDir(path..items[i]) then
	 term.setTextColor(colors.black)
	else
	 term.setTextColor(colors.yellow)
	end
   else
	term.setTextColor(colors.white)
   end
   print(items[i])
  end
end
return items
end
local function drawMenu(path)
term.setBackgroundColor(colors.blue)
term.setTextColor(colors.white)
term.setCursorPos(1,h-1)
term.clearLine()
term.setCursorPos(1,h-1)
term.write(path)
term.setCursorPos(1,h)
term.clearLine()
term.setCursorPos(1,h)
term.write("| New | MkDir | More | Root | Home | Back | Exit |")
end
local function rPrint(txt,y)
if y == nil then _,y = term.getCursorPos() end
term.setCursorPos(w-#txt,y)
term.write(txt)
term.setCursorPos(1,y+1)
end
local function popupMenu(isDir)
paintutils.drawFilledBox(math.floor(w/2),1,w,h-1)
if (isDir) then
  rPrint("Open",2)
  rPrint("Unpack")
else
  rPrint("Edit",2)
  rPrint("Paint")
  rPrint("Open with ...")
  rPrint("Run")
  rPrint("Run w/Args")
end
rPrint("Rename",7)
rPrint("Move")
rPrint("Copy")
rPrint("Copy to clipboard")
rPrint("Delete")
rPrint("Deselect")
end
local function createNewName(name,type)
if type == nil then type = 1 end
if type == 1 then return "Unpacked_" .. name end
if type == 2 then return name .. math.random(1,10000) end
return name .. "_pasted"
end
local function drawLine(y,txt,col)
if type(col) == nil then col = colors.white end
term.setCursorPos(1,y)
term.clearLine()
term.setCursorPos(math.floor(w/2-#txt/2),y)
term.write(txt)
end
local function customShell()
clear()
while true do
  term.setCursorPos(1,h)
  term.clearLine()
  term.setCursorPos(1,h)
  term.write("? ")
  local command = read()
  clear()
  term.setCursorPos(1,1)
  if command == "exit" then return end
  if type(shellcom[command]) == "function" then
   shellcom[command]()
  else
   print("Not a command")
  end
end
end
local function downloadfile(path)
clear()
local url = readtextbox("	  Please enter url	  ")
clear()
print("Progress:")
print("Downloading...")
local httpgot = http.get(url)
print("Done")
local name = readtextbox("Please name the file")
while fs.exists(path..name) do name = createNewName(name,3) end
local file = fs.open(path..name,"w")
file.write(httpgot.readAll())
file.close()
httpgot.close()
clear()
buttonbox("File downloaded",{{"OK",colors.gray,colors.white}})
end
local function more(path) --draw ui
while true do
  clear()
  print("More actions:")
  term.setTextColor(colors.black)
  drawLine(3,"Shell")
  drawLine(5,"Download file")
  drawLine(7,"Paste from clipboard")
  drawLine(9,"Paste from pastebin.com")
  drawLine(11,"Open webpage")
  drawLine(13,"New file...")
  drawLine(15,"Go back")
  --get event
  local _,_,_,y = os.pullEvent()
  if y == 3 then
   customShell()
  elseif y == 5 then
   downloadfile(path)
  elseif y == 7 then
   if fs.exists(clipboard) then
	if clipboard:sub(#clipboard,#clipboard) == "/" then clipboard = clipboard:sub(1,#clipboard-1) end
	local splitted = split(clipboard,"/")
	local name = splitted[#splitted]
	while fs.exists(path..name) do name = createNewName(name,3) end
	fs.copy(clipboard,path..name)
	buttonbox("Pasted as "..name.." in directory "..path,{{"OK",colors.gray,colors.white}})
   else
	buttonbox("File not found: "..clipboard,{{"OK",colors.gray,colors.white}})
   end
  elseif y == 9 then
   --paste from pastebin
   local name
   repeat
	name = readtextbox("Please enter a filename")
   until not fs.exists(path..name)
   local url = readtextbox("Please enter the pastebin URL")
   term.setCursorPos(1,1)
   term.setBackgroundColor(colors.white)
   term.setTextColor(colors.gray)
   term.clear()
   print("Downloading file: ")
   shell.run("pastebin get "..url.." "..path..name)
   print("Ended. Press any key to continue")
   os.pullEvent()
   elseif y == 11 then
   --open webpage:
   local url = readtextbox("   Please enter the url   ")
   local httpsth = http.get(url)
   local cont = httpsth.readAll()
   httpsth.close()
   clear()
   print(cont)
   os.pullEvent()
  elseif y == 13 then
   --new file options
   clear()
   local exc = buttonbox("Please choose a program",{{"Paint",colors.yellow,colors.black},{"Custom",colors.yellow,colors.black}})
   clear()
   local filename = readtextbox("Please enter a filename")
   if not fs.exists(path..filename) then
	if exc == 1 then
	 shell.run("paint",path..filename)
	else
	 clear()
	 local prog = readtextbox("Please choose a program "..root)
	 shell.run(prog,path..filename)
	end
   end
  elseif y == 15 then
   return
  end
end
end
local path = root .. home
local scroll = 0
local selected = 0
local items
local endprogram = false
while not endprogram do
repeat
  items = list(path,scroll,selected)
  drawMenu(path)
  if items[selected] ~= nil then popupMenu(fs.isDir(path..items[selected])) end
  local e,b,x,y = os.pullEvent()
  if e == "mouse_click" then
   if items[selected] ~= nil and x > math.floor(w/2) and y < h-1 then
	if fs.isDir(path..items[selected]) then
	 --folder specific
	 if y == 2 then
	  path = path .. items[selected] .. "/"
	  selected = 0
	  scroll = 0
	  history[#history+1] = path
	 elseif y == 3 then
	  local con = fs.list(path..items[selected].."/")
	  for i=1,#con do
	   local altname = con[i]
	   while fs.exists(path..altname) do
		altname = createNewName(altname)
	   end
	   fs.move(path..items[selected].."/"..con[i],path..altname)	  
	  end
	  fs.delete(path..items[selected])
	  selected = 0
	 end
	else
	 --file specific
	 if y == 2 then
	  --edit
	  shell.run("edit",path.. items[selected])
	 elseif y == 3 then
	  --open with paint
	  shell.run("paint",path..items[selected])
	 elseif y == 4 then
	  --open with...
	  local program = readtextbox("Please choose a program: "..root)
	  if program ~= nil or program ~= "" then
	   shell.run(root..program,path..items[selected])
	  end	  
	 elseif y == 5 then
	  term.setBackgroundColor(colors.black)
	  term.setTextColor(colors.white)
	  term.clear()
	  term.setCursorPos(1,1)
	  os.pullEvent()
	  shell.run(path..items[selected])
	  sleep(0)
	  print("Press any key to continue")
	  os.pullEvent("key")
	 elseif y == 6 then
	  local args = readtextbox("Please enter all arguments to run with!")
	  term.setBackgroundColor(colors.black)
	  term.setTextColor(colors.white)
	  term.clear()
	  term.setCursorPos(1,1)
	  os.pullEvent()
	  shell.run(path..items[selected] .. " " .. args)
	  sleep(0)
	  print("Press any key to continue")
	  os.pullEvent("key")
	 end
	end
	--universal
	if y == 7 then
	 local nname = readtextbox("Please enter the new name (empty = cancel)")
	 if nname ~= nil or nname ~= "" then
	  if not fs.exists(path..nname) then
	   fs.move(path..items[selected],path..nname)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	   selected = 0
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 8 then
	 --move
	 local dest = readtextbox("Move to (empty=cancel) "..root)	
	 if dest ~= nil or dest ~= "" then
	  if not fs.exists(root..dest) then
	   fs.move(path..items[selected],root..dest)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 9 then
	 --copy
	 local destination = readtextbox("Copy to (emplty=cancel) "..root)
	 if destination ~= nil or destination ~= "" then
	  if not fs.exists(root..destination) then
	   fs.copy(path..items[selected],root..destination)
	   clear()
	   buttonbox("Success",{{"OK",colors.gray,colors.white}})
	  else
	   clear()
	   buttonbox("File already exists",{{"OK",colors.gray,colors.white}})
	  end
	 end
	elseif y == 10 then
	 --clipboard
	 clipboard = path .. items[selected]
	elseif y == 11 then
	 --delete
	 local bclicked = buttonbox()
	 if bclicked == 1 then
	  fs.delete(path..items[selected])
	  clear()
	  buttonbox("File deleted",{{"OK",colors.gray,colors.white}})
	  selected = 0
	 end
	elseif y == 12 then
	 selected = 0
	end
	break
   end
   if y == h-1 then
	local npath = readtextbox("Enter new path: (empty=cancel) "..root)
	if npath ~= nil and npath ~= "" and fs.isDir(root..npath) then
	 path = root .. npath
	 selected = 0
	 scroll = 0
	end
	history[#history+1] = path
   elseif y == h then
	--new
	if x > 1 and x < 7 then
	 local name = readtextbox("Filename: (empty=cancel)  ")
	 if name ~= nil or name ~= "" then
	  if not fs.exists(path..name) then
	   shell.run("edit",path..name)
	  end
	 end
	end
	if x > 7 and x < 15 then
	 local name = readtextbox("Directory's name: (empty=cancel)")  
	 if name ~= nil or name ~= "" then
	  if not fs.exists(path..name) then
	   fs.makeDir(path..name)
	  end
	 end
	end
	if x > 15 and x < 22 then
	 --more...
	 more(path)
	end
	if x > 22 and x < 29 then
	 path = root
	 history[#history+1] = path
	 selected = 0
	 scroll = 0
	end
	if (x > 29 and x < 36) and fs.exists(root .. home) then
	 path = root .. home
	 history[#history+1] = path
	 selected = 0
	 scroll = 0
	end
	if x > 36 and x < 43 then
	 while true do
	  history[#history] = nil
	  if #history == 0 then
	   if fs.exists(root..home) then
		path = root..home
		history[1] = path
	   elseif fs.exists(root) then
		path = root
		history[1] = path
	   else
		error("Root folder deleted",0)
	   end
	  end
	  if fs.exists(history[#history]) then
	   path = history[#history]
	   break
	  end
	 end
	 selected = 0
	end
	if x > 43 and x < 50 then
	 term.setBackgroundColor(colors.black)
	 term.setTextColor(colors.white)
	 term.setCursorPos(1,1)
	 term.clear()
	 return
	end
   elseif e == "mouse_scroll" then
	if b == 1 and #items - scroll > h-2 then
	 scroll = scroll + 1
	end
	if b == -1 and scroll > 0 then
	 scroll = scroll - 1
	end
   else
	if y + scroll == selected then
	 if items[selected] ~= nil then
	  if fs.isDir(path..items[selected]) then
	   path = path .. items[selected] .. "/"
	   history[#history+1] = path
	   selected = 0
	   scroll = 0
	  else
	   term.setBackgroundColor(colors.black)
	   term.setTextColor(colors.white)
	   term.setCursorPos(1,1)
	   term.clear()
	   shell.run(path..items[selected])
	  end
	 end
	else
	 selected = y + scroll
	end
   end
  end
until true
end
Or just duplicate this
pastebin
http://pastebin.com/4JztmQ8N, because the
 doesn't pick up tab, I don't think.

Other than the tiny bug, you got yourself a cool program! Looks really nice!
Thanks!
I'll work on the file/pathfinder
And thanks for fixing. Idk why but i didnt get errors

Name suggestions?
Maybe LapisFile?
Edited on 23 August 2015 - 11:20 AM
LDDestroier #20
Posted 23 August 2015 - 08:41 PM
How about 'Lattice'?
Konlab #21
Posted 30 August 2015 - 07:32 PM
How about 'Lattice'?
Yes that's a cool name!
Thanks for the suggestion!
LDDestroier #22
Posted 31 August 2015 - 01:12 AM
How about 'Lattice'?
Yes that's a cool name!
Thanks for the suggestion!

Why, you're welcome!
Konlab #23
Posted 03 September 2015 - 06:00 PM
Any bugs found/suggestions?
LDDestroier #24
Posted 03 September 2015 - 06:23 PM
I'l go compile a list (in this post, via edit) when I get the time.
EDIT: Okay, here are some things:
Bugs:
Spoiler+When clicking on any part of the list of files/folders where the Y is equal to an item's, the item is still selected even though the text itself wasn't clicked.
+When selecting one file/folder, the menu flickers white a bit.

Suggestions
Spoiler+Right mouse button seems to do the same thing as any mouse button. You should have the right mouse button select the current directory you are inside of.
+The text color representing folders contrasts very poorly to the lightBlue background.
+Seeing as Flare (not Silica) is out, you should at least try to redo all of the graphical elements with FLARE to make everything look beautiful. Seriously, Silica can be used to easily make menus and whatnot, without any flickering to speak of.
Edited on 04 September 2015 - 09:56 AM
Konlab #25
Posted 03 September 2015 - 07:11 PM
I'l go compile a list (in this post, via edit) when I get the time.
I'm hoping that it's a list of suggestions and not bugs :D/>
LeDark Lua #26
Posted 03 September 2015 - 07:41 PM
Suggestion:
  • Nicer GUI ( I know WIP, but you can start the changes of the GUI )
  • No flicker.
example:

function advancedClear()
   for i=1, 19 do
	  term.setCursorPos(1, i)
	  term.write(string.rep(" ", 51))
	  term.setCursorPos(1, (19-i)+1)
	  term.write(string.rep(" ", 51))
   end
end
and update the program only when the mouse position is on the button or something, otherwise you get that nasty flickering.
  • Right click menu [ so we can get the contents of the bottom ]
EDIT: I will post suggestions if I think of any :D/>
Edited on 03 September 2015 - 05:50 PM
LDDestroier #27
Posted 04 September 2015 - 12:57 AM
example:

function advancedClear()
   for i=1, 19 do
	  term.setCursorPos(1, i)
	  term.write(string.rep(" ", 51))
	  term.setCursorPos(1, (19-i)+1)
	  term.write(string.rep(" ", 51))
   end
end

term.write(string.rep(" ",51)) would only work for normal computers. Instead, use term.clearLine()
Konlab #28
Posted 04 September 2015 - 05:53 AM
Bugs:
The Y bug with not clicking on words is not a bug, it's a feature, but I'll fix it.
Link to Silica? I can't find it.
I'll try to remove the flickering.
Suggestions:
Right click menu is a good idea
Yellow doesn't stands out from light blue? :o/>
The current GUI is temporary, however idk how long it will be…
DannySMc #29
Posted 04 September 2015 - 08:59 AM
I was using this and actually it is alright, it looks dodgy, and could do with a whole new design update, the idea you have is not bad.
gollark8 #30
Posted 04 September 2015 - 10:26 AM
The toolbar is partially obscured on PDA screens.
LDDestroier #31
Posted 04 September 2015 - 11:56 AM
Woops! I meant Flare, not Silica! I get the two mixed up all the time…
Edited on 04 September 2015 - 09:56 AM
Konlab #32
Posted 04 September 2015 - 12:55 PM
IK PDA support coming soon
I will actually redo the entire UI style: instead of menus I'll make popup menus (right click menus). After I finish the multiselect (which is very buggy now) I'll redo the UI.
Konlab #33
Posted 04 September 2015 - 06:35 PM
I was using this and actually it is alright, it looks dodgy, and could do with a whole new design update, the idea you have is not bad.
Thanks!
DannySMc #34
Posted 04 September 2015 - 07:04 PM
I was using this and actually it is alright, it looks dodgy, and could do with a whole new design update, the idea you have is not bad.
Thanks!

you're welcome, if you need any help just shout me :D/>
Konlab #35
Posted 05 September 2015 - 02:28 PM
New update: beta 1.0d
(Nothing special I just uploaded the version from my computer)
It should be more stable

(…)
you're welcome, if you need any help just shout me :D/>
*shouting*
MEEEEEEEEE
Please I can't find what's causing this bug:
To have the multiselect menu active you have to have in selection: the first or the second or the selected

And the code is getting as updates go even and even more unclean so code cleanup coming in the near future (maybe one will solve this issue)

The GUI rework and other suggestions coming later, I'm focusing to get rid of the multiselect bugs now
DannySMc #36
Posted 05 September 2015 - 04:25 PM
New update: beta 1.0d
(Nothing special I just uploaded the version from my computer)
It should be more stable

(…)
you're welcome, if you need any help just shout me :D/>
*shouting*
MEEEEEEEEE
Please I can't find what's causing this bug:
To have the multiselect menu active you have to have in selection: the first or the second or the selected

And the code is getting as updates go even and even more unclean so code cleanup coming in the near future (maybe one will solve this issue)

The GUI rework and other suggestions coming later, I'm focusing to get rid of the multiselect bugs now
Send me a PM with all of the information and a link to the code :P/>
Konlab #37
Posted 06 September 2015 - 05:30 PM
NEW UPDATE!
Finally fixed the multiselection bug, it means that:
Multiselection is finally done
except that it's very buggy now, as the entire program is so
Next update will be a code cleanup
Konlab #38
Posted 07 September 2015 - 07:32 PM
Flickering should be fixed now
Edit:
Had time so full update info:
I rewrote the "More" menu
Fixed bugs
Added new boolean "redraw" which tells if the program needs redraw or no. Ik it's not the best solution, but it's temporary and removed flickering for me :)/>

And I edited the TODO list!
I included all my plans
Edited on 07 September 2015 - 06:39 PM
LDDestroier #39
Posted 07 September 2015 - 09:16 PM
Added new boolean "redraw" which tells if the program needs redraw or no. Ik it's not the best solution, but it's temporary and removed flickering for me :)/>

Cool, that's exactly what I did for my minimap program!
Konlab #40
Posted 08 September 2015 - 05:24 PM
It's time for the right click menus to come…
I just begun working on them and on the pocket computer support
This is going to last longer…
Konlab #41
Posted 09 September 2015 - 06:47 PM
Gui rework #1 done
Edited on 11 September 2015 - 04:18 PM
Konlab #42
Posted 11 September 2015 - 06:17 PM
New update!
Gui rework #2:
Views!
Screenies: http://imgur.com/a/3LCcq
Edited on 11 September 2015 - 04:24 PM
LeDark Lua #43
Posted 11 September 2015 - 08:25 PM
AWESOME! Looks cool.
Konlab #44
Posted 12 September 2015 - 08:48 AM
AWESOME! Looks cool.
Thanks!
Konlab #45
Posted 20 September 2015 - 07:54 AM
Next update coming soon: Themes! And bugfixes!
LeDark Lua #46
Posted 20 September 2015 - 09:17 AM
Hey Konlab, If you would be kind, would you love to port your Lattice to my let's say upcoming OS?

EDIT: If you wan't screenshots, I'll post them.
Edited on 20 September 2015 - 07:18 AM
Konlab #47
Posted 21 September 2015 - 10:45 AM
Hey Konlab, If you would be kind, would you love to port your Lattice to my let's say upcoming OS?

EDIT: If you wan't screenshots, I'll post them.
Of course, I'm happy if my programs are included in OSes
What kind of porting?
If you want to open new progs (like edit smthing) just override shell.run
If you think about graphical porting I'm working on themes in a way that everybody can set their own colors before running.
I'm trying to keep my program without configs, and it's working now.
File sorting and themes coming soon…
Konlab #48
Posted 21 September 2015 - 11:07 AM
NEW UPDATE!!!
Themes,
To set a theme you have to set a global lat_theme table in this format:
{back = color
fore = color
text = color
selected = color
dir = color
multiselection = color
}
(if I remember correctly, if its not working see the source code at line ~15)
File sorting and bugfixes are my new priority
Theme setting GUI if u want, but I try to make the program without configs
LDDestroier #49
Posted 21 September 2015 - 11:29 AM
Oh wow! I looked at the screenshots and they look amazing! Well done! Much better than before. Better go boot up an emulator!

EDIT: Looks a lot nicer. Didn't figure out how to change to icon mode, though. The files sizes are a useful touch! Nice!
Edited on 21 September 2015 - 09:33 AM
LeDark Lua #50
Posted 21 September 2015 - 12:35 PM
Ok konlab, when I will finnish porting the program, I will screenshot it.

Note: I will get rid of the window that you made, because my OS is Window based
Konlab #51
Posted 21 September 2015 - 03:35 PM
LDD:
Thanks!
To change view to icon mode click the '+' button at the top and then select 'Toggle view'
Or right-click on empty space and select Toggle view
Le Dark Lua:
Read the PM
Sorry im on mobile i cant use quotes :)/>
Konlab #52
Posted 21 September 2015 - 06:53 PM
New update
http://pastebin.com/5A2xujvw
Pre 1.0 a
New features:
-File sorting:
folders are the first, then files come in alphabetical order!
-Mouse drag support
Drag files or folders in folders!
Drag files or folders to the bar at the top to move them in the parent directory
Fixed some bugs
Konlab #53
Posted 26 September 2015 - 10:49 AM
Any bugs suggestions found?
Edited on 04 October 2015 - 08:39 AM
Konlab #54
Posted 03 October 2015 - 06:25 PM
Major development change!
A HUGE update is coming soon…
Including many features…
Configs
Build-in multitasking: return to Lattice while running your files - tabbed and maybe windowed at the same time
lots of bugfixes
lots of stability improvements

I am happy, because I dont need a 1000+ line file, but lots of small files :)/>
Please post your own suggestions, to make Lattice even better!

EDIT:
making good progress, Included my old experimental tabbed multitasking:


It's working!
Edited on 03 October 2015 - 05:24 PM
LDDestroier #55
Posted 03 October 2015 - 08:58 PM
This is a drastic improvement (based on screenies) from your first version. Keep up the good (looking) work!
Ran in emulator! BUGS!

1. When scrolling mousewheel when there aren't enough files to fill the screen, the screen still flickers a bit.
2. When dragging a file/folder to the same folder, it gives the error "Lattice:765: attempt to concatenate string and nil"
3. In icon mode, if a filename is too long, it gets cut off rather than continuing one line below (as is expected in most file explorers [in actual operating systems]).

Suggestions!

1. Can you have a '..' folder show up always (except at root folder)?
2. When dragging files, can you have it have a 'ghost' filename/icon go with the cursor? I imagine it would be hard to do, but it'd look cool…
Edited on 03 October 2015 - 07:41 PM
Konlab #56
Posted 04 October 2015 - 10:10 AM
This is a drastic improvement (based on screenies) from your first version. Keep up the good (looking) work!
Ran in emulator! BUGS!

1. When scrolling mousewheel when there aren't enough files to fill the screen, the screen still flickers a bit.
2. When dragging a file/folder to the same folder, it gives the error "Lattice:765: attempt to concatenate string and nil"
3. In icon mode, if a filename is too long, it gets cut off rather than continuing one line below (as is expected in most file explorers [in actual operating systems]).

Suggestions!

1. Can you have a '..' folder show up always (except at root folder)?
2. When dragging files, can you have it have a 'ghost' filename/icon go with the cursor? I imagine it would be hard to do, but it'd look cool…
1. See at the end of the post
2. Oh, there's a missing check :(/>/>
Thanks for reporting
3. Good idea.
1. I could do it, but there's a "^" button on the top, it works the same way, you can drag files to the top bar to move them to parent dir
2. It is possible, maybe in the future, but transparency is hard, I don't know if they looked cool, only if not transparent, maybe if I grayed them out (converting colors to white, gray and light gray), idk.

About the missing checks, I think I'll make one new fs-like API with checks and dialogs

Thanks for reporting bugs and suggesting suggestions!
—————————————-
About the next update: Lattice will need an installer and an install dir, but finally I can put functions in APIs and main code in multiple files calling eachother, so I can organize my code better
I think i will rewrite the main code and the everything what's graphical to reduce flickering. It is interesting, that I don't get any flickering, (only when the screen is full of icons, wgen browsing rom/programs)

About multitasking, I think multiple types of multitasking will be avaible- single-multitasking, multi-multitasking and extra multitasking in multitasking.
Edited on 04 October 2015 - 08:12 AM
Konlab #57
Posted 04 October 2015 - 02:58 PM
Making progress:



Edit: 400th post!
Edit 2: I will not post more progress here, but if you are interested in my progress just PM me, or watch github.com/Konlab/Lattice
Edited on 04 October 2015 - 02:12 PM
Waitdev_ #58
Posted 06 October 2015 - 12:45 PM
you know what this needs? clippy (͡° ͜ʖ ͡°)
Konlab #59
Posted 06 October 2015 - 02:51 PM
you know what this needs? clippy (͡° ͜ʖ ͡°)
Ok. The next version will have clippy.
I cant draw that face ('-')
Konlab #60
Posted 18 October 2015 - 03:49 PM
Lattice as file browser is discontinued. I have some plans for something other called Lattice, something bigger containing Lattice, something hopefully more useful. If it will or wont be released is still a question because this month and september for some unknown reason I stopped development of lots of my project (my unnamed OS, Greenperipherals and lots of unmentioned and non CC projects), but I hope I will have enough time to finish it and maybe release it too…
Edited on 18 October 2015 - 01:50 PM
LDDestroier #61
Posted 19 October 2015 - 04:42 PM
Will the new Lattice…
1. use the Flare API,
2. have networked file system support (view other computers as folders),
3. have tabs,
4. have a sidebar, and/or
5, be compatible with monochrome/grayscale/color computers?

A non-advanced computer can use gray and lightGray if _CC_VERSION is not nil.
Konlab #62
Posted 19 October 2015 - 06:10 PM
Will the new Lattice…
1. use the Flare API,
2. have networked file system support (view other computers as folders),
3. have tabs,
4. have a sidebar, and/or
5, be compatible with monochrome/grayscale/color computers?

A non-advanced computer can use gray and lightGray if _CC_VERSION is not nil.
Thanks for replying!
2. Interesting idea
3. Tabs are already done (not released but done)
4. What sidebar? A scrollbar?
5. Ok

And 1.: I will use CrazedProgrammer's Surface API's term object where I can redirect myself

Btw, this hour was very painful. I rewrited the main code and migrated almost all functions to APIs and it's still not done. But the main loop has a new, better, extendable design:

While not endprogram do
  Check for current status validity
  Redraw screen
  Pull events
  Check if pulled events did something and save it to a var
  Based on the var and current status call functions
end
If I finish this and my multitasking (by adding windows) i will upload the code to Github
I think i will just post my status here even if it's not the same project (this will be only part of that)
LDDestroier #63
Posted 19 October 2015 - 06:25 PM
By a sidebar, I mean a section of the screen reserved for links to various folders like '/', but also any network drives and floppy disks. Sorta like explorer in Windows 7.
Konlab #64
Posted 19 October 2015 - 06:28 PM
By a sidebar, I mean a section of the screen reserved for links to various folders like '/', but also any network drives and floppy disks. Sorta like explorer in Windows 7.
Oh thanks for clarifying
Really interesting idea
When I will add multiple sessions visible at once I will add a showable sidebar
Creator #65
Posted 19 October 2015 - 07:00 PM
Wouldn't that decrease the space there is for other stuff? It's not like there is much of it anyways.
Konlab #66
Posted 20 October 2015 - 03:05 PM
Wouldn't that decrease the space there is for other stuff? It's not like there is much of it anyways.
I'm not worried about screen space. Some views will maybe be forbidden with enabled sidebar.
hugeblank #67
Posted 27 November 2015 - 09:01 AM
Lattice is a really fluid program, I give it a 10/10! I found it through glass UI, and currently it's a key component to the build of the UI. A suggestion though is adding a way to open programs with a monitor. Like when you right click having an option 'run on monitor'.
Konlab #68
Posted 27 November 2015 - 09:53 AM
Lattice is a really fluid program, I give it a 10/10! I found it through glass UI, and currently it's a key component to the build of the UI. A suggestion though is adding a way to open programs with a monitor. Like when you right click having an option 'run on monitor'.
Thanks for rating :)/>
Cool idea but you can do:
Right click > open with > rom/programs/monitor