Possible bug: TextButton DoClick() gives error
Error log:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Myra.Graphics2D.UI.Widget.OnTouchDown()
at Myra.Graphics2D.UI.Container.OnTouchDown()
at Myra.Graphics2D.UI.ButtonBase1.OnTouchDown() at Myra.Graphics2D.UI.ButtonBase1.DoClick()
at MPNext.GeneratedECS.datatype.Component_Global.GenerateDebugUI(VerticalStackPanel panel, Component component) in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\MonoDebugUI\Components\ComponentGlobal.cs:line 58
at MPNext.MonoDebugUI.ElementInspectorWindow.GenerateComponent(UInt64 component_id) in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\MonoDebugUI\ElementInspectorWindow.cs:line 80
at MPNext.MonoDebugUI.ElementInspectorWindow.Update() in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\MonoDebugUI\ElementInspectorWindow.cs:line 63
at MPNext.MonoDebugUI.ElementInspectorWindow..ctor(UInt64 entity_id) in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\MonoDebugUI\ElementInspectorWindow.cs:line 30
at MPNext.MonoDebugUI.ECSTreeWindow.InspectElement_Click(Object sender, EventArgs e) in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\MonoDebugUI\ECSTreeWindow.cs:line 64
at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets) at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets)
at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets) at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets)
at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets) at Myra.Utility.InputHelpers.ProcessTouchUp(List1 widgets)
at Myra.Utility.InputHelpers.ProcessTouchUp(List`1 widgets)
at Myra.Graphics2D.UI.Desktop.HandleButton(Boolean isDown, Boolean wasDown, MouseButtons buttons)
at Myra.Graphics2D.UI.Desktop.UpdateMouseInput()
at Myra.Graphics2D.UI.Desktop.UpdateInput()
at Myra.Graphics2D.UI.Desktop.Render()
at MPNext.Game1.Draw(GameTime gameTime) in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\Game1.cs:line 91
at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at MPNext.Program.Main() in C:\Users\Laptop Glenn\Documents\MonopolisNext\MPNext\Program.cs:line 11
Need complete sample. As I can't reproduce by just calling DoClick.