mirror of
https://github.com/edubart/otclient.git
synced 2025-10-13 19:14:56 +02:00
close menus when resizing windows
This commit is contained in:
@@ -19,7 +19,7 @@ function table.copy(t)
|
||||
return res
|
||||
end
|
||||
|
||||
function table.selective_copy(t, keys)
|
||||
function table.selectivecopy(t, keys)
|
||||
local res = { }
|
||||
for i,v in ipairs(keys) do
|
||||
res[v] = t[v]
|
||||
@@ -32,3 +32,21 @@ function table.merge(t, src)
|
||||
t[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
function table.find(t, value)
|
||||
for k,v in pairs(t) do
|
||||
if v == value then return k end
|
||||
end
|
||||
end
|
||||
|
||||
function table.removevalue(t, value)
|
||||
local queue = {}
|
||||
for k,v in pairs(t) do
|
||||
if v == value then
|
||||
table.insert(queue, k)
|
||||
end
|
||||
end
|
||||
for i,v in pairs(queue) do
|
||||
table.remove(t, i)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user