public void Aggregate(AggregationEntry entry, AggregationContext context) { if (disableWhen(inputHelper)) { return; } if (!context.FirstEntry) { return; } double timeDelta = context.Time(span => span.TotalSeconds); if (ShouldHandle(next, AggregationAction.Next, timeDelta)) { context.Reset(); context.FocusControlAt(context.Indexer.Next); } if (ShouldHandle(previous, AggregationAction.Previous, timeDelta)) { context.Reset(); context.FocusControlAt(context.Indexer.Previous); } if (ShouldHandle(trigger, AggregationAction.Trigger, timeDelta)) { context[context.Indexer.Current].Events.OnClicked(); } aggrAction = scriptHasEvaluated ? aggrAction : AggregationAction.None; scriptHasEvaluated = false; context.FirstEntry = false; }
private void CheckFocus(AggregationEntry entry, AggregationContext context) { if (input.IsLeftButtonClicked()) { if (entry.Token.HasHover && !entry.Control.HasFocus) { context.FocusControlAt(entry.Index); entry.Token.GotFocusBy = this; } else if (!entry.Token.HasHover && entry.Control.HasFocus) { context.Reset(); entry.Token.GotFocusBy = null; } } CheckSelected(entry, context); }