| @@ -365,11 +365,11 @@ function LinearLayout() | |||
| local reversed = false | |||
| self.getset("orientation", | |||
| function() return orientation end, | |||
| function(val) orientation = val end) | |||
| function() return orientation end, | |||
| function(val) orientation = val end) | |||
| 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.setColors(screen) | |||
| @@ -495,16 +495,16 @@ function TextView() | |||
| local 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.x(x) | |||
| @@ -555,29 +555,29 @@ function TextInput() | |||
| local cursor = 0 | |||
| 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", | |||
| function() return backgroundInactive end, | |||
| function(val) backgroundInactive = val end) | |||
| function() return backgroundInactive end, | |||
| function(val) backgroundInactive = val end) | |||
| self.getset("backgroundActive", | |||
| function() return backgroundActive end, | |||
| function(val) backgroundActive = val end) | |||
| function() return backgroundActive end, | |||
| function(val) backgroundActive = val end) | |||
| self.getset("foregroundInactive", | |||
| function() return foregroundInactive end, | |||
| function(val) foregroundInactive = val end) | |||
| function() return foregroundInactive end, | |||
| function(val) foregroundInactive = val end) | |||
| 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.x(x) | |||
| @@ -678,17 +678,17 @@ function Button() | |||
| local foregroundActive = "white" | |||
| self.getset("backgroundInactive", | |||
| function() return backgroundInactive end, | |||
| function(val) backgroundInactive = val end) | |||
| function() return backgroundInactive end, | |||
| function(val) backgroundInactive = val end) | |||
| self.getset("backgroundActive", | |||
| function() return backgroundActive end, | |||
| function(val) backgroundActive = val end) | |||
| function() return backgroundActive end, | |||
| function(val) backgroundActive = val end) | |||
| self.getset("foregroundInactive", | |||
| function() return foregroundInactive end, | |||
| function(val) foregroundInactive = val end) | |||
| function() return foregroundInactive end, | |||
| function(val) foregroundInactive = val end) | |||
| 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.foreground(foregroundInactive) | |||