First off, I can see both sides of this and that there is a point to always assume portrait mode so we always know what to expect from a function call. On the other hand, my application is in landscape mode and everything in it also uses landscape coordinates, which means that getLogicalWidth(), getDeviceWidth() etc needs to switch places. I've even added my own Application:getWidth() and getHeight() that switches this, along with some functions that returns actual device width.
What I am thinking about is either to take into consideration if the app is portrait or landscape, or possibly that it would at least be configurable which is width and which is height. It really messes with my head to have two different coordinate systems.
Comments
I'll add these functions with the next version, thank you for the suggestion.
chipster123 & I are using this in "init.lua" as a temporary workaround for our landscape project:
application.originalGetLogicalWidth = application.getLogicalWidth
application.getLogicalWidth = function(self)
return self:originalGetLogicalHeight()
end
application.originalGetLogicalHeight = application.getLogicalHeight
application.getLogicalHeight = function(self)
return self:originalGetLogicalWidth()
end
Likes: atilim