예제 #1
0
 protected override bool IntegrateChild(AssetManager assets, LayoutTreeNode childNode)
 {
     switch (childNode.Key)
     {
         case "Transform":
             switch (childNode.Value)
             {
                 case "UITransform":
                     transform = new UITransform();
                     return true;
             }
             break;
         case "Elements":
             ContextElement contextElement = ContextHelper.ContextFromName(childNode.Value);
             if (contextElement != null)
             {
                 contextElement.SetComponents(UnderlyingContext);
                 contextElement.Integrate(assets, childNode);
                 elements.Add(contextElement);
                 return true;
             }
             break;
     }
     return false;
 }
예제 #2
0
파일: Canvas.cs 프로젝트: kjin/Ribbons
 /// <summary>
 /// Pushes a coordinate transform onto the canvas's stack of transforms.
 /// </summary>
 /// <param name="transform">The coordinate transform to push.</param>
 public void PushTransform(CoordinateTransform transform)
 {
     #if DEBUG
     if (displayDebugInformation)
         Console.WriteLine("CANVAS DEBUG: Pushed {0}", transform);
     #endif
     transformationStack.Add(transform);
 }