Some source code...

Well, here's a link to the class

http://paste.lisp.org/display/40830

I will not post the GUI Manager class because I need to modify it a little... Be patient :) So, how to use the class without the GUI Manager. Firstly you need to create it, something like this:

NGUIButtonSimple button = new NGUIButtonSimple(someArgs)

someArgs are arguments you are passing to the function, there are lots of them and they're all explained in the class. Also, you need to modify the class to use the texture you want, but you'll handle it :) If you have any questions, post a comment and it's done! Now, let's go on.

Here's also the NIGUIControl interface

http://paste.lisp.org/display/40832

The next step is whenever your engine is updated, you call the UpdateMouse class. I will also put up my input class later, but for now you will need to change that method.

And everytime you draw, call the RenderControl method, you also need to give it a active sprite batch.
If you change resolution, and want to update the control so it changes its width and height, call the SetResolutionFactor method. The resolution factor is a Vector2, and you can calculate a resolution factor like this:

http://paste.lisp.org/display/40832#1

Well, think that's it :)

1 comments:

  1. Anonymous said...

    Great work.  


 

Copyright 2006| Blogger Templates by GeckoandFly modified and converted to Blogger Beta by Blogcrowds.
No part of the content or the blog may be reproduced without prior written permission.