mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#418 fixed graphics bug with redraw
This commit is contained in:
parent
7374bb02d1
commit
5e9f03c900
@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
|
|||||||
|
|
||||||
local core = {}
|
local core = {}
|
||||||
|
|
||||||
core.version = "2.1.0"
|
core.version = "2.1.1"
|
||||||
|
|
||||||
core.flasher = flasher
|
core.flasher = flasher
|
||||||
core.events = events
|
core.events = events
|
||||||
|
@ -843,9 +843,12 @@ function element.new(args, child_offset_x, child_offset_y)
|
|||||||
|
|
||||||
-- re-draw this element and all its children
|
-- re-draw this element and all its children
|
||||||
function public.redraw()
|
function public.redraw()
|
||||||
|
local bg, fg = protected.window.getBackgroundColor(), protected.window.getTextColor()
|
||||||
protected.window.setBackgroundColor(protected.fg_bg.bkg)
|
protected.window.setBackgroundColor(protected.fg_bg.bkg)
|
||||||
protected.window.setTextColor(protected.fg_bg.fgd)
|
protected.window.setTextColor(protected.fg_bg.fgd)
|
||||||
protected.window.clear()
|
protected.window.clear()
|
||||||
|
protected.window.setBackgroundColor(bg)
|
||||||
|
protected.window.setTextColor(fg)
|
||||||
protected.redraw()
|
protected.redraw()
|
||||||
for _, child in pairs(protected.children) do child.get().redraw() end
|
for _, child in pairs(protected.children) do child.get().redraw() end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user