diff --git a/SmartStorage.lua b/SmartStorage.lua index 496af6d..6cfaa7d 100644 --- a/SmartStorage.lua +++ b/SmartStorage.lua @@ -7,7 +7,7 @@ local term=require('term') local shell=require('shell') require('libevent') -local version_tag="Smart Storage v0.5.3" +local version_tag="Smart Storage v0.5.4" print(version_tag) print("Checking hardware...") @@ -153,10 +153,14 @@ local function display(tb_data,tb_display,begin_at,filter) local count_shown=0 for i=begin_at,#tb_display,1 do local this_table=tb_data[tb_display[i]] - if(string.find(this_table.name,filter)~=nil) then + if(filter==nil or string.len(filter)<1 or string.find(this_table.name,filter)~=nil) then + local old=gpu.setForeground(0xFFFF00) + gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")") + gpu.setForeground(old) + else gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")") - count_shown=count_shown+1 end + count_shown=count_shown+1 if(i-begin_at+3>=h-3) then break end end