-
Notifications
You must be signed in to change notification settings - Fork 9
Tutorials
TODO:
-
Declare the Neoforce Control Manager at the top of your game class.
private Manager _manager;
-
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";`
-
Initialize the Neoforce Control Manager in the "Initialize" method of the game class.
base.Initialize();
_manager.Initialize();
-
In the game class "Update" method, update the Neoforce Control Manager
_manager.Update(gameTime);
-
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();
_Note: Following the basic setup above to use the manager object.
-
Declare a Window object in the game class.
Window _window;
-
Instantiate the Window object.
_window = new Window(_manager);
-
Initialize the window object.
_window.Init()
-
Give the window some dimensions.
_window.Height = 200;
_window.Width = 300;
-
Add some text to the title bar.
_window.Text = "Hello World";
-
Set the position of the window.
_window.Top = 10;
_window.Left = 10;
-
Add the window to the Neoforce Control Manager object.
_manager.Add(_window);
-
Launch game and see your window!
- Buttons
- Textbox
- Listbox
- Console
- Custom Control