I’ve just got started with libgdx development, and I found MOE which seems to be handy for the iOS part. I’ve successfully got the application running on the iPhone emulator, now I need to programatically set the screen orientation in runtime. Is that doable with MOE, and if so how?
All I’ve got so far is the main class:
public class IOSMoeLauncher extends IOSApplication.Delegate {
protected IOSMoeLauncher(Pointer peer) {
super(peer);
}
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
config.useAccelerometer = false;
return new IOSApplication(new PickALine(new IOSMoePlatform(this)), config);
}
public static void main(String[] argv) {
UIKit.UIApplicationMain(0, null, null, IOSMoeLauncher.class.getName());
}
}
and the platform specific code (implementing an interface in the common package):
public class IOSMoePlatform implements Platform {
private IOSMoeLauncher launcher;
public IOSMoePlatform(IOSMoeLauncher launcher) {
this.launcher = launcher;
}
@Override
public void setOrientation(String orientation) {
//What to do here?
}
@Override
public boolean isMobile() {
return false;
}
@Override
public boolean isLandscape() {
return false;
}
@Override
public boolean isConnected() {
return true;
}
}
Also another question are the complete documentation of the moe classes? All I can find now in “docs” is some tutorials and guides, no javadocs.