If you use App.DesktopSize when creating a new window it'll stay a black window forever.
Works in Mojo and Mojo3D.
I'm using Monkey 2 v2018.04
#Import "<std>"
#Import "<mojo>"
Using std..
Using mojo..
Class MyWindow Extends Window
Method New()
' This causes a black screen
Super.New( "test", App.DesktopSize.X*.7, App.DesktopSize.Y*.7, WindowFlags.Resizable )
' But this works
'Super.New( "test", 1280, 720, WindowFlags.Resizable )
End
Method OnRender( canvas:Canvas ) Override
App.RequestRender()
canvas.DrawText( "Hello World!",Width/2,Height/2,.5,.5 )
End
End
Function Main()
New AppInstance
New MyWindow
App.Run()
End
Original Author: Hezkore
If you use App.DesktopSize when creating a new window it'll stay a black window forever. Works in Mojo and Mojo3D.
I'm using Monkey 2 v2018.04