[tekui-devel] tekui: Improved FloatText, Canvas; cleanup
hg-notify at neoscientists.org
hg-notify at neoscientists.org
Tue Feb 5 02:46:03 CET 2008
details: http://hg.teklib.org/tekui/rev/2777faad3ce1
changeset: 356:2777faad3ce1
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Tue Feb 05 02:37:54 2008 +0100
description:
Improved FloatText, Canvas; cleanup
diffs (truncated from 255 to 100 lines):
diff -r 8e58bd850d67 -r 2777faad3ce1 tek/app/ui/dynamic.lua
--- a/tek/app/ui/dynamic.lua Mon Feb 04 20:15:01 2008 +0100
+++ b/tek/app/ui/dynamic.lua Tue Feb 05 02:37:54 2008 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env lua
-require "tek.lib.debug".level = 2
+require "tek.lib.debug".level = 4
local ui = require "tek.lib.ui"
-- ui.DEBUG = true
diff -r 8e58bd850d67 -r 2777faad3ce1 tek/app/ui/tekui.lua
--- a/tek/app/ui/tekui.lua Mon Feb 04 20:15:01 2008 +0100
+++ b/tek/app/ui/tekui.lua Tue Feb 05 02:37:54 2008 +0100
@@ -276,10 +276,6 @@ ui.application:new
},
ui.handle:new { HMax = false },
ui.FloatText:new { Text = [[ Hello. My Handle is The Cuisinart Blade, (I have since changed it) most people called me C.B., just as another nickname. I got into computers because I always had a knack for Games, Programs, Etc... ]], },
- ui.handle:new { HMax = false },
- ui.listview:new
- {
- },
},
},
ui.group:new
diff -r 8e58bd850d67 -r 2777faad3ce1 tek/class/ui/area.lua
--- a/tek/class/ui/area.lua Mon Feb 04 20:15:01 2008 +0100
+++ b/tek/class/ui/area.lua Tue Feb 05 02:37:54 2008 +0100
@@ -30,7 +30,7 @@ local floor = math.floor
local floor = math.floor
module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 4.1"
+_VERSION = "Area 4.2"
local Area = _M
-------------------------------------------------------------------------------
@@ -272,7 +272,7 @@ end
function Area:draw(bgpen)
local d = self.Drawable
- bgpen = bgpen or d.Pens[ui.PEN_AREABACK]
+ bgpen = bgpen or d.Pens[self.BackPen or ui.PEN_AREABACK]
local dr = self.DamageRegion
if dr then
-- repaint intra-area damagerects:
diff -r 8e58bd850d67 -r 2777faad3ce1 tek/class/ui/canvas.lua
--- a/tek/class/ui/canvas.lua Mon Feb 04 20:15:01 2008 +0100
+++ b/tek/class/ui/canvas.lua Tue Feb 05 02:37:54 2008 +0100
@@ -16,7 +16,7 @@ local overlap = ui.Region.overlapCoords
local overlap = ui.Region.overlapCoords
module("tek.class.ui.canvas", tek.class.ui.frame)
-_VERSION = "Canvas 0.4"
+_VERSION = "Canvas 0.5"
local Canvas = _M
local DEF_CANVASAREA_MARGIN = { 0, 0, 0, 0 }
@@ -104,7 +104,7 @@ function Canvas:askMinMax()
ui.Group.getMinMax(self.Object)
local w = self.Width
local h = self.Height
- return 1, 1, w, h
+ return 0, 0, w, h
end
-------------------------------------------------------------------------------
diff -r 8e58bd850d67 -r 2777faad3ce1 tek/class/ui/floattext.lua
--- a/tek/class/ui/floattext.lua Mon Feb 04 20:15:01 2008 +0100
+++ b/tek/class/ui/floattext.lua Tue Feb 05 02:37:54 2008 +0100
@@ -19,11 +19,10 @@ local insert = table.insert
local insert = table.insert
local remove = table.remove
local concat = table.concat
-local min = math.min
local ipairs = ipairs
module("tek.class.ui.floattext", tek.class.ui.scrollgroup)
-_VERSION = "FloatText 0.3"
+_VERSION = "FloatText 0.4"
local FloatText = _M
-------------------------------------------------------------------------------
@@ -34,18 +33,39 @@ local TextCanvas = Canvas:newClass()
function TextCanvas:askMinMax()
ui.Group.getMinMax(self.Object)
- return 1, 1, ui.HUGE, self.Height
+ assert(self.Height)
+-- return 0, 0, ui.HUGE, self.Height
+ return 0, 0, ui.HUGE, ui.HUGE
end
function TextCanvas:layout(r1, r2, r3, r4, markdamage)
local w = r3 - r1 + 1 - self.MarginAndBorder[1] - self.MarginAndBorder[3]
self.ScrollGroup:setWidth(w)
- return Canvas.layout(self, r1, r2, r3, r4, markdamage)
-end
-
-function TextCanvas:relayout(e, r1, r2, r3, r4)
More information about the tekui-devel
mailing list