コード例 #1
0
ファイル: Icon.cs プロジェクト: Moth-Tolias/Pulsar4x
 public SimpleCircle(ECSLib.IPosition positionDB, double radius, SDL.SDL_Color colour)
 {
     _positionDB  = positionDB;
     positionByDB = true;
     _shape       = new Shape()
     {
         Points = CreatePrimitiveShapes.Circle(0, 0, radius, 128),
         Color  = colour,
     };
 }
コード例 #2
0
        void Unknown()
        {
            short segments = 24;
            var   points   = CreatePrimitiveShapes.Circle(0, 0, 100, segments);
            //colors picked out of my ass .
            //TODO: use minerals for this? but migth not have that info. going to have to work in with sensor stuff.
            byte r = 100;
            byte g = 100;
            byte b = 100;
            byte a = 255;

            SDL.SDL_Color colour = new SDL.SDL_Color()
            {
                r = r, g = g, b = b, a = a
            };
            Shapes.Add(new Shape()
            {
                Color = colour, Points = points
            });
        }
コード例 #3
0
        void Terestrial()
        {
            _iconMinSize = 8;
            short segments = 32;
            var   points   = CreatePrimitiveShapes.Circle(0, 0, 100, segments);


            //colors picked out of my ass for a blue/green look.
            //TODO: use minerals for this? but migth not have that info. going to have to work in with sensor stuff.
            byte r = 0;
            byte g = 100;
            byte b = 100;
            byte a = 255;

            SDL.SDL_Color colour = new SDL.SDL_Color()
            {
                r = r, g = g, b = b, a = a
            };
            Shapes.Add(new Shape()
            {
                Color = colour, Points = points
            });
        }
コード例 #4
0
        void Setup()
        {
            Shapes = new List <Shape>(5);
            CreateProgradeArrow();

            Shape dot = new Shape()
            {
                Points = CreatePrimitiveShapes.Circle(0, 0, 3, 6),
                Color  = PrimaryColour
            };
            Shape circle = new Shape()
            {
                Points = CreatePrimitiveShapes.Circle(0, 0, 8, 12),
                Color  = PrimaryColour
            };

            //Shapes[0] = vectorArrow;
            //Shapes[1] = dot;
            //Shapes[2] = circle;
            //Shapes[3] = chevron;
            //Shapes[4] = chevron2;
            Shapes.Add(dot);
            Shapes.Add(circle);
        }