Example #1
0
	float CoordConverter::getBaseYValue(const Window& window)
	{
		const float parent_height = window.getParentPixelHeight();
		float baseY = window.getParent() ? getBaseYValue(*window.getParent()) : 0;

		baseY += window.getArea().d_min.d_y.asAbsolute(parent_height);

		return baseY;
	}
Example #2
0
float CoordConverter::screenToWindowY(const Window& window, const float y)
{
    return y - getBaseYValue(window);
}
Example #3
0
float CoordConverter::screenToWindowY(const Window& window, const UDim& y)
{
    return asAbsolute(y,
        window.getRootContainerSize().d_height) - getBaseYValue(window);
}
Example #4
0
Vector2f CoordConverter::getBaseValue(const Window& window)
{
    return Vector2f(getBaseXValue(window), getBaseYValue(window));
}
Example #5
0
	float CoordConverter::windowToScreenY(const Window& window, const float y)
	{
		return getBaseYValue(window) + y;
	}
Example #6
0
	float CoordConverter::screenToWindowY(const Window& window, const UDim& y)
	{
		return y.asAbsolute(System::getSingleton().getRenderer()->getHeight()) -
			getBaseYValue(window);
	}
Example #7
0
	float CoordConverter::windowToScreenY(const Window& window, const UDim& y)
	{
		return getBaseYValue(window) + y.asAbsolute(window.getPixelSize().d_height);
	}