I'm expanding the assetmanager/screenmanger example based on the PacDroid example program.
Using the same basic UI structure as the PacDroid game, with the addition of the screen manager, I'm getting an error during the render event for the map:
Is this something I am doing incorrectly, or can a group render event only be called from the main render thread and not from a screen render thread?
-- Edit: Modified attached example to more closely follow the PacDroid UI setup.
Using the same basic UI structure as the PacDroid game, with the addition of the screen manager, I'm getting an error during the render event for the map:
B4X:
java.lang.IllegalStateException: SpriteBatch.end must be called before begin.
at com.badlogic.gdx.graphics.g2d.SpriteBatch.begin(SourceFile:161)
at com.badlogic.gdx.maps.tiled.renderers.BatchTiledMapRenderer.beginRender(SourceFile:166)
at com.badlogic.gdx.maps.tiled.renderers.BatchTiledMapRenderer.Render(SourceFile:127)
at b4a.example.clsmap._drawall(clsmap.java:120)
at b4a.example.main._grpmap_draw(main.java:463)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
<--snip-->
Is this something I am doing incorrectly, or can a group render event only be called from the main render thread and not from a screen render thread?
-- Edit: Modified attached example to more closely follow the PacDroid UI setup.
Attachments
Last edited: