mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-14 22:26:41 +00:00
Remove .cpp files with small amount of code which don't have additional includes compared to corresponding .hpp files. This reduces the total size of preprocessed code of the project and should reduce compilation time.
30 lines
712 B
C++
30 lines
712 B
C++
#ifndef OPENMW_LUAUI_ALIGNMENT
|
|
#define OPENMW_LUAUI_ALIGNMENT
|
|
|
|
#include <MyGUI_Align.h>
|
|
|
|
namespace LuaUi
|
|
{
|
|
enum class Alignment
|
|
{
|
|
Start = 0,
|
|
Center = 1,
|
|
End = 2
|
|
};
|
|
|
|
inline 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;
|
|
}
|
|
}
|
|
|
|
#endif
|