| override fun create(): Unit { | |
| batch = SpriteBatch() | |
| var viewport = FitViewport(600f, 800f, OrthographicCamera()) | |
| stage = Stage(viewport) | |
| Textures.set("logo", TextureRegion(Texture("badlogic.jpg"))) | |
| stage.addActor(TestActor()) | |
| } | |
| override fun resize(width: Int, height: Int) { | |
| super.resize(width, height) | |
| stage.getViewport()!!.update(width, height, false) | |
| } | |
| override fun render(): Unit { | |
| stage.act() | |
| Gdx.gl!!.glClear(GL20.GL_COLOR_BUFFER_BIT); | |
| super.render() | |
| stage.draw() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment