コード例 #1
0
ファイル: ElementStyle.cs プロジェクト: gmich/GuiSystem
 public void Attach(ElementSelector selector, Action<StylingRule, double> ruleSet, AnimationSpan span)
 {
     var style = new StylingRule();
     ResolveSelector(selector, style);
     stylingrules.Add((time) =>
     {
         ruleSet(style, time);
         span.Update(time);
     });
     span.OnAnimationEnd += (sender, args) => stylingrules.RemoveAt(stylingrules.Count - 1);
 }
コード例 #2
0
ファイル: ElementStyle.cs プロジェクト: gmich/GuiSystem
 public void Attach(IGuiElement element, Action<StylingRule, double> ruleSet, AnimationSpan span)
 {
     var style = new StylingRule();
     AddElement(element, style, SelectorPriority.Default);
     stylingrules.Add((time) =>
     {
         ruleSet(style, time);
         span.Update(time);
     });
     span.OnAnimationEnd += (sender, args) => stylingrules.RemoveAt(stylingrules.Count - 1);
 }