Beispiel #1
0
        private void AddDescriptionPanel(UIElement container, float accumulatedHeight, string tagGroup)
        {
            float         num           = 0f;
            UISlicedImage uISlicedImage = new UISlicedImage(Main.Assets.Request <Texture2D>("Images/UI/CharCreation/CategoryPanelHighlight", Main.content, (AssetRequestMode)1))
            {
                HAlign = 0.5f,
                VAlign = 1f,
                Width  = StyleDimension.FromPixelsAndPercent((0f - num) * 2f, 1f),
                Left   = StyleDimension.FromPixels(0f - num),
                Height = StyleDimension.FromPixelsAndPercent(40f, 0f),
                Top    = StyleDimension.FromPixels(2f)
            };

            uISlicedImage.SetSliceDepths(10);
            uISlicedImage.Color = Color.LightGray * 0.7f;
            container.Append(uISlicedImage);
            UIText uIText = new UIText(Language.GetText("UI.WorldDescriptionDefault"), 0.82f)
            {
                HAlign = 0f,
                VAlign = 0f,
                Width  = StyleDimension.FromPixelsAndPercent(0f, 1f),
                Height = StyleDimension.FromPixelsAndPercent(0f, 1f),
                Top    = StyleDimension.FromPixelsAndPercent(5f, 0f)
            };

            uIText.PaddingLeft  = 20f;
            uIText.PaddingRight = 20f;
            uIText.PaddingTop   = 6f;
            uISlicedImage.Append(uIText);
            _descriptionText = uIText;
        }
Beispiel #2
0
        private void AddDescriptionPanel(UIElement container, float accumulatedHeight, string tagGroup)
        {
            float         num            = 0.0f;
            UISlicedImage uiSlicedImage1 = new UISlicedImage((Asset <Texture2D>)Main.Assets.Request <Texture2D>("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode)1));

            uiSlicedImage1.HAlign = 0.5f;
            uiSlicedImage1.VAlign = 1f;
            uiSlicedImage1.Width  = StyleDimension.FromPixelsAndPercent((float)(-(double)num * 2.0), 1f);
            uiSlicedImage1.Left   = StyleDimension.FromPixels(-num);
            uiSlicedImage1.Height = StyleDimension.FromPixelsAndPercent(40f, 0.0f);
            uiSlicedImage1.Top    = StyleDimension.FromPixels(2f);
            UISlicedImage uiSlicedImage2 = uiSlicedImage1;

            uiSlicedImage2.SetSliceDepths(10);
            uiSlicedImage2.Color = Color.LightGray * 0.7f;
            container.Append((UIElement)uiSlicedImage2);
            UIText uiText1 = new UIText(Language.GetText("UI.WorldDescriptionDefault"), 0.82f, false);

            uiText1.HAlign = 0.0f;
            uiText1.VAlign = 0.0f;
            uiText1.Width  = StyleDimension.FromPixelsAndPercent(0.0f, 1f);
            uiText1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f);
            uiText1.Top    = StyleDimension.FromPixelsAndPercent(5f, 0.0f);
            UIText uiText2 = uiText1;

            uiText2.PaddingLeft  = 20f;
            uiText2.PaddingRight = 20f;
            uiText2.PaddingTop   = 6f;
            uiSlicedImage2.Append((UIElement)uiText2);
            this._descriptionText = uiText2;
        }