mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
incremented graphics version and disabled listbox debug messages for now
This commit is contained in:
parent
5a38acf2a7
commit
acc8e1c058
@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
|
|||||||
|
|
||||||
local core = {}
|
local core = {}
|
||||||
|
|
||||||
core.version = "2.3.2"
|
core.version = "2.3.3"
|
||||||
|
|
||||||
core.flasher = flasher
|
core.flasher = flasher
|
||||||
core.events = events
|
core.events = events
|
||||||
|
@ -504,10 +504,10 @@ function element.new(args, constraint, child_offset_x, child_offset_y)
|
|||||||
|
|
||||||
if args.parent ~= nil then
|
if args.parent ~= nil then
|
||||||
-- remove self from parent
|
-- remove self from parent
|
||||||
log.debug("removing " .. self.id .. " from parent")
|
-- log.debug("removing " .. self.id .. " from parent")
|
||||||
args.parent.__remove_child(self.id)
|
args.parent.__remove_child(self.id)
|
||||||
else
|
else
|
||||||
log.debug("no parent for " .. self.id .. " on delete attempt")
|
-- log.debug("no parent for " .. self.id .. " on delete attempt")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ local function listbox(args)
|
|||||||
next_y = next_y + item.h + item_pad
|
next_y = next_y + item.h + item_pad
|
||||||
item.e.reposition(1, item.y)
|
item.e.reposition(1, item.y)
|
||||||
item.e.show()
|
item.e.show()
|
||||||
log.debug("iterated " .. item.e.get_id())
|
-- log.debug("iterated " .. item.e.get_id())
|
||||||
end
|
end
|
||||||
|
|
||||||
content_height = next_y
|
content_height = next_y
|
||||||
@ -212,7 +212,7 @@ local function listbox(args)
|
|||||||
---@param child graphics_element child element
|
---@param child graphics_element child element
|
||||||
function e.on_added(id, child)
|
function e.on_added(id, child)
|
||||||
table.insert(list, { id = id, e = child, y = 0, h = child.get_height() })
|
table.insert(list, { id = id, e = child, y = 0, h = child.get_height() })
|
||||||
log.debug("added child " .. id .. " into slot " .. #list)
|
-- log.debug("added child " .. id .. " into slot " .. #list)
|
||||||
update_positions()
|
update_positions()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -222,12 +222,12 @@ local function listbox(args)
|
|||||||
for idx, elem in ipairs(list) do
|
for idx, elem in ipairs(list) do
|
||||||
if elem.id == id then
|
if elem.id == id then
|
||||||
table.remove(list, idx)
|
table.remove(list, idx)
|
||||||
log.debug("removed child " .. id .. " from slot " .. idx)
|
-- log.debug("removed child " .. id .. " from slot " .. idx)
|
||||||
update_positions()
|
update_positions()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
log.debug("failed to remove child " .. id)
|
-- log.debug("failed to remove child " .. id)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- handle focus
|
-- handle focus
|
||||||
|
Loading…
Reference in New Issue
Block a user