Skip to content
Christopher Crain edited this page Jan 20, 2015 · 7 revisions

TODO:

Basic Tutorials

Basic Setup

  1. Declare the Neoforce Control Manager at the top of your game class.

    private Manager _manager;

  2. In the game class constructor, instantiate the manager object.

 `_manager = new Manager(this, graphics, "Default");`   
  _Point the manager to the skins directory to use._   
 `_manager.SkinDirectory = @"<PathTo>\Skins";`
  1. Initialize the Neoforce Control Manager in the "Initialize" method of the game class.

    base.Initialize();
    _manager.Initialize();

  2. In the game class "Update" method, update the Neoforce Control Manager

    _manager.Update(gameTime);

  3. In the game class "Draw" method, make the call to draw all the controls in the Neoforce Control Manager

    _manager.BeginDraw(gameTime);
    // draw other stuff
    _manager.EndDraw();

First Window

_Note: Following the basic setup above to use the manager object.

  1. Declare a Window object in the game class.

    Window _window;

  2. Instantiate the Window object.

    _window = new Window(_manager);

  3. Initialize the window object.

    _window.Init()

  4. Give the window some dimensions.

    _window.Height = 200;
    _window.Width = 300;

  5. Add some text to the title bar.

    _window.Text = "Hello World";

  6. Set the position of the window.

    _window.Top = 10;
    _window.Left = 10;

  7. Add the window to the Neoforce Control Manager object.

    _manager.Add(_window);

  8. Launch game and see your window!

  • Buttons
  • Textbox
  • Listbox
  • Console

Advanced Tutorials

  • Custom Control
Clone this wiki locally