Troubleshooting Events
Introduction
GetEventFailureReason
using MonoGameGum.Input; // Adds GetEventFailureReason extension method
Button button;
protected override void Initialize()
{
GumUI.Initialize(this, DefaultVisualsVersion.V3);
button = new Button();
button.AddToRoot();
button.IsVisible = false;
base.Initialize();
}
protected override void Update(GameTime gameTime)
{
GumUI.Update(gameTime);
var failureReason =
GumUI.Cursor.GetEventFailureReason(button);
System.Diagnostics.Debug.WriteLine(failureReason);
base.Update(gameTime);
}Detecting Which Control is Under the Cursor
Last updated
Was this helpful?

