Quick questions about Gideros&Lua

Comments

should pop up the native keyboard and return true if it was able to do so.3) Seems like you forgot to specify the arg to Core.random[Seed], which specify which random generator to use. Basically there is guarantee that lua math.random will produce the same random sequence for a given seed on all platforms, as it relies on OS provided random functions. Core.random() guarantees this.

The Lua built-in random number generator may produce the same sequence on one device (if you set the seed), but on a different os or brand of device it may produce a different sequence. The core version will produce the same sequence on all devices - if you set the seed.

That will automatically try add characters from the fonts in turn (until it gives up) as they are needed. The '3' gives a nice smoothing to the font. The Japanese font was a little large compared to the others so the size is set slightly smaller.

The big size is mostly due to all precompiled export templates and players gideros has: libs with associated debugging information can be above 100MB per platform. They are particularly huge on windows phone, windows 8, iOS and Apple TV. Take a the size of players and templates folders in your gideros installation, you will see what I mean.

So basically we use a RenderTarget as our bitmaps texture. This means we can draw into the RenderTarget and it gets updated in realtime on the screen. Then we just make our way through the text char by char and position/draw it to the RenderTarget until we are done.

If you are using a fixed width font then you can use formatting to ensure it doesn't wrap in the middle of a word.

It could be greatly enhanced by making it's own class but it's 11pm here and I am tired

-- create pixels as children of a Spritelocal pixels = Sprite.new()for i =1, 7do
pixels:addchild(Pixel.new(blackColor, 0.10, appW, 42))end
self:addChild(pixels)-- to iterate through the pixels using this method..for i = pixels:getnumChildren(), 1, -1dolocal pixel = pixels:getChildAt(i)-- do stuff with pixelend