Exemplo n.º 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;
	}
Exemplo n.º 2
0
float CoordConverter::screenToWindowY(const Window& window, const float y)
{
    return y - getBaseYValue(window);
}
Exemplo n.º 3
0
float CoordConverter::screenToWindowY(const Window& window, const UDim& y)
{
    return asAbsolute(y,
        window.getRootContainerSize().d_height) - getBaseYValue(window);
}
Exemplo n.º 4
0
Vector2f CoordConverter::getBaseValue(const Window& window)
{
    return Vector2f(getBaseXValue(window), getBaseYValue(window));
}
Exemplo n.º 5
0
	float CoordConverter::windowToScreenY(const Window& window, const float y)
	{
		return getBaseYValue(window) + y;
	}
Exemplo n.º 6
0
	float CoordConverter::screenToWindowY(const Window& window, const UDim& y)
	{
		return y.asAbsolute(System::getSingleton().getRenderer()->getHeight()) -
			getBaseYValue(window);
	}
Exemplo n.º 7
0
	float CoordConverter::windowToScreenY(const Window& window, const UDim& y)
	{
		return getBaseYValue(window) + y.asAbsolute(window.getPixelSize().d_height);
	}