added ag::getTextSize(), varying text size demo in tests/cratestack.lua

git-svn-id: svn://anubis/anaglym/trunk@165 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop committed 2009-11-13 05:16:16 +00:00
1 parent c26a3e7deb
commit d4df124dcc
5 files changed
+31 -3

No files matched your search

+9 -1
View File
@@ -44,5 +44,13 @@ function mouse_moves(x, y, xrel, yrel)
end
function update_overlay_event()
ag.drawText("Hi there everyone!", 1, 0.7, 0, 16, 0, 0)
y = 4
size = 16
for i = 0, 17 do
local message = "Hello there"
local width, height = ag.getTextSize(message, size)
ag.drawText(message, 1, 0.7, 0, size, 2, y)
y = y + height + 4
size = size + 4
end
end