From c7006fb5ef157d0f742edab9de60db5517f3532a Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Mon, 19 Nov 2018 19:04:40 +0800 Subject: [PATCH] Fix filter ui issue --- SmartStorage.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SmartStorage.lua b/SmartStorage.lua index 2ff97ce..df5c158 100644 --- a/SmartStorage.lua +++ b/SmartStorage.lua @@ -154,11 +154,11 @@ local function display(tb_data,tb_display,begin_at,filter) for i=begin_at,#tb_display,1 do local this_table=tb_data[tb_display[i]] if(filter==nil or string.len(filter)<1) then + gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")") + elseif(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) - elseif(string.find(this_table.name,filter)~=nil) then - gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")") end count_shown=count_shown+1 if(i-begin_at+3>=h-3) then break end