1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 01:10:10 +00:00
OpenMW/apps/openmw/mwgui/exposedwindow.cpp
2022-09-22 21:35:26 +03:00

25 lines
624 B
C++

#include "exposedwindow.hpp"
namespace MWGui
{
MyGUI::VectorWidgetPtr Window::getSkinWidgetsByName(const std::string& name)
{
return MyGUI::Widget::getSkinWidgetsByName(name);
}
MyGUI::Widget* Window::getSkinWidget(const std::string& _name, bool _throw)
{
MyGUI::VectorWidgetPtr widgets = getSkinWidgetsByName(_name);
if (widgets.empty())
{
MYGUI_ASSERT(!_throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
return nullptr;
}
else
{
return widgets[0];
}
}
}