Ok, after getting my tiledmap to render within the bounds of a group, the actors are not rendering on the stage.
I added a log statement into the actor's draw event, so I am positive the event is firing and that the actor x/y is at the correct position on the stage, so I'm a little puzzled as to why nothing is being drawn.
The render event code is pretty basic:
Everything else renders fine, the main stage and its widgets, the map and all its layers (which you can pan/zoom just fine) just not the actors (which, I have double-checked are added to the MapStage, not the MainStage).
I've not used the Clip commands before; is there some step or command I need to issue prior to issuing the Draw method to make the stage's actors render?
I added a log statement into the actor's draw event, so I am positive the event is firing and that the actor x/y is at the correct position on the stage, so I'm a little puzzled as to why nothing is being drawn.
The render event code is pretty basic:
B4X:
' Do main stage
Main.MainStage.Camera.Update
If Main.OkToRenderFlag = True Then
Try
Main.MainStage.Act
Main.MainStage.Draw
Catch
modMain.MyLogColor("** ERROR clsGame.Render: Main.MainStage.Draw: " & LastException.Message, Colors.Red)
Return
End Try
End If
' update other things
Update
' Do the map stage
If Main.OkToRenderFlag = True Then
Try
Main.MapStage.Camera.Update
Main.MapStage.Act
' clip map and its actors to the group window on main stage
moMapGroup.ClipBegin
' render map
Main.MapRenderer.SetCameraView(Main.MapStage.Camera)
Main.MapRenderer.Render
' draw actors
Main.MapStage.Draw
' stop clipping
moMapGroup.ClipEnd
Catch
modMain.MyLogColor("** ERROR clsGame.Render: Main.MapStage.Draw: " & LastException.Message, Colors.Red)
Colors.Red)
End Try
End If
Everything else renders fine, the main stage and its widgets, the map and all its layers (which you can pan/zoom just fine) just not the actors (which, I have double-checked are added to the MapStage, not the MainStage).
I've not used the Clip commands before; is there some step or command I need to issue prior to issuing the Draw method to make the stage's actors render?