|
Post by aliekens on Jan 22, 2018 1:31:17 GMT -8
Hey all,
I am new to the community with a fresh Gameduino 3 in my hands. In the kickstarter video, one demo was that it can run in 4 orientations, both portrait and landscape modes.
How do I tell the Gameduino 3 to run in a different orientation than the default?
Anthony,-
|
|
|
Post by jamesbowman on Jan 22, 2018 7:00:27 GMT -8
Sorry this isn't properly documented yet... after GD.begin(), you call one of GD.cmd_setrotate(2); to enter portrait mode. The argument controls orientation, 0 and 1 are landscape. 2 and 3 are portrait. (orientations 4-7 are mirrored versions, in case you're wondering). The variables GD.w and GD.h always hold the width and height of the screen - cmd_setrotate updates them. I've added this to the library FAQ
|
|
|
Post by aliekens on Jan 22, 2018 7:02:01 GMT -8
Thank you very much for your reply. This solves my problem.
|
|