Exemple #1
0
        public override void LoadContent()
        {
            base.LoadContent();

            SetColor(Color.White);
            SetTexture(TextureManager.CreateTexture2D("Textures/emptyPiece"));
            Frame.ChangeAllLinesColor(Color.Red);
        }
Exemple #2
0
        public Container CreateEpisodeMenuContainer()
        {
            ///////Container
            var container = new Container();

            container.SetTexture(TextureManager.CreateTexture2DBySingleColor(new Color(143, 166, 225)));
            container.SetSize(new Vector2(250, 200));
            container.SetFrame(Color.Black);


            var firstRow = new Row();

            firstRow.SetTexture(TextureManager.CreateTexture2D("Textures/coral"));

            var secondRow = new Row();

            secondRow.SetTexture(TextureManager.CreateTexture2DByRandomColor());

            container.AddRow(firstRow, 80);
            container.AddRow(secondRow, 20);
            container.PrepareRows();
            container.SetDragable(true);

            var column1 = new Column();

            column1.SetTexture(TextureManager.CreateTexture2DByRandomColor());

            var column2 = new Column();

            column2.SetTexture(TextureManager.CreateTexture2DByRandomColor());


            //secondRow.PrepareColumns(floatTo:"left");

            //cr2c1.SetPadding(new Vector2(10));

            secondRow.AddColumn(column1, 20);
            secondRow.AddColumn(column2, 80);
            secondRow.PrepareColumns(isCentralized: true, floatTo: "left");

            lastTriangle = Triangle.PlayButton(Color.Green);
            column1.AddImage(lastTriangle.Texture);


            column2.SetFont("Episode 1", Color.White);

            column2.Font.SetLayerDepth(0.55f);

            return(container);
        }
        public override bool Load()
        {
            TradeMarkLogo = TextureManager.CreateTexture2D("Textures/SmilemanLogo", "LibraryContent");

            var x = Global.ViewportRect.Center.X - (450 / 2);

            var y = Global.ViewportRect.Center.Y - (450 / 2) - 20;

            var w = 450;

            var h = 450;

            LogoRectangle = new Rectangle((int)x, (int)y, (int)w, (int)h);

            Font = new Font(text: "Arar Game.2010", fontColor: Color.White);

            var fontPosition = new Vector2(Global.ViewportRect.Center.X - Font.TextMeasure.X / 2, LogoRectangle.Bottom);

            Font.SetPosition(fontPosition);

            return(true);
        }
Exemple #4
0
 public void SetTexture(string assetName, string rootDirectory = "Content")
 {
     Texture = TextureManager.CreateTexture2D(assetName, rootDirectory);
 }