SetShadow() публичный Метод

Set the shadow properties
public SetShadow ( int angle, int distance, long color ) : void
angle int
distance int
color long
Результат void
Пример #1
0
        public override void FinalizeConstruction()
        {
            base.FinalizeConstruction();
            int x1 = 16;
            int y1 = 16;

            GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1);
            _imageFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                                 _textureFocusName);
            _imageFocused.ParentControl = this;
            _imageFocused.DimColor      = DimColor;

            _imageNonFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                                    _textureNoFocusName);
            _imageNonFocused.ParentControl = this;
            _imageNonFocused.DimColor      = DimColor;

            _imageBackground = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                                    _backgroundTextureName);
            _imageBackground.ParentControl = this;
            _imageBackground.DimColor      = DimColor;

            _imageLeft               = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureWidth, _leftTextureHeight, _leftTextureName);
            _imageLeft.DimColor      = DimColor;
            _imageLeft.ParentControl = this;

            _imageLeftFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureFocusWidth, _leftTextureFocusHeight,
                                                   _leftFocusName);
            _imageLeftFocus.ParentControl = this;
            _imageLeftFocus.DimColor      = DimColor;

            _imageRight = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureWidth, _rightTextureHeight, _rightTextureName);
            _imageRight.ParentControl = this;
            _imageRight.DimColor      = DimColor;

            _imageRightFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureFocusWidth, _rightTextureFocusHeight,
                                                    _rightFocusName);
            _imageRightFocus.ParentControl = this;
            _imageRightFocus.DimColor      = DimColor;

            if (_fontName != "" && _fontName != "-")
            {
                _font = GUIFontManager.GetFont(_fontName);
            }
            GUILocalizeStrings.LocalizeLabel(ref _label);
            _imageFocused.Filtering    = false;
            _imageNonFocused.Filtering = false;
            _imageBackground.Filtering = false;
            _imageLeft.Filtering       = false;
            _imageLeftFocus.Filtering  = false;
            _imageRight.Filtering      = false;
            _imageRightFocus.Filtering = false;
            _labelControl               = new GUILabelControl(_parentControlId);
            _labelControl.CacheFont     = true;
            _labelControl.ParentControl = this;
            _labelControl.SetShadow(_shadowAngle, _shadowDistance, _shadowColor);
        }
Пример #2
0
    /// <summary>
    /// This method gets called when the control is created and all properties has been set
    /// It allows the control todo any initialization
    /// </summary>
    public override void FinalizeConstruction()
    {
      base.FinalizeConstruction();

      _imageIcon = new GUIImage(ParentID, GetID, _positionX, _positionY, 0, 0, _textureIcon, 0);
      _imageIcon2 = new GUIImage(ParentID, GetID, _positionX, _positionY, 0, 0, _textureIcon2, 0);
      _imageFocusedLeft = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height, _textureFocusedLeft, 0);
      _imageFocusedMid = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height, _textureFocusedMid, 0);
      _imageFocusedRight = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height, _textureFocusedRight, 0);
      _imageNonFocusedLeft = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height, _textureNonFocusedLeft,
                                          0);
      _imageNonFocusedMid = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height, _textureNonFocusedMid,
                                         0);
      _imageNonFocusedRight = new GUIImage(ParentID, GetID, _positionX, _positionY, Width, Height,
                                           _textureNonFocusedRight, 0);
      _isSelected = false;
      _labelControl1 = new GUILabelControl(ParentID);
      _labelControl2 = new GUILabelControl(ParentID);
      _imageIcon.ParentControl = this;
      _imageIcon2.ParentControl = this;
      _imageFocusedLeft.ParentControl = this;
      _imageFocusedMid.ParentControl = this;
      _imageFocusedRight.ParentControl = this;
      _imageNonFocusedLeft.ParentControl = this;
      _imageNonFocusedMid.ParentControl = this;
      _imageNonFocusedRight.ParentControl = this;
      _labelControl1.ParentControl = this;
      _labelControl2.ParentControl = this;

      _imageFocusedLeft.DimColor = DimColor;
      _imageFocusedMid.DimColor = DimColor;
      _imageFocusedRight.DimColor = DimColor;
      _imageNonFocusedLeft.DimColor = DimColor;
      _imageNonFocusedMid.DimColor = DimColor;
      _imageNonFocusedRight.DimColor = DimColor;
      _imageIcon.DimColor = DimColor;
      _imageIcon2.DimColor = DimColor;
      _labelControl1.DimColor = DimColor;
      _labelControl2.DimColor = DimColor;
      _labelControl1.SetShadow(_shadowAngle1, _shadowDistance1, _shadowColor1);
      _labelControl2.SetShadow(_shadowAngle2, _shadowDistance2, _shadowColor2);

      _imageFocusedLeft.SetBorder(_strBorderTFL, _borderPositionTFL, _borderTextureRepeatTFL, _borderTextureRotateTFL,
                                  _borderTextureFileNameTFL, _borderColorKeyTFL, _borderHasCornersTFL,
                                  _borderCornerTextureRotateTFL);

      _imageNonFocusedLeft.SetBorder(_strBorderTNFL, _borderPositionTNFL, _borderTextureRepeatTNFL,
                                     _borderTextureRotateTNFL,
                                     _borderTextureFileNameTNFL, _borderColorKeyTNFL, _borderHasCornersTNFL,
                                     _borderCornerTextureRotateTNFL);

      _imageFocusedMid.SetBorder(_strBorderTFM, _borderPositionTFM, _borderTextureRepeatTFM, _borderTextureRotateTFM,
                                 _borderTextureFileNameTFM, _borderColorKeyTFM, _borderHasCornersTFM,
                                 _borderCornerTextureRotateTFM);

      _imageNonFocusedMid.SetBorder(_strBorderTNFM, _borderPositionTNFM, _borderTextureRepeatTNFM,
                                    _borderTextureRotateTNFM,
                                    _borderTextureFileNameTNFM, _borderColorKeyTNFM, _borderHasCornersTNFM,
                                    _borderCornerTextureRotateTNFM);

      _imageFocusedRight.SetBorder(_strBorderTFR, _borderPositionTFR, _borderTextureRepeatTFR, _borderTextureRotateTFR,
                                   _borderTextureFileNameTFR, _borderColorKeyTFR, _borderHasCornersTFR,
                                   _borderCornerTextureRotateTFR);

      _imageNonFocusedRight.SetBorder(_strBorderTNFR, _borderPositionTNFR, _borderTextureRepeatTNFR,
                                      _borderTextureRotateTNFR,
                                      _borderTextureFileNameTNFR, _borderColorKeyTNFR, _borderHasCornersTNFR,
                                      _borderCornerTextureRotateTNFR);

      _imageIcon.SetBorder(_strBorderTI, _borderPositionTI, _borderTextureRepeatTI, _borderTextureRotateTI,
                           _borderTextureFileNameTI, _borderColorKeyTI, _borderHasCornersTI,
                           _borderCornerTextureRotateTI);

      _imageIcon2.SetBorder(_strBorderTI2, _borderPositionTI2, _borderTextureRepeatTI2, _borderTextureRotateTI2,
                            _borderTextureFileNameTI2, _borderColorKeyTI2, _borderHasCornersTI2,
                            _borderCornerTextureRotateTI2);

      TileFillTFL = _textureFocusedLeftTileFill;
      TileFillTNFL = _textureNonFocusedLeftTileFill;
      TileFillTFM = _textureFocusedMidTileFill;
      TileFillTNFM = _textureNonFocusedMidTileFill;
      TileFillTFR = _textureFocusedRightTileFill;
      TileFillTNFR = _textureNonFocusedRightTileFill;
    }
Пример #3
0
    public override void FinalizeConstruction()
    {
      base.FinalizeConstruction();
      int x1 = 16;
      int y1 = 16;
      GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1);
      _imageFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                           _textureFocusName);
      _imageFocused.ParentControl = this;
      _imageFocused.DimColor = DimColor;

      _imageNonFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                              _textureNoFocusName);
      _imageNonFocused.ParentControl = this;
      _imageNonFocused.DimColor = DimColor;

      _imageBackground = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                              _backgroundTextureName);
      _imageBackground.ParentControl = this;
      _imageBackground.DimColor = DimColor;

      _imageLeft = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureWidth, _leftTextureHeight, _leftTextureName);
      _imageLeft.DimColor = DimColor;
      _imageLeft.ParentControl = this;

      _imageLeftFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureFocusWidth, _leftTextureFocusHeight,
                                             _leftFocusName);
      _imageLeftFocus.ParentControl = this;
      _imageLeftFocus.DimColor = DimColor;

      _imageRight = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureWidth, _rightTextureHeight, _rightTextureName);
      _imageRight.ParentControl = this;
      _imageRight.DimColor = DimColor;

      _imageRightFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureFocusWidth, _rightTextureFocusHeight,
                                              _rightFocusName);
      _imageRightFocus.ParentControl = this;
      _imageRightFocus.DimColor = DimColor;

      if (_fontName != "" && _fontName != "-")
      {
        _font = GUIFontManager.GetFont(_fontName);
      }
      GUILocalizeStrings.LocalizeLabel(ref _label);
      _imageFocused.Filtering = false;
      _imageNonFocused.Filtering = false;
      _imageBackground.Filtering = false;
      _imageLeft.Filtering = false;
      _imageLeftFocus.Filtering = false;
      _imageRight.Filtering = false;
      _imageRightFocus.Filtering = false;
      _labelControl = new GUILabelControl(_parentControlId);
      _labelControl.CacheFont = true;
      _labelControl.ParentControl = this;
      _labelControl.SetShadow(_shadowAngle, _shadowDistance, _shadowColor);
    }
Пример #4
0
    public override void AllocResources()
    {
      _fontNamedKey = GUIFontManager.GetFont(_namedKeyFont);
      _fontCharKey = GUIFontManager.GetFont(_charKeyFont);
      _fontSearchText = GUIFontManager.GetFont(_inputTextFont);

      labelBox = new GUIImage(GetID, 1, 0, 0, 10, 10, _labelBoxTexture, 1);
      labelBox.AllocResources();

      label = new GUILabelControl(GetID);
      label.FontName = _labelFont;
      label.SetShadow(_labelShadowAngle, _labelShadowDistance, _labelShadowColor);
      label.AllocResources();

      inputTextBox = new GUIImage(GetID, 1, 0, 0, 10, 10, _inputTextBoxTexture, 1);
      inputTextBox.AllocResources();

      inputText = new GUILabelControl(GetID);
      inputText.FontName = _inputTextFont;
      inputText.SetShadow(_inputTextShadowAngle, _inputTextShadowDistance, _inputTextShadowColor);
      inputText.AllocResources();

      inputTextCaret = new GUILabelControl(GetID);
      inputTextCaret.FontName = _inputTextFont;
      inputTextCaret.SetShadow(_inputTextShadowAngle, _inputTextShadowDistance, _inputTextShadowColor);
      inputTextCaret.AllocResources();

      base.AllocResources();
      _isAllocated = true;
    }
Пример #5
0
    public override void FinalizeConstruction()
    {
      base.FinalizeConstruction();
      _imageSpinUp = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                          _upTextureName);
      _imageSpinUp.ParentControl = this;
      _imageSpinUp.DimColor = DimColor;

      _imageSpinDown = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                            _downTextureName);
      _imageSpinDown.ParentControl = this;
      _imageSpinDown.DimColor = DimColor;

      _imageSpinUpFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                               _upTextureNameFocus);
      _imageSpinUpFocus.ParentControl = this;
      _imageSpinUpFocus.DimColor = DimColor;

      _imageSpinDownFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
                                                 _downTextureNameFocus);
      _imageSpinDownFocus.ParentControl = this;
      _imageSpinDownFocus.DimColor = DimColor;

      _imageSpinUp.Filtering = false;
      _imageSpinDown.Filtering = false;
      _imageSpinUpFocus.Filtering = false;
      _imageSpinDownFocus.Filtering = false;
      _labelControl = new GUILabelControl(_parentControlId);
      _labelControl.CacheFont = true;
      _labelControl.ParentControl = this;
      _labelControl.DimColor = DimColor;
      _labelControl.SetShadow(_shadowAngle, _shadowDistance, _shadowColor);
    }