I want to set/load the font I imported in the New() method of my Window Class. I cannot get this to work, because I have no access to the private _canvas field.
This is my work around at the moment in the OnRender() method:
Method OnRender( c:Canvas) Override
' this forces rendering each frame.
' uses vsync
c.Font = Font.Load( "asset::arcade.ttf", 20 )
' drawing is done by calling canvas method
' key checks are method of the keyboard class
If Keyboard.KeyDown(Key.A) Then App.Terminate()
Of course, this sucks. I want to set up before hand, and I do not want to load a font file on each render. Has any of you solved this?
Oh and another thing: I see people using this method to run update code as well. How to separate updates from render code?? Can this be done or am I over complicating things??
You must be logged in to reply to this topic.
Monkey2 is an easy to use, cross platform, games oriented programming language from Blitz Research.