diff --git a/graphics/element.lua b/graphics/element.lua index 97b88f7..e151227 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -106,7 +106,7 @@ function element.new(args) end -- draw the element given new data - function public.draw(...) + function public.update(...) protected.on_update(...) end @@ -120,6 +120,11 @@ function element.new(args) protected.window.setVisible(false) end + -- re-draw the element + function public.redraw() + protected.window.redraw() + end + return protected end