Ejemplo n.º 1
0
        public virtual void Draw()
        {
            AttributeData firstData = this.attribute.GetFirst();

            if (firstData.IsNull())
            {
                return;
            }
            this.DrawContext(firstData);
            if (this.attribute.info.mode == AttributeMode.Normal)
            {
                if (firstData.usage == AttributeUsage.Direct)
                {
                    this.DrawDirect(this.fullRect, this.valueRect, firstData, this.label);
                }
                if (firstData.usage == AttributeUsage.Shaped)
                {
                    GUI.Box(this.iconRect, "", this.skin.GetStyle("IconShaped"));
                    this.labelRect = this.labelRect.AddX(16);
                    this.DrawShaped(this.valueRect, firstData, this.label, true);
                }
            }
            if (this.attribute.info.mode == AttributeMode.Linked)
            {
                this.attribute.usage = AttributeUsage.Shaped;
                GUI.Box(this.iconRect, "", this.skin.GetStyle("IconLinked"));
                this.labelRect = this.labelRect.AddX(16);
                this.DrawShaped(this.valueRect, firstData, this.label, true);
            }
            if (this.attribute.info.mode == AttributeMode.Formula)
            {
                this.DrawGroup(this.label, true);
            }
            if (this.attribute.info.mode == AttributeMode.Group)
            {
                this.DrawGroup(this.label, false);
            }
        }