Added ImguiImageAlign::CenterIndented.

This commit is contained in:
Dario Manesku 2014-07-05 01:50:11 +01:00
parent 7c4d69b0a1
commit 44b84ab800
2 changed files with 7 additions and 2 deletions

View file

@ -872,9 +872,13 @@ struct Imgui
{
xx = m_widgetX;
}
else //if (ImguiImageAlign::Center == _align).
else if (ImguiImageAlign::Center == _align)
{
xx = m_widgetX + (m_scrollAreaInnerWidth-_width)/2;
xx = m_scrollAreaX + (m_scrollAreaInnerWidth-_width)/2;
}
else //if (ImguiImageAlign::CenterIndented == _align).
{
xx = (m_widgetX + m_scrollAreaInnerWidth + m_scrollAreaX - _width)/2;
}
const int32_t yy = m_widgetY;

View file

@ -49,6 +49,7 @@ struct ImguiImageAlign
{
Left,
Center,
CenterIndented,
};
};