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