2013-02-17 01:56:07 +00:00
|
|
|
#include "exposedwindow.hpp"
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2019-04-26 07:37:57 +00:00
|
|
|
MyGUI::VectorWidgetPtr Window::getSkinWidgetsByName (const std::string &name)
|
2013-02-17 01:56:07 +00:00
|
|
|
{
|
|
|
|
return MyGUI::Widget::getSkinWidgetsByName (name);
|
|
|
|
}
|
|
|
|
|
2019-04-26 07:37:57 +00:00
|
|
|
MyGUI::Widget* Window::getSkinWidget(const std::string & _name, bool _throw)
|
2013-02-17 01:56:07 +00:00
|
|
|
{
|
|
|
|
MyGUI::VectorWidgetPtr widgets = getSkinWidgetsByName (_name);
|
|
|
|
|
|
|
|
if (widgets.empty())
|
|
|
|
{
|
|
|
|
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
2018-10-09 06:21:12 +00:00
|
|
|
return nullptr;
|
2013-02-17 01:56:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return widgets[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|