Hey guys, it’s me again
so I started working on an app, and I needed to adjust the WIDTH and HEIGHT in order to test it for other devices, I remember this working in the past, but now… whenever I do it in setup, it only is adjusted during the setup, and reset after.
Am I doing something wrong or overlooked something?
small example…
function setup()
HEIGHT = 300
print(HEIGHT)
end
-- This function gets called once every frame
function draw()
print(HEIGHT)
end
I’ve searched the board and found this: http://codea.io/talk/discussion/3785/developing-a-universal-app
Not sure if it is helpful.
Yeah I guess I’ll have to use lowercase width and height, thanks, I probably didn’t remember it correctly, must’ve never worked as I remembered.
There has been issues raised about this in the past - sometimes it’s better to set them outside of setup(), also try pressing reset immediately after your app has started.
Although having done universal app development using Codea - the easiest way is to have your own globals called _WIDTH, _HEIGHT or DEVICE_WIDTH etc
@TechDoho yeah I just went with my own globals, wasn’t that hard so yeah