You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/lua_ui/alignment.cpp

19 lines
540 B
C++

#include "alignment.hpp"
namespace LuaUi
{
MyGUI::Align alignmentToMyGui(Alignment horizontal, Alignment vertical)
{
MyGUI::Align align(MyGUI::Align::Center);
if (horizontal == Alignment::Start)
align |= MyGUI::Align::Left;
if (horizontal == Alignment::End)
align |= MyGUI::Align::Right;
if (vertical == Alignment::Start)
align |= MyGUI::Align::Top;
if (vertical == Alignment::End)
align |= MyGUI::Align::Bottom;
return align;
}
}