Example #1
0
        public Menu(Library.States.State previousState, string headerText, bool immediate)
        {
            mPreviousState = previousState;

            mHeaderText = headerText;

            mActions = new List<Action>();

            mOffsetX = 240f + (immediate ? 0 : 480f);

            mSelection = 0;

            mCurrentKeyCode = Keys.None;

            mBackground = new Library.Graphics.Flat(new Vector2(Application.Instance.GraphicsDevice.Viewport.Width, Application.Instance.GraphicsDevice.Viewport.Height), Color.Black, null);
            mBackground.Layer = Layers.Menu;

            mIgnoreKeys = new Dictionary<Keys, bool>();
            mIgnoreButtons = new Dictionary<Buttons, bool>();

            mBackground.Opacity = .75f;

            mHeader = new Library.Graphics.String("fonts/menus/headers", mHeaderText);
            mHeader.Layer = Layers.MenuText;
        }
Example #2
0
 public Library.States.State ReleasePreviousState()
 {
     Library.States.State state = mPreviousState;
     mPreviousState = null;
     return state;
 }