Libraries for MonoGame and FNA that provide abstractions, quality of life improvements and additional features like a ui system and easy input handling.
Build and Run the Demo. Note that it runs just fine.
In MlemGame.LoadContent(), modify the initialization of this.InputHandler to set the optional handleX parameters as follows:
this.InputHandler = new InputHandler(this, true, true, false, false); // everything true but handleTouch
Build and Run again. Note the following runtime error:
"/path/to/mlem/clone/MLEM/Demos.DesktopGL/bin/Debug/net7.0/MLEM Desktop Demos"
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at MLEM.Ui.UiControls.Update() in /path/to/mlem/clone/MLEM/MLEM.Ui/UiControls.cs:line 226
at MLEM.Ui.UiSystem.Update(GameTime time) in /path/to/mlem/clone/MLEM/MLEM.Ui/UiSystem.cs:line 274
at Microsoft.Xna.Framework.Game.<>c.<.cctor>b__116_1(IUpdateable updateable, GameTime gameTime)
at Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
at Microsoft.Xna.Framework.Game.Update(GameTime gameTime)
at MLEM.Startup.MlemGame.DoUpdate(GameTime gameTime) in /path/to/mlem/clone/MLEM/MLEM.Startup/MlemGame.cs:line 144
at Demos.GameImpl.DoUpdate(GameTime gameTime) in /path/to/mlem/clone/MLEM/Demos/GameImpl.cs:line 117
at MLEM.Startup.MlemGame.Update(GameTime gameTime) in /path/to/mlem/clone/MLEM/MLEM.Startup/MlemGame.cs:line 102
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Microsoft.Xna.Framework.Game.Run()
at Demos.DesktopGL.Program.Main() in /path/to/mlem/clone/MLEM/Demos.DesktopGL/Program.cs:line 19
Environment: MacOS Ventura / M1 (arm64)
Repro steps:
MlemGame.LoadContent()
, modify the initialization ofthis.InputHandler
to set the optionalhandleX
parameters as follows: