AddNextClickAction
Introduction
Code Example
var popupPanel = new StackPanel();
popupPanel.IsVisible = false;
popupPanel.Anchor(Anchor.Center);
Gum.ModalRoot.AddChild(popupPanel);
for(int i = 0; i < 5; i++)
{
var innerButton = new Button();
popupPanel.AddChild(innerButton);
innerButton.Text = "Button " + i;
innerButton.Click += (_,_) =>
{
System.Diagnostics.Debug.WriteLine("Clicked " + innerButton.Text);
};
}
var button = new Button();
button.AddToRoot();
button.Anchor(Anchor.Center);
button.Text = "Click me to show popup";
button.Y = -200;
button.Click += (not, used) =>
{
popupPanel.IsVisible = true;
InteractiveGue.AddNextClickAction(() =>
{
popupPanel.IsVisible = false;
});
};

Last updated
Was this helpful?

