mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Fix filter ui issue
This commit is contained in:
parent
745258116b
commit
c7006fb5ef
|
@ -154,11 +154,11 @@ local function display(tb_data,tb_display,begin_at,filter)
|
||||||
for i=begin_at,#tb_display,1 do
|
for i=begin_at,#tb_display,1 do
|
||||||
local this_table=tb_data[tb_display[i]]
|
local this_table=tb_data[tb_display[i]]
|
||||||
if(filter==nil or string.len(filter)<1) then
|
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)
|
local old=gpu.setForeground(0xFFFF00)
|
||||||
gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")")
|
gpu.set(1,i-begin_at+3,this_table.name .. " -- " .. this_table.label .. " (" .. this_table.total .. ")")
|
||||||
gpu.setForeground(old)
|
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
|
end
|
||||||
count_shown=count_shown+1
|
count_shown=count_shown+1
|
||||||
if(i-begin_at+3>=h-3) then break end
|
if(i-begin_at+3>=h-3) then break end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user