How do you change widget's name?
By the way, as I always refer widgets to their name for my Construct plugin, so it would be great that all widgets that create widgets set a name to them
What's the point of changing widget's name? There's no way to rename it now, but it's very easy to implement.
When you create widget last optional parameter of createWidget function is widget's name.
void setWidgetName(MyGUI::Widget* _widget, const std::string& _name)
std::string getWidgetName(MyGUI::Widget* _widget)
My concern is that in my plugin, the user uses only the widget name to address it.
I know that you can specify widget's name at creation but for widget created by MyGUI (e.g. ItemBox), no name is specified so users of my plugin cannot access them.
So, I need a find a way to be sure that all widgets have a name, so I will not have empty name when I call MyGUI function that uses widget name as input.
Ok, I will use my.name's solution. It's not perfect but I will deal with that. With this method I cant use MyGUI::Gui::getInstance().findWidget<T>()
Thanks for the help!