public void CalculatePixelOutput() { m_hitBoxPixels = new UIComponentRenderingInput(m_hitBoxRelative.xBottomLeft * Screen.width, m_hitBoxRelative.yBottomLeft * Screen.height, m_hitBoxRelative.xTopRight * Screen.width, m_hitBoxRelative.yTopRight * Screen.height, UILayoutType.RELATIVE_LAYOUT); }
public override void CalculateRenderingOutput() { if (null == m_parentComponentGroup) m_parentRenderingInput = new UIComponentRenderingInput(0f, 0f, 1f, 1f, UILayoutType.RELATIVE_LAYOUT); if (null == m_parentRenderingInput) m_parentRenderingInput = m_parentComponentGroup.GetChildComponentRenderingInput(); m_childRenderingInput = new UIComponentRenderingInput(m_parentRenderingInput.xBottomLeft, m_parentRenderingInput.yBottomLeft, m_parentRenderingInput.xTopRight, m_parentRenderingInput.yTopRight, m_parentRenderingInput.layoutType); }
public override void CalculateRenderingOutput() { if (null == m_parentComponentGroup) m_parentRenderingInput = new UIComponentRenderingInput(0f, 0f, 1f, 1f, UILayoutType.RELATIVE_LAYOUT); if (null == m_parentRenderingInput) m_parentRenderingInput = m_parentComponentGroup.GetChildComponentRenderingInput(); float xBottomLeft = m_parentRenderingInput.xBottomLeft + m_anchor.GetRelativeXLeft() * m_parentRenderingInput.GetWidth(); float yBottomLeft = m_parentRenderingInput.yBottomLeft + m_anchor.GetRelativeYBottom() * m_parentRenderingInput.GetHeight(); float xTopRight = m_parentRenderingInput.xBottomLeft + m_anchor.GetRelativeXRight() * m_parentRenderingInput.GetWidth(); float yTopRight = m_parentRenderingInput.yBottomLeft + m_anchor.GetRelativeYTop() * m_parentRenderingInput.GetHeight(); m_childRenderingInput = new UIComponentRenderingInput(xBottomLeft, yBottomLeft, xTopRight, yTopRight, UILayoutType.RELATIVE_LAYOUT); }