Is there a way to not have to come up with a unique name for windows when you create them with
Window * CEGUI::WindowManager::createWindow(const String& type,const String& name)
I'm creating the windows dynamically and I really dont care what the window is called. It seems like now I have to write code to generate a name. This seems lame.
Why do I have to name every window?
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Why do I have to name every window?
This is how CEGUI works. You'll have to live with it!
I don't see the big issue with gerating a unique name for your windows, this could easily just be a counter:
But there are of course reasons for having the name based WindowManager, XML being one major.
I don't see the big issue with gerating a unique name for your windows, this could easily just be a counter:
Code: Select all
#include "CEGUIPropertyHelper.h"
CEGUI::String NewWindowName(void)
{
static CEGUI::uint counter = 0;
return CEGUI::PropertyHelper::uintToString(counter++);
}
But there are of course reasons for having the name based WindowManager, XML being one major.
Re: Why do I have to name every window?
Entities must have some kind of identification. A string is the most generic form of identification and is very suitable in many dffirent scenarios/solutions.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 5 guests