Beispiel #1
0
        public void SetSizeMode(FloatMenuSizeMode newSizeMode)
        {
            this.sizeMode = newSizeMode;
            Text.Font     = this.CurrentFont;
            float width = 300f - (2f * this.HorizontalMargin + 4f + this.extraPartWidth);

            this.cachedRequiredHeight = 2f * this.VerticalMargin + Text.CalcHeight(this.Label, width);
            this.cachedRequiredWidth  = this.HorizontalMargin + 4f + Text.CalcSize(this.Label).x + this.extraPartWidth + this.HorizontalMargin;
        }
        public void SetSizeMode(FloatMenuSizeMode newSizeMode)
        {
            sizeMode = newSizeMode;
            GameFont font = Text.Font;

            Text.Font = CurrentFont;
            float width = 300f - (2f * HorizontalMargin + 4f + extraPartWidth + IconOffset);

            cachedRequiredHeight = 2f * VerticalMargin + Text.CalcHeight(Label, width);
            cachedRequiredWidth  = HorizontalMargin + 4f + Text.CalcSize(Label).x + extraPartWidth + HorizontalMargin + IconOffset + 4f;
            Text.Font            = font;
        }
Beispiel #3
0
        public void SetSizeMode(FloatMenuSizeMode newSizeMode)
        {
            this.sizeMode = newSizeMode;
            Text.Font     = this.CurrentFont;
            float width = (float)(300.0 - (2.0 * this.HorizontalMargin + 4.0 + this.extraPartWidth));

            this.cachedRequiredHeight = (float)(2.0 * this.VerticalMargin + Text.CalcHeight(this.Label, width));
            double  num    = this.HorizontalMargin + 4.0;
            Vector2 vector = Text.CalcSize(this.Label);

            this.cachedRequiredWidth = (float)(num + vector.x + this.extraPartWidth + this.HorizontalMargin);
        }
Beispiel #4
0
        public void SetSizeMode(FloatMenuSizeMode newSizeMode)
        {
            sizeMode = newSizeMode;
            GameFont font = Text.Font;

            Text.Font = CurrentFont;
            float width = 300f - (2f * HorizontalMargin + 4f + extraPartWidth);

            cachedRequiredHeight = 2f * VerticalMargin + Text.CalcHeight(Label, width);
            float   num    = HorizontalMargin + 4f;
            Vector2 vector = Text.CalcSize(Label);

            cachedRequiredWidth = num + vector.x + extraPartWidth + HorizontalMargin;
            Text.Font           = font;
        }
Beispiel #5
0
 public void SetSizeMode(FloatMenuSizeMode newSizeMode)
 {
     sizeMode = newSizeMode;
 }