java - LibGDX iOS RoboVM Landscape Orientation not fullscreen -



java - LibGDX iOS RoboVM Landscape Orientation not fullscreen -

fixed in libgdx 1.4.1

thank badlogic, guys rock!

the project generated using gdx-setup.jar file in stable build version 1.3.1 testing purposes. (i show later how update libgdx latest snapshot)

here screenshot of project on mac desktop:

*** can't post images, here url: http://i.imgur.com/ma43b8v.png

here screenshot of project on iphone 5s:

*** can't post images, here url: http://i.imgur.com/yqi9vhs.png

here build.gradle file project root folder.

buildscript { repositories { mavencentral() } dependencies { classpath 'org.robovm:robovm-gradle-plugin:1.0.0-alpha-04' } } allprojects { apply plugin: "eclipse" apply plugin: "idea" version = '1.0' ext { appname = 'my-gdx-game' gdxversion = '1.3.2-snapshot' robovmversion = '1.0.0-alpha-04' } repositories { mavencentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } } }

after making changes file, refreshed project using gradle. built know worked.

you can see have latest possible versions of libgdx , robovm. alter made code generated image size fit screen, showing inconsistency in screen sizing. code presented here:

package com.mygdx.game; import com.badlogic.gdx.applicationadapter; import com.badlogic.gdx.gdx; import com.badlogic.gdx.graphics.gl20; import com.badlogic.gdx.graphics.texture; import com.badlogic.gdx.graphics.g2d.spritebatch; public class mygdxgame extends applicationadapter { spritebatch batch; texture img; @override public void create () { batch = new spritebatch(); img = new texture("badlogic.jpg"); } @override public void render () { gdx.gl.glclearcolor(1, 0, 0, 1); gdx.gl.glclear(gl20.gl_color_buffer_bit); batch.begin(); batch.draw(img, 0, 0, gdx.graphics.getwidth(), gdx.graphics.getheight()); batch.end(); } // original code batch.draw(img, 0, 0); // added width , height stretch image total screen // alter applies image, not resolution or aspect ratio of viewport }

i'm struggling figure out, help appreciated!

be sure check answer

the file (build.gradle) mentioned in reply located @ root of projects, i.e, in same folder *-ios, *-android, *-core folders.

if above isn't enough, create sure info.plist (it's in ios project folder) has landscape orientations, this:

<key>uisupportedinterfaceorientations</key> <array> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array>

hope helps!

java ios iphone libgdx

Comments

Popular posts from this blog

c# - ASP.NET MVC Sequence contains no matching element -

java - Parsing XML, skip certain tags -

rest - How to invalidate user session on inactivity in a stateless server? -