From acc8e1c05846207aa99e06572731f2f03e33852f Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 25 Aug 2024 20:38:01 -0400 Subject: [PATCH] incremented graphics version and disabled listbox debug messages for now --- graphics/core.lua | 2 +- graphics/element.lua | 4 ++-- graphics/elements/listbox.lua | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/graphics/core.lua b/graphics/core.lua index 26251f8..394cbb3 100644 --- a/graphics/core.lua +++ b/graphics/core.lua @@ -7,7 +7,7 @@ local flasher = require("graphics.flasher") local core = {} -core.version = "2.3.2" +core.version = "2.3.3" core.flasher = flasher core.events = events diff --git a/graphics/element.lua b/graphics/element.lua index 9c22a38..e7fa3bc 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -504,10 +504,10 @@ function element.new(args, constraint, child_offset_x, child_offset_y) if args.parent ~= nil then -- remove self from parent - log.debug("removing " .. self.id .. " from parent") + -- log.debug("removing " .. self.id .. " from parent") args.parent.__remove_child(self.id) else - log.debug("no parent for " .. self.id .. " on delete attempt") + -- log.debug("no parent for " .. self.id .. " on delete attempt") end end diff --git a/graphics/elements/listbox.lua b/graphics/elements/listbox.lua index f82d469..27433b2 100644 --- a/graphics/elements/listbox.lua +++ b/graphics/elements/listbox.lua @@ -153,7 +153,7 @@ local function listbox(args) next_y = next_y + item.h + item_pad item.e.reposition(1, item.y) item.e.show() - log.debug("iterated " .. item.e.get_id()) + -- log.debug("iterated " .. item.e.get_id()) end content_height = next_y @@ -212,7 +212,7 @@ local function listbox(args) ---@param child graphics_element child element function e.on_added(id, child) 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() end @@ -222,12 +222,12 @@ local function listbox(args) for idx, elem in ipairs(list) do if elem.id == id then table.remove(list, idx) - log.debug("removed child " .. id .. " from slot " .. idx) + -- log.debug("removed child " .. id .. " from slot " .. idx) update_positions() return end end - log.debug("failed to remove child " .. id) + -- log.debug("failed to remove child " .. id) end -- handle focus