Question

local scaling = Application.CENTER
application:setScaleMode(scaling)

I tried using above code in Gideros but it gives an error that 'bad argument #1 to 'setScaleMode' (string expected, got nil) at setScaleMode, how can I fix this ?Actually, It did not recognise Application.CENTER , though according to Apress Lua game development, It should.

Was it helpful?

Solution

It seems that the constants are not set (probably a bug), but you can still use the values from here: http://docs.giderosmobile.com/reference/gideros/Application/setScaleMode#Application:setScaleMode

As application:setScaleMode("center")

But you can also set the value in the Gideros Studio project properties

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top