Beispiel #1
0
 public override void ThrowPushEvent()
 {
     _init = false;
     Control.FromHandle(ContentButler.GetGame().Window.Handle).Controls.Remove(text1);
     text1.Dispose();
     Master.Pop();
 }
Beispiel #2
0
 private void Initialize()
 {
     // Note -- I apologies for this ball of code. This is just to show
     // off that you can modify the properties of Form objects still.
     text1             = new TextBox();
     text1.Location    = new System.Drawing.Point(40, 40);
     text1.BorderStyle = BorderStyle.None;
     text1.Multiline   = true;
     text1.Size        = new Size(400, 400);
     text1.Text        = MenuText;
     // HACK -- Object would otherwise draw over the Debugger Menu if this option was not set.
     text1.Visible = false;
     // REQUIRED -- This is what makes System.Forms draw on XNA. This brings it to XNA's window handle, allowing it to draw.
     Control.FromHandle(ContentButler.GetGame().Window.Handle).Controls.Add(text1);
     base._HandlesInput = true;
     _init = true;
 }
Beispiel #3
0
 public override void Update(GameTime gameTime)
 {
     if (_init != true)
     {
         Initialize();
     }
     else
     {
         // BUG -- Strange. You have to click OFF the game window first, then back onto the game window for the Input method to fire properly. Thoughts?
         if (ContentButler.GetGame().IsActive)
         {
             UpdateInput(gameTime);
         }
         else
         {
             ActivateState();
         }
     }
 }