Inheritance: IPositionedSizedObject, IRenderable, IVisible
Esempio n. 1
0
        public void Add(NineSlice nineSlice, Layer layer = null)
        {
            mNineSlices.Add(nineSlice);

#if !TEST
            if (layer == null)
            {
                layer = Renderer.LayersWritable[0];
            }
            layer.Add(nineSlice);
#endif
        }
Esempio n. 2
0
        public void Add(NineSlice nineSlice, Layer layer = null)
        {
            mNineSlices.Add(nineSlice);

#if !TEST
            if (layer == null)
            {
                layer = Renderer.LayersWritable[0];
            }
            layer.Add(nineSlice);
#endif
        }
Esempio n. 3
0
 public void Remove(NineSlice nineSlice)
 {
     mNineSlices.Remove(nineSlice);
     Renderer.RemoveRenderable(nineSlice);
 }
        internal static bool TryHandleAsBaseType(string baseType, SystemManagers systemManagers, out IRenderable containedObject)
        {
            bool handledAsBaseType = true;
            containedObject = null;

            switch (baseType)
            {

                case "Container":

                    LineRectangle lineRectangle = new LineRectangle(systemManagers);
                    containedObject = lineRectangle;
                    break;

                case "Rectangle":
                    LineRectangle rectangle = new LineRectangle();
                    rectangle.IsDotted = false;
                    containedObject = rectangle;
                    break;
                case "Circle":
                    LineCircle circle = new LineCircle();
                    circle.CircleOrigin = CircleOrigin.TopLeft;
                    containedObject = circle;
                    break;

                case "ColoredRectangle":
                    SolidRectangle solidRectangle = new SolidRectangle();
                    containedObject = solidRectangle;
                    break;
                case "Sprite":
                    Texture2D texture = null;

                    Sprite sprite = new Sprite(texture);
                    containedObject = sprite;

                    break;
                case "NineSlice":
                    {
                        NineSlice nineSlice = new NineSlice();
                        containedObject = nineSlice;
                    }
                    break;
                case "Text":
                    {
                        Text text = new Text(systemManagers, "");
                        containedObject = text;
                    }
                    break;
                default:
                    handledAsBaseType = false;
                    break;
            }

            return handledAsBaseType;
        }
 private static void SetAlphaAndColorValues(NineSlice nineSlice, RecursiveVariableFinder rvf)
 {
     nineSlice.Color = ColorFromRvf(rvf);
 }
Esempio n. 6
0
 public void Remove(NineSlice nineSlice)
 {
     mNineSlices.Remove(nineSlice);
     Renderer.RemoveRenderable(nineSlice);
 }