/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Layout(Skin.Base skin) { if (m_ToggleButton != null) { if (m_Title != null) { m_ToggleButton.SetPosition(0, (m_Title.Height - m_ToggleButton.Height) * 0.5f); } if (m_InnerPanel.Children.Count == 0) { m_ToggleButton.Hide(); m_ToggleButton.ToggleState = false; m_InnerPanel.Hide(); } else { m_ToggleButton.Show(); m_InnerPanel.SizeToChildren(false, true); } } base.Layout(skin); }
/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void layout(Skin.SkinBase skin) { if (toggleButton != null) { if (title != null) { toggleButton.SetPosition(0, (title.Height - toggleButton.Height) * 0.5f); } if (innerPanel.Children.Count == 0) { toggleButton.Hide(); toggleButton.ToggleState = false; innerPanel.Hide(); } else { toggleButton.Show(); innerPanel.SizeToChildren(false, true); } } base.layout(skin); }