MonoGame.Forms - Create your Editor Environment!

MonoGame.Forms 2.3.0 - Video Support & OnMouseHoverUpdatesOnly


  • Added public GameTime to easily get the current game time of the game loop in a custom MonoGameControl.
  • Added public bool MouseHoverUpdatesOnly to enable controls updates when the mouse cursor is inside a custom MonoGameControl to save CPU power.
  • Added public void RunOneFrame() to run exactly one frame of a MonoGameControl to update its contents and immediately show the result to the user.
  • Updated the MonoGame.Framework to 3.8.0.270 and modified the VideoPlayer class to support video playback. [DX]

Video Example:

//Field
VideoPlayer _VideoPlayer;

//Loading
Video video = Editor.Content.Load<Video>("MyVideo");

//Instantiating
_VideoPlayer = new VideoPlayer(GraphicsDevice); //GraphicsDevice
_VideoPlayer.Play(video);

//Drawing
Editor.spriteBatch.Begin();
Editor.spriteBatch.Draw(_VideoPlayer.GetTexture(), new Vector2(0, 0), Color.White);
Editor.spriteBatch.End();

As you can see, you just need to give the new ctor of the VideoPlayer class the current GraphicsDevice.


It’s also possible to donate to the project now. This is taken from the Readme.md file:

Feel free to buy me a Lithium-ion battery so I can code like a machine!

… or simply show your support by donating what you want :>


I hope you like the new update and I wish you a nice weekend! :smiley:

Cheers,
Marcel Härtel

2 Likes