Exemplo n.º 1
0
        /// <summary>
        /// Update the WidgetTree handled by the manager.
        /// It calls the Update methods of the widgets, handles the interactions with the device etc.
        /// </summary>
        public void Update()
        {
            var transitions = _userInteractionHandler.UpdateAndGenerateTransitions(Root);

            foreach (var t in transitions)
            {
                t.Execute();
            }

            TreeVisitor.UpdateTree(Root);
        }
Exemplo n.º 2
0
 public void CurrentInteraction_OnStateChange_Changes()
 {
     _device.Setup(de => de.GetPointedLocation()).Returns(new Vector2(1, 4));
     _handler.Device = _device.Object;
     _handler.UpdateAndGenerateTransitions(_widgetTree);
     _intRun.Verify(r => r.NextState(_widgetTree, Interaction.Entered), Times.Once);
 }