private void UpdateLayout()
        {
            CharacterUILayoutElement[] layoutElements = m_layoutElements;
            int num = layoutElements.Length;

            if (num == 0)
            {
                return;
            }
            int layoutSpacing = m_layoutSpacing;
            int num2          = 0;

            for (int i = 0; i < num; i++)
            {
                CharacterUILayoutElement characterUILayoutElement = layoutElements[i];
                if (!(null == characterUILayoutElement) && characterUILayoutElement.get_enabled())
                {
                    num2 += characterUILayoutElement.layoutWidth + layoutSpacing;
                }
            }
            int num3 = -(num2 - layoutSpacing >> 1);

            num2 = 0;
            for (int j = 0; j < num; j++)
            {
                CharacterUILayoutElement characterUILayoutElement2 = layoutElements[j];
                if (!(null == characterUILayoutElement2) && characterUILayoutElement2.get_enabled())
                {
                    characterUILayoutElement2.SetLayoutPosition(num2 + num3);
                    num2 += characterUILayoutElement2.layoutWidth + layoutSpacing;
                }
            }
        }
        protected override void Layout()
        {
            float position = 0.01f * (float)m_layoutPosition;

            position         = CharacterUILayoutElement.LayoutSetTransform(m_elementaryIconRenderer, position);
            base.layoutWidth = Mathf.CeilToInt(100f * position);
            base.Layout();
        }
Exemplo n.º 3
0
        protected override void Layout()
        {
            float num = 0.01f * (float)m_layoutPosition;

            num += CharacterUILayoutElement.LayoutSetTransform(m_actionIconRenderer, num) + -0.04f;
            num += CharacterUILayoutElement.LayoutSetTransform(m_actionValueRenderer, num);
            base.layoutWidth = Mathf.CeilToInt(100f * num) - m_layoutPosition;
            base.Layout();
        }
Exemplo n.º 4
0
 public override void SetLayoutPosition(int value)
 {
     if (m_layoutPosition != value)
     {
         float delta = 0.01f * (float)(value - m_layoutPosition);
         CharacterUILayoutElement.LayoutMoveTransform(m_actionIconRenderer.get_transform(), delta);
         CharacterUILayoutElement.LayoutMoveTransform(m_actionValueRenderer.get_transform(), delta);
         m_layoutPosition = value;
     }
 }
Exemplo n.º 5
0
        protected override void Layout()
        {
            float num = 0.01f * (float)m_layoutPosition;

            num += CharacterUILayoutElement.LayoutSetTransform(m_lifeIconRenderer, num) + -0.04f;
            num += CharacterUILayoutElement.LayoutSetTransform(m_lifeValueRenderer, num);
            if (m_currentArmor > 0)
            {
                num += 0.01f * (float)m_layoutSpacing;
                num += CharacterUILayoutElement.LayoutSetTransform(m_armorIconRenderer, num) + -0.04f;
                num += CharacterUILayoutElement.LayoutSetTransform(m_armorValueRenderer, num);
            }
            base.layoutWidth = Mathf.CeilToInt(100f * num) - m_layoutPosition;
            base.Layout();
        }