Inheritance: IPositionedSizedObject, IRenderable, IVisible
コード例 #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
        }
コード例 #2
0
ファイル: SpriteManager.cs プロジェクト: vchelaru/FlatRedBall
        public void Add(NineSlice nineSlice, Layer layer = null)
        {
            mNineSlices.Add(nineSlice);

#if !TEST
            if (layer == null)
            {
                layer = Renderer.LayersWritable[0];
            }
            layer.Add(nineSlice);
#endif
        }
コード例 #3
0
ファイル: SpriteManager.cs プロジェクト: vchelaru/FlatRedBall
 public void Remove(NineSlice nineSlice)
 {
     mNineSlices.Remove(nineSlice);
     Renderer.RemoveRenderable(nineSlice);
 }
コード例 #4
0
        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;
        }
コード例 #5
0
 private static void SetAlphaAndColorValues(NineSlice nineSlice, RecursiveVariableFinder rvf)
 {
     nineSlice.Color = ColorFromRvf(rvf);
 }
コード例 #6
0
 public void Remove(NineSlice nineSlice)
 {
     mNineSlices.Remove(nineSlice);
     Renderer.RemoveRenderable(nineSlice);
 }