public override void SetLayoutHorizontal() { if (horizontal != null && !locked) { #if DEBUG_LAYOUT PUIUtils.LogUIDebug("SetLayoutHorizontal for {0} resolved width to {1:F2}".F( gameObject.name, rectTransform.rect.width)); #endif DoLayout(parameters, horizontal, rectTransform.rect.width); } }
public override void SetLayoutVertical() { if (vertical != null && !locked) { #if DEBUG_LAYOUT PUIUtils.LogUIDebug("SetLayoutVertical for {0} resolved height to {1:F2}".F( gameObject.name, rectTransform.rect.height)); #endif DoLayout(parameters, vertical, rectTransform.rect.height); } }
public void CalculateLayoutInputVertical() { #if DEBUG_LAYOUT PUIUtils.LogUIDebug("CalculateLayoutInputVertical for " + gameObject.name); #endif var margin = parameters.Margin; float gap = (margin == null) ? 0.0f : margin.top + margin.bottom; vertical = Calc(gameObject, parameters, PanelDirection.Vertical); var vTotal = vertical.total; minHeight = vTotal.min + gap; preferredHeight = vTotal.preferred + gap; }
public void CalculateLayoutInputHorizontal() { #if DEBUG_LAYOUT PUIUtils.LogUIDebug("CalculateLayoutInputHorizontal for " + gameObject.name); #endif var margin = parameters.Margin; float gap = (margin == null) ? 0.0f : margin.left + margin.right; horizontal = Calc(gameObject, parameters, PanelDirection.Horizontal); var hTotal = horizontal.total; minWidth = hTotal.min + gap; preferredWidth = hTotal.preferred + gap; }
public override void CalculateLayoutInputVertical() { if (!locked) { var margin = parameters.Margin; float gap = (margin == null) ? 0.0f : margin.top + margin.bottom; vertical = Calc(gameObject, parameters, PanelDirection.Vertical); var vTotal = vertical.total; minHeight = vTotal.min + gap; preferredHeight = vTotal.preferred + gap; #if DEBUG_LAYOUT PUIUtils.LogUIDebug("CalculateLayoutInputVertical for {0} preferred {1:F2}".F( gameObject.name, preferredHeight)); #endif } }
public override void CalculateLayoutInputHorizontal() { if (!locked) { var margin = parameters.Margin; float gap = (margin == null) ? 0.0f : margin.left + margin.right; horizontal = Calc(gameObject, parameters, PanelDirection.Horizontal); var hTotal = horizontal.total; minWidth = hTotal.min + gap; preferredWidth = hTotal.preferred + gap; #if DEBUG_LAYOUT PUIUtils.LogUIDebug("CalculateLayoutInputHorizontal for {0} preferred {1:F2}". F(gameObject.name, preferredWidth)); #endif } }
public void SetLayoutVertical() { #if DEBUG if (vertical == null) { throw new InvalidOperationException("SetLayoutVertical before CalculateLayoutInputVertical"); } #endif #if DEBUG_LAYOUT PUIUtils.LogUIDebug("SetLayoutVertical for " + gameObject.name); #endif if (vertical != null) { var rt = gameObject.rectTransform(); DoLayout(parameters, vertical, rt.rect.size.y); } }
public override void SetLayoutVertical() { #if DEBUG if (vertical == null) { throw new InvalidOperationException("SetLayoutVertical before CalculateLayoutInputVertical"); } #endif if (vertical != null) { var rt = gameObject.rectTransform(); #if DEBUG_LAYOUT PUIUtils.LogUIDebug("SetLayoutVertical for {0} resolved height to {1:F2}".F( gameObject.name, rt.rect.height)); #endif DoLayout(parameters, vertical, rt.rect.height); } }
public void SetLayoutHorizontal() { #if DEBUG if (horizontal == null) { throw new InvalidOperationException("SetLayoutHorizontal before CalculateLayoutInputHorizontal"); } #endif if (horizontal != null) { var rt = gameObject.rectTransform(); #if DEBUG_LAYOUT PUIUtils.LogUIDebug("SetLayoutHorizontal for {0} resolved width to {1:F2}".F( gameObject.name, rt.rect.width)); #endif DoLayout(parameters, horizontal, rt.rect.width); } }