Android libgdx big screen resolution

前端 未结 2 1113
醉梦人生
醉梦人生 2021-02-06 15:57

How can I support (make an algorithm) for libgdx for supporting multiple screen resolution? I made my app work on HTC Tattoo using if statments with parameters like:

         


        
2条回答
  •  鱼传尺愫
    2021-02-06 16:21

    See a more elegant solution at http://www.java-gaming.org/index.php?topic=25685.0 (also see Nate's comment to that solution).

    Also, if you use scene2d, note that currently (libgdx 0.9.6) stage.setViewport method should have this functionality, but it doesn't really behave as one would expect.

    Update: setViewPort was fixed, so this works just as expected.

提交回复
热议问题