Example #1
0
        public Button(System.Action clickEvent)
        {
            AddToClassList(ussClassName);

            // Click-once behaviour
            clickable = new Clickable(clickEvent);
        }
Example #2
0
        /// <summary>
        /// Constructs a button with an Action that is triggered when the button is clicked.
        /// </summary>
        /// <param name="clickEvent">The action triggered when the button is clicked.</param>
        /// <remarks>
        /// By default, a single left mouse click triggers the Action. To change the activator, modify <see cref="clickable"/>.
        /// </remarks>
        public Button(Action clickEvent)
        {
            AddToClassList(ussClassName);

            // Click-once behaviour
            clickable = new Clickable(clickEvent);
            focusable = true;

            RegisterCallback <NavigationSubmitEvent>(OnNavigationSubmit);
        }
Example #3
0
 public Button(Action clickEvent)
 {
     base.AddToClassList(Button.ussClassName);
     this.clickable = new PointerClickable(clickEvent);
 }
Example #4
0
 public void SetAction(System.Action clickEvent, long delay, long interval)
 {
     this.RemoveManipulator(m_Clickable);
     m_Clickable = new Clickable(clickEvent, delay, interval);
     this.AddManipulator(m_Clickable);
 }