Friday, March 20, 2009

Shift UI in Ogre dynamically

Changing UI dynamically in the application is needed especially when you want the user do something step by step.

At the beginning, I thought it would be very difficult. Also I found nothing when searching on the Internet. When I noticed the ui is loaded through following method:

CEGUI::Window *sheet=CEGUI::WindowManager::getSingleton().loadWindowLayout(

How about directly changing the ui when certain events occurs. Have a try. I just added the above code to a button event, using a new UI layout file. When I click that button, it works!!!!

No comments:

Post a Comment