Making a new widget...
Posted: Fri Dec 15, 2006 20:30
Let's say I have created a new widget in the looknfeel file, and I now wish to use it in my code. This is something the tutorial stops short on; for existing widgets, it is obvious that for a WindowsLook/Button you would create a CEGUI::PushButton. But what do you do if you have a new widget - UberCoolWidget? Everything is derived from CEGUI::Window, I think, so would I cast it to that while calling createWindow( "WindowsLook/UberCoolWidget", ... )?
But naturally that results in a runtime error for me, which I wholly expected. I can understand more complex controls not being usable without creating a back-end class to match, but can you not create a simple, new widget in the looknfeel file that will render and respond to the basic state changes and other events?
But naturally that results in a runtime error for me, which I wholly expected. I can understand more complex controls not being usable without creating a back-end class to match, but can you not create a simple, new widget in the looknfeel file that will render and respond to the basic state changes and other events?