示例#1
0
 /// <summary>
 /// Queries how much space this menu entry requires.
 /// </summary>
 public virtual int GetHeight(MenuScreen screen)
 {
     return(screen.ScreenManager.Font.LineSpacing);
 }
示例#2
0
 /// <summary>
 /// Queries how wide the entry is, used for centering on the screen.
 /// </summary>
 public virtual int GetWidth(MenuScreen screen)
 {
     return((int)screen.ScreenManager.Font.MeasureString(Text).X);
 }
示例#3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            menuScreen = new MenuScreen(this);
            mGameWorld = new World(this);
            camera = new Camera(spriteBatch, this);
            mGameWorld.worldWidth = Width;
            mGameWorld.worldHeight = Height;
            mGameWorld.camera = camera;

            mGameWorld.menuScreen = menuScreen;
            mGameWorld.LoadContent(Content);
            menuScreen.LoadContent();
            // TODO: use this.Content to load your game content here
        }