Hoto Landscape on device??
Monkey Targets Forums/Android/Hoto Landscape on device??
| ||
Good day and night for all residents forum! Please help me. How to change the screen orientation to landscape! I just started studying monkeys, and gathered the example of bananas (hours) and can not figure out how to change the orientation of the screen! |
| ||
Check this page: http://blitz-wiki.appspot.com/App_config_settings It's a bit out of date now, but check the Android section. |
| ||
therevills thx for link - but no result, i add file into MonkeyPro\bananas\difference\clock\clock.build\android thet call CONFIG.TXT and null result, i got same old mankey_game_***debug.app my config.txt file : ANDROID_APP_LABEL:String="Clock" ANDROID_APP_PACKAGE:String=com.Clock ANDROID_SCREEN_ORIENTATION=landscape ANDROID_NATIVE_GL_ENABLED=false where I could make a mistake |
| ||
Hi, Strange, it should work. Also, you can set this options in monkey code with hash. For example: [monkeycode] #If TARGET = "android" Then #ANDROID_SCREEN_ORIENTATION="landscape" #End [/monkeycode] It works fine for me. |
| ||
You need inverted commas I think: ANDROID_SCREEN_ORIENTATION="landscape" And as devolunter says, you need # at the start if you put it in code (which is way more convenient IMO, just stick it at the start of your main app file). You don't need #IF TARGET = "android", though: it will just ignore the directive if you are compiling for a different target. |
| ||
And you don't have config.txt files anymore but config.monkey! |
| ||
Ah, yes! Xaron is right CONFIG.TXT now renamed to CONFIG.MONKEY and must contain valid monkey code. |
| ||
That's why I said the link was out of date ;) @devolonter, btw you don't have to wrap the precompiler stuff with the target checks. |
| ||
config.monkey - work =)) many tnx for help |
| ||
Can you decide which way up the orientation is? Can you swap in game - for instance if you were making a two player game and wanted to rotate the screen 180 degrees each time a player makes a move to swap to player 2, etc? |
| ||
Nope, not automatically. You need to do this in your app by rotating your content. |
| ||
but.. the content will swap 180°, when the auto rotation is activated and the user cants the tablet... |