Button
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
void CustomInitialize()
{
var button = TutorialScreenGum
.GetGraphicalUiElementByName("ButtonInstance")
.FormsControlAsObject as Button;
button.Click += HandleButtonClick;
button.Push += HandleButtonPush;
}
private void HandleButtonClick(object sender, EventArgs e)
{
// handle click logic here
}
private void HandleButtonPush(object sender, EventArgs e)
{
// handle push logic here
}void CustomInitialize()
{
// This will construct a button using the default
// visual which should be set-up by Glue, or which can be
// manually set up in code.
var button = new Button();
button.Visual.AddToManagers();
button.Text = "Hello";
button.Click += HandleButtonClick;
button.Push += HandleButtonPush;
}
private void HandleButtonClick(object sender, EventArgs e)
{
// handle click logic here
}
private void HandleButtonPush(object sender, EventArgs e)
{
// handle push logic here
}