Beispiel #1
0
 public override void LoadContent(ContentManager Content)
 {
     base.LoadContent(Content);
     textPos = Position;
     font = new GameFont(new Rectangle(WindowRectangle.X + TextXOffset, WindowRectangle.Y + TextYOffset, WindowRectangle.Width - (TextXOffset * 2), WindowRectangle.Height - (TextYOffset * 2)), WindowRectangle.Width - (TextXOffset * 2));
     font.LoadContent(Content, FontColor.Blue);
     font.Text = "";
 }
Beispiel #2
0
        public override void LoadContent(ContentManager Content)
        {
            base.LoadContent(Content);
            infoWnd = Content.Load<Texture2D>("Data\\GFX\\InfoBox");

            font = new GameFont(new Rectangle(WindowRectangle.X + 10, WindowRectangle.Y + 10, WindowRectangle.Width - 20, WindowRectangle.Height - 20), WindowRectangle.Width - 30);
            font.LoadContent(Content, FontColor.Yellow);
            font.MultiLine = true;
        }
Beispiel #3
0
 public Window(Rectangle windowRectangle)
 {
     Active = false;
     WindowRectangle = windowRectangle;
     Position = new Vector2(WindowRectangle.X, WindowRectangle.Y);
     _title = new GameFont(new Rectangle(WindowRectangle.X, WindowRectangle.Y + 5, WindowRectangle.Width, (int)FontManager.GetCharHeight), WindowRectangle.Width);
     BackgroundColor = new Color(255, 161, 0);
     RasterizerState = new RasterizerState();
     Visible = true;
     DrawWindow = true;
     Initialized = false;
     AllowClose = true;
 }
Beispiel #4
0
        public override void LoadContent(ContentManager Content)
        {
            base.LoadContent(Content);

            if (Parent == null)
                font = new GameFont(WindowRectangle, WindowRectangle.Width);
            else
                font = new GameFont(new Rectangle(Parent.WindowRectangle.X + 8, Parent.WindowRectangle.Y + WindowRectangle.Y + (WindowRectangle.Height / 2 - 8), WindowRectangle.Width, WindowRectangle.Height), WindowRectangle.Width);
            font.LoadContent(Content);
            font.CenterText = true;

            WindowClicked += CheckBox_WindowClicked;
        }
Beispiel #5
0
        public override void LoadContent(ContentManager Content)
        {
            base.LoadContent(Content);

            if(Parent == null)
                this.txtText = new GameFont(WindowRectangle, WindowRectangle.Width);
            else
                this.txtText = new GameFont(
                    new Rectangle(
                        Parent.WindowRectangle.X + WindowRectangle.X + xTextOffset,
                        Parent.WindowRectangle.Y + WindowRectangle.Y + (WindowRectangle.Height / 2 - 8),
                        WindowRectangle.Width - (xTextOffset * 2),
                        WindowRectangle.Height),
                        WindowRectangle.Width);

            this.txtText.LoadContent(Content);
        }