Apostate
20-08-2012 14:28:53
This feels like it's going to be another dumb question, but I'll ask anyways. I made a console window in the layout editor and exported a class cpp/h for it. I'm using
to make an instance of it. I can use
to find it as a WindowPtr, but how do I go from there to the ConsoleWindow class I made for it so i can actually use the functions I added to it? Apparently I can just do
instead of loadLayout and hold onto the ConsoleWindow*, but I'd rather not have to track all my windows myself if I don't have to, although I will if that's what I'm supposed to be doing. It doesn't like trying to cast from MyGUI::WindowPtr to my ConsoleWindow* (I guess this class is more a container of widgets than an actual widget or something?). I haven't been able to find anything in the docs about this, so I'm just kind of making it up as I go along. How is this supposed to work?
MyGUI::LayoutManager::getInstance().loadLayout("console.layout");
to make an instance of it. I can use
MyGUI::WindowPtr console = m_GUI->findWidget<MyGUI::Window>("consoleWindow");
to find it as a WindowPtr, but how do I go from there to the ConsoleWindow class I made for it so i can actually use the functions I added to it? Apparently I can just do
ConsoleWindow* console = new ConsoleWindow()
instead of loadLayout and hold onto the ConsoleWindow*, but I'd rather not have to track all my windows myself if I don't have to, although I will if that's what I'm supposed to be doing. It doesn't like trying to cast from MyGUI::WindowPtr to my ConsoleWindow* (I guess this class is more a container of widgets than an actual widget or something?). I haven't been able to find anything in the docs about this, so I'm just kind of making it up as I go along. How is this supposed to work?
