Пример #1
0
        public override void LoadContent()
        {
            base.LoadContent();
            background.LoadContent(0, 0, true, ScreenManager.Instance.Dimensions.X / 2732f);
            sign.LoadContent(0, 0, false, ScreenManager.Instance.Dimensions.X / 2732f);
            poster.LoadContent(0, (int)(350 * (ScreenManager.Instance.Dimensions.X / 1920f)), true, ScreenManager.Instance.Dimensions.X / 1920f);
            test_text.LoadContent();

            //Maak menu aan en zet op midde van scherm
            for (int i = 0; i < text.Length; i++)
            {
                menuItems[i].Position.X = 0;
                menuItems[i].Position.Y = 0;
                menuItems[i].LoadContent();
                menuLenght.Y += menuItems[i].imageselected.SourceRect.Height;
            }
            menuPosition.Y = poster.Position.Y + ((poster.SourceRect.Height - menuLenght.Y) / 2);

            int temp = 0;

            for (int i = 0; i < text.Length; i++)
            {
                if (i > 0)
                {
                    temp += menuItems[i - 1].imageselected.SourceRect.Height;
                    menuItems[i].Position.Y = menuPosition.Y + temp;
                }
                else
                {
                    menuItems[i].Position.Y = menuPosition.Y;
                }
                menuItems[i].SetPosition();
            }
        }
Пример #2
0
        public void LoadContent()
        {
            title.LoadContent();
            Vector2 textScale = new Vector2(GameSettings.Instance.Dimensions.X / (3200 / 1.25f), GameSettings.Instance.Dimensions.Y / (1800 / 1.25f));

            title.Scale = textScale;
        }
Пример #3
0
        public LevelIndicator()
        {
            Text = new cText("1", "DryGood");
            Text.LoadContent();

            width  = 1f / 3f * GameSettings.Instance.Tilescale.X;
            height = 0.25f * GameSettings.Instance.Tilescale.Y;
        }
Пример #4
0
        public void LoadContent()
        {
            textScale  = new Vector2(GameSettings.Instance.Dimensions.X / (3200 / 1.2f), GameSettings.Instance.Dimensions.Y / (1800 / 1.2f));
            imageScale = new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f);

            #region "Position the Text on the Y axis"
            textPos_Y  = 400 + ItemID * 110;
            imagePos_Y = 420 + ItemID * 110;

            textPos_Y  = textPos_Y * (GameSettings.Instance.Dimensions.Y / 1920);
            imagePos_Y = imagePos_Y * (GameSettings.Instance.Dimensions.Y / 1920);
            #endregion

            #region "Load Content"
            itemtitle.LoadContent();
            itemsetting.LoadContent();

            arrow_right.LoadContent(
                pos_X: 0,
                pos_Y: imagePos_Y,
                centered: false,
                scale: imageScale
                );
            arrow_left.LoadContent(
                pos_X: 0,
                pos_Y: imagePos_Y,
                centered: false,
                scale: imageScale
                );
            #endregion

            itemtitle.Scale   = textScale;
            itemsetting.Scale = textScale;


            x_scale = (GameSettings.Instance.Dimensions.X / 1920);


            tempPosition = 610 * x_scale;

            itemtitle.Position = new Vector2(tempPosition, textPos_Y);

            tempPosition += (itemtitle.SourceRect.Width * textScale.X) + (10 * x_scale);

            arrow_left.Position = new Vector2(tempPosition, arrow_left.Position.Y);

            tempPosition += (arrow_left.SourceRect.Width) + (10 * x_scale);

            itemsetting.Position = new Vector2(tempPosition, textPos_Y);

            arrow_right.Position = new Vector2(tempPosition + ((itemsetting.SourceRect.Width * textScale.X) + (10 * x_scale)), arrow_right.Position.Y);
        }
Пример #5
0
 public void LoadContent(int temp)
 {
     Text.LoadContent();
 }
Пример #6
0
        public virtual void LoadContent()
        {
            #region "LoadContent for the Images, and position them to the window dimensions"
            background.LoadContent(
                pos_X: 0,
                pos_Y: 0,
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            field_active.LoadContent(
                pos_X: (int)(573 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: 0,
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            mainbuttonup.LoadContent(
                pos_X: (int)(214 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: (int)(174 * GameSettings.Instance.Dimensions.Y / 1080),
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            mainbuttonup_pressed.LoadContent(
                pos_X: (int)(214 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: (int)(174 * GameSettings.Instance.Dimensions.Y / 1080),
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            mainbuttonmiddle.LoadContent(
                pos_X: (int)(214 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: (int)(443 * GameSettings.Instance.Dimensions.Y / 1080),
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            mainbuttondown.LoadContent(
                pos_X: (int)(214 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: (int)(802 * GameSettings.Instance.Dimensions.Y / 1080),
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );
            mainbuttondown_pressed.LoadContent(
                pos_X: (int)(214 * GameSettings.Instance.Dimensions.X / 1920),
                pos_Y: (int)(802 * GameSettings.Instance.Dimensions.Y / 1080),
                centered: true,
                scale: new Vector2(GameSettings.Instance.Dimensions.X / 2732f, GameSettings.Instance.Dimensions.Y / 1536f)
                );

            #endregion

            Vector2 textScale = new Vector2(GameSettings.Instance.Dimensions.X / (3200 / 1.2f), GameSettings.Instance.Dimensions.Y / (1800 / 1.2f));

            buttonback.LoadContent();
            buttoncontinue.LoadContent();

            buttonback.Scale     = textScale;
            buttoncontinue.Scale = textScale;

            float x_scale = (GameSettings.Instance.Dimensions.X / 1920);

            buttonback.Position     = new Vector2(350 * x_scale, 900 * x_scale);
            buttoncontinue.Position = new Vector2(1400 * x_scale, 900 * x_scale);
        }