Create a 3d cube on a user's click

Hi everybody !

I’m currently using nifty Gui (xml) to create the user interface and i’d like to know how it is possible to Create a 3d cube on a user’s click.

Actually whenever a user click on a button he use a function of my class StartScreen but this function is neither the simpleInitApp function nor the simpleUpdate function.

Therefore i was wondering if it was possible to add a 3d cube to the scene even without being in any of those functions.


Yes. It’s very easy. Just make your screen controllers as App States too, and then your screens will have access to the app and the stataManager objects . Then in your buton event method in your screen controller / app state, create the cube as well xD. Read the nifty tutorials about how to use the screen controllers as app states and you are done ;). This is all!

ok thanks!