Simple Setup
By the end of this tutorial you will know how to add Neoforce to your project,
Steps
- Reference Neoforce
- Import Neoforce and Define Basic Neoforce Objects
- Run
Reference Neoforce
First things first, we need to reference neoforce into the project
- Open Visual Studio, Create/Or Open a new Windows Project
- Ctrl + Shift + N
- Windows Game(3.1)/Windows Game(4.0)
- Open the solution explorer
- Ctrl + W+ S
- Right click the references item under your project
- Click Add References...
- Browse
- Find the Neoforce binary's (C:\Program Files\Tom Shane\Neoforce Controls\Bin)
- Select TomShane.Neoforce.Controls.dll and click Ok
Import Neoforce and Define Basic Neoforce Objects
Before beginning this Step, please copy the Skins folder from the Neoforce directory into your Projects debug and release Content folder
Import Neoforce into your project
using TomShane.Neoforce.Controls;
Define Basic Objects
Put these with the graphics object
//Neoforce Manager
private Manager manager;
Change the Game Construct to start the Manager
//Show the cursor
IsMouseVisible = true;
// Create an instance of manager using Default skin. We set the fourth parameter to true,
// so the instance of manager is registered as an XNA game component and methods
// like Initialize(), Update() and Draw() are called automatically in the game loop.
// If you set this parameter to false, you have to call Manager.Initialize(),
// Manager.Update() and Manager.Draw() manually in their respective overriden methods
// of the game class.
// If you use two-parameter constructor, Default skin is used and manager is registered.
manager = new Manager(this, graphics, "Default", true);
Run
- Build and run your project
And you should see the Neoforce Cursor
Confused? Not quite sure if you did something wrong or not? use the discussion section and ask for some help