1
0
mirror of https://github.com/kepler155c/opus synced 2024-11-15 05:04:50 +00:00
opus/sys/modules/opus/array.lua
kepler155c 7224d441ca
Ui enhancements 2.0 (#31)
* canvas overhaul

* minor tweaks

* list mode for overview

* bugfixes + tweaks for editor 2.0

* minor tweaks

* more editor work

* refactor + new transitions

* use layout() where appropriate and cleanup

* mouse triple click + textEntry scroll ind

* cleanup

* cleanup + theme editor

* color rework + cleanup

* changes for deprecated ui methods

* can now use named colors
2020-04-21 22:40:59 -06:00

27 lines
352 B
Lua

local Util = require('opus.util')
local Array = { }
function Array.filter(it, f)
local ot = { }
for _,v in pairs(it) do
if f(v) then
table.insert(ot, v)
end
end
return ot
end
function Array.removeByValue(t, e)
for k,v in pairs(t) do
if v == e then
table.remove(t, k)
return e
end
end
end
Array.find = Util.find
return Array