public void ToggleEnabled(UserInterface ui)
 {
     enabled = !enabled;
     if (enabled)
         Connect(ui);
     else
         Disconnect(ui);
 }
        protected override void Initialize()
        {
            int w = Graphics.GraphicsDevice.DisplayMode.Width;
            int h = GraphicsDevice.DisplayMode.Height;
            System.Console.WriteLine("blah: " + w + h);

            SetResolution();

            Shaders.LoadContent(GraphicsDevice, Content);
            Fonts.LoadContent(Content);
            Textures.LoadHeightmaps(GraphicsDevice);
            Models.LoadContent(Content);

            world = new World(this);
            ui = new UserInterface(this);

            Components.Add(ui);
            Components.Add(world);

            ppManager = new PostProcessManager();

            base.Initialize();
        }
 public ScreenManager(UserInterface ui)
 {
     this.ui = ui;
     worldScreen = new WorldScreen(this);
 }
 public ScreenManager(UserInterface ui)
 {
     this.ui     = ui;
     worldScreen = new WorldScreen(this);
 }
 public void Disable(UserInterface ui)
 {
     enabled = false;
     Disconnect(ui);
 }
 public void Enable(UserInterface ui)
 {
     enabled = true;
     Connect(ui);
 }
 /// <summary>
 /// Disconnects the controls from the ui
 /// </summary>
 public void Disconnect(UserInterface ui)
 {
     foreach (Control c in controls)
         c.Unregister(ui.Mouse);
 }