2022-02-06 20:22:38 +00:00
|
|
|
#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;
|
2022-04-04 21:10:03 +00:00
|
|
|
if (vertical == Alignment::Start)
|
2022-02-06 20:22:38 +00:00
|
|
|
align |= MyGUI::Align::Top;
|
2022-04-04 21:10:03 +00:00
|
|
|
if (vertical == Alignment::End)
|
2022-02-06 20:22:38 +00:00
|
|
|
align |= MyGUI::Align::Bottom;
|
|
|
|
return align;
|
|
|
|
}
|
|
|
|
}
|