Sorry for not being more clear the first time.
Here is the essential part of my logs. The rest is just loading layout files and creating mappings (I can't see how that would be helpful)
22/08/2012 20:38:02 (Std) ---- Version 0.7.7 (Build: Jul 25 2012 Debug Microsoft Windows MSVC++ 10.0 32 bit) ----
22/08/2012 20:38:02 (Std) ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
22/08/2012 20:38:02 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
22/08/2012 20:38:02 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
22/08/2012 20:38:02 (Std) ---- Scripting module is: None ----
Here are some images of two of the tabs in my application
http://i.imgur.com/NtZxy.pnghttp://i.imgur.com/BBfbn.pngThe top half of those two tabs are the same. Currently what I'm doing is when I get an event from the GetFriends button on the first tab, I populate the listbox in both windows at once.
What I would like to be able to do (I'm not sure if this is possible) is to populate the first listbox and have the listbox on the other tab be updated as well.
Currently these two tabs are being created as Listboxes in two different layout files.
Code: Select all
WindowManager::getSingleton().getWindow("SDKTestApp/Presence/GetFriends")->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&UserDlg::GetFriends, this));
WindowManager::getSingleton().getWindow("SDKTestApp/Friends/GetFriends")->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&UserDlg::GetFriends, this));
void UserDlg::GetFriends()
{
Listbox* friendsListFriends = static_cast<Listbox*>(WindowManager::getSingleton().getWindow("SDKTestApp/Friends/FriendsList"));
Listbox* friendsListPresence = static_cast<Listbox*>(WindowManager::getSingleton().getWindow("SDKTestApp/Presence/FriendsList"));
for (int i = 0; i < numFriends; ++i)
{
friendsListFriends->addItem(friend[i]);
friendsListPresence->addItem(friend[i]);
}
...
The only things I've thought to try are having the same widget in both tabs, but that causes CEGUI to assert when two items are named the same thing when loading the layout files. I've also tried reassigning the first list box to the other.
Normally I wouldn't worry too much about this, but since I'm creating another tab that has some more of this information as well, I would like to reduce the amount of code that I'm copying around.
Thanks,
Kevin