Console window focus

Apr 21, 2013 at 2:41 PM
Edited Apr 21, 2013 at 2:47 PM
This is not a bug, but more of a preference. When I use the console, and it gains focus, I want the textbox to become the active control (so we are ready to enter chat text)

for console.cs I added "txtMain.Focused = true;"
public virtual bool TextBoxVisible
    {
      get { return textBoxVisible; }
      set
      {
        txtMain.Visible = textBoxVisible = value;
        txtMain.Focused = true;
        if (!value && channelsVisible) ChannelsVisible = false;
        PositionControls();
      }
    }
I guess I could have created a public method that set's it, but I wanted it done with one line within my code, so I dont have to remember 2 methods in the future... Call me lazy...

Linuxx

Edit
Adding more clarification,
I am enabling and disabling the chat input (using TextBoxVisible) based upon window focus. Looks cool, and prevents accidental input in the chat window while moving your character.
Developer
May 21, 2013 at 2:50 PM
Not a bad idea, many games do such a thing already.

Might add that into the next build of NeoForce.

This is of course if I can get SVN working correctly....