Browse Source

fixed derpy indentation

master
mort 8 years ago
parent
commit
f696d61444
1 changed files with 40 additions and 40 deletions
  1. 40
    40
      lib/graphics.lua

+ 40
- 40
lib/graphics.lua View File

local reversed = false local reversed = false


self.getset("orientation", self.getset("orientation",
function() return orientation end,
function(val) orientation = val end)
function() return orientation end,
function(val) orientation = val end)
self.getset("reversed", self.getset("reversed",
function() return reversed end,
function(val) reversed = val end)
function() return reversed end,
function(val) reversed = val end)


self.draw = function(screen) self.draw = function(screen)
self.setColors(screen) self.setColors(screen)
local text = "" local text = ""


self.getset("text", self.getset("text",
function() return text end,
function(val)
local pre = text
text = tostring(val)
if #pre == #text then
self.emit("mustredraw", self)
else
self.emit("mustreflow")
end
end)
function() return text end,
function(val)
local pre = text
text = tostring(val)
if #pre == #text then
self.emit("mustredraw", self)
else
self.emit("mustreflow")
end
end)


self.reflow = function(screen, x, y) self.reflow = function(screen, x, y)
self.x(x) self.x(x)
local cursor = 0 local cursor = 0


self.getset("text", self.getset("text",
function() return text end,
function(val)
local pre = text
text = tostring(val)
if #pre == #text then
self.emit("mustredraw", self)
else
self.emit("mustreflow")
end
end)
function() return text end,
function(val)
local pre = text
text = tostring(val)
if #pre == #text then
self.emit("mustredraw", self)
else
self.emit("mustreflow")
end
end)


self.getset("backgroundInactive", self.getset("backgroundInactive",
function() return backgroundInactive end,
function(val) backgroundInactive = val end)
function() return backgroundInactive end,
function(val) backgroundInactive = val end)
self.getset("backgroundActive", self.getset("backgroundActive",
function() return backgroundActive end,
function(val) backgroundActive = val end)
function() return backgroundActive end,
function(val) backgroundActive = val end)
self.getset("foregroundInactive", self.getset("foregroundInactive",
function() return foregroundInactive end,
function(val) foregroundInactive = val end)
function() return foregroundInactive end,
function(val) foregroundInactive = val end)
self.getset("foregroundActive", self.getset("foregroundActive",
function() return foregroundActive end,
function(val) foregroundActive = val end)
function() return foregroundActive end,
function(val) foregroundActive = val end)


self.reflow = function(screen, x, y) self.reflow = function(screen, x, y)
self.x(x) self.x(x)
local foregroundActive = "white" local foregroundActive = "white"


self.getset("backgroundInactive", self.getset("backgroundInactive",
function() return backgroundInactive end,
function(val) backgroundInactive = val end)
function() return backgroundInactive end,
function(val) backgroundInactive = val end)
self.getset("backgroundActive", self.getset("backgroundActive",
function() return backgroundActive end,
function(val) backgroundActive = val end)
function() return backgroundActive end,
function(val) backgroundActive = val end)
self.getset("foregroundInactive", self.getset("foregroundInactive",
function() return foregroundInactive end,
function(val) foregroundInactive = val end)
function() return foregroundInactive end,
function(val) foregroundInactive = val end)
self.getset("foregroundActive", self.getset("foregroundActive",
function() return foregroundActive end,
function(val) foregroundActive = val end)
function() return foregroundActive end,
function(val) foregroundActive = val end)


self.background(backgroundInactive) self.background(backgroundInactive)
self.foreground(foregroundInactive) self.foreground(foregroundInactive)

Loading…
Cancel
Save