Ejemplo n.º 1
0
        /// <summary>
        ///     ���\
        /// </summary>
        public HitObjectAnyShapePiece(BaseRpObject h)
        {
            HitObject = h;

            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;

            Children = new Drawable[]
            {
                //�w�i�C����masking
                _startBackgroundImagePicec = new ImagePicec("") //(RPSkinManager.GetStartObjectBackgroundByType(HitObject as BaseHitObject))
                {
                    Colour       = RpTextureColorManager.GetKeyLayoutButtonShage(((BaseRpHitableObject)HitObject).Shape),
                    Scale        = new Vector2(0.5f),
                    CornerRadius = DrawSize.X / 2,
                    Masking      = true
                },

                ////�ڑO���wmask���L�p�r
                _maskImagePicec = new ImagePicec("") //RPSkinManager.GetStartObjectMaskByType(HitObject as BaseHitObject))
                {
                    //Colour = osuObject.Colour,
                    Scale   = new Vector2(0.5f),
                    Masking = true
                },

                //�O�y�g�p
                _borderImagePicec = new ImagePicec(RpTexturePathManager.GetStartObjectImageNameByType(HitObject as BaseRpHitableObject))
                {
                    Colour = RpTextureColorManager.GetKeyLayoutButtonShage(((BaseRpHitableObject)HitObject).Shape),
                    Scale  = new Vector2(0.5f)
                }
            };
        }
Ejemplo n.º 2
0
 /// <summary>
 /// </summary>
 private void InitialTemplate()
 {
     //背景物件
     _rpRectanglePiece = new RectanglePiece(2000, _heightCalculator.GetLayoutHeight())
     {
         Scale  = new Vector2(1.0f, 0f),
         Alpha  = 0.5f,
         Colour = RpTextureColorManager.GetCoopLayoutColor(HitObject.Coop)
     };
 }
Ejemplo n.º 3
0
 private void InitialLinePiece()
 {
     //背景物件
     _linePiece = new RectanglePiece(2000, _heightCalculator.GetLayoutHeight())
     {
         Origin = Anchor.CentreRight,
         Scale  = new Vector2(1.0f, 0f),
         Colour = RpTextureColorManager.GetCoopJudgementLineColor(HitObject.Coop)
     };
 }
Ejemplo n.º 4
0
 void CreaterDrawable()
 {
     Children = new Drawable[]
     {
         StillHitPicec = new ImagePicec(RpTexturePathManager.GetStartObjectImageNameByType(ObjectType.Hit, Special.Normal, Direction))
         {
         },
     };
     StillHitPicec.Alpha  = 0;
     StillHitPicec.Scale  = new Vector2(0.5f);
     StillHitPicec.Colour = RpTextureColorManager.GetKeyLayoutButtonDirection(Direction);
 }
Ejemplo n.º 5
0
        public CoopHint(Coop coop)
        {
            _coop      = coop;
            _rectangle = new RectanglePiece(500, 1000)
            {
                Colour = RpTextureColorManager.GetCoopLayoutColor(_coop),
                Alpha  = 0.5f
            };

            Children = new Drawable[]
            {
                _rectangle
            };
        }
Ejemplo n.º 6
0
        private void load(TextureStore textures)
        {
            Children = new Drawable[]
            {
                buttonSprite = new Sprite
                {
                    Texture = textures.Get(@"KeyCounter/key-up"),
                    Anchor  = Anchor.Centre,
                    Origin  = Anchor.Centre
                },
                glowSprite = new Sprite
                {
                    Texture = textures.Get(@"KeyCounter/key-glow"),
                    Anchor  = Anchor.Centre,
                    Origin  = Anchor.Centre,
                    Alpha   = 0
                },
                textLayer = new Container
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        _textSprite = new SpriteText
                        {
                            Text   = Name,
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            RelativePositionAxes = Axes.Both,
                            Position             = new Vector2(0, -0.25f),
                            Colour = KeyUpTextColor
                        },
                        countSpriteText = new SpriteText
                        {
                            Text   = Count.ToString(@"#,0"),
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            RelativePositionAxes = Axes.Both,
                            Position             = new Vector2(0, 0.25f),
                            Colour = KeyUpTextColor
                        },
                        _buttonIconSprite = new Sprite
                        {
                            Texture  = textures.Get(RpTexturePathManager.GetKeyLayoutButtonIcon(_singlekey.Type)),
                            Colour   = RpTextureColorManager.GetCoopHitObjectColor(_singlekey.Coop),
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Alpha    = 1,
                            Scale    = new Vector2(0.25f),
                            Position = new Vector2(0, -0.25f)
                        }
                    }
                }
            };

            //KeyCounter Text Color
            //KeyDownTextColor = RpTextureColorManager.GetCoopLayoutColor(_singlekey.Coop);
            //KeyCounter border color
            buttonSprite.Colour = RpTextureColorManager.GetCoopLayoutColor(_singlekey.Coop);
            //KeyCounter inside color
            glowSprite.Colour = RpTextureColorManager.GetCoopLayoutColor(_singlekey.Coop);


            //Set this manually because an element with Alpha=0 won't take it size to AutoSizeContainer,
            //so the size can be changing between buttonSprite and glowSprite.
            Height = buttonSprite.DrawHeight;
            Width  = buttonSprite.DrawWidth;

            var fixPosition   = new Vector2(0, -10f);
            var upperPosition = new Vector2(0, -0.25f);
            var lowerPosition = new Vector2(0, 0.25f);

            switch (_layout)
            {
            case SingleKeyLayout.KeyIcon_Code:
                _buttonIconSprite.Position = upperPosition + fixPosition;
                _textSprite.Position       = lowerPosition;
                countSpriteText.Alpha      = 0;
                break;

            case SingleKeyLayout.keyCount_Code:
                _textSprite.Position     = upperPosition;
                countSpriteText.Position = lowerPosition;
                _buttonIconSprite.Alpha  = 0;
                break;

            case SingleKeyLayout.KeyIcon_Count:
                _buttonIconSprite.Position = upperPosition + fixPosition;
                countSpriteText.Position   = lowerPosition;
                _textSprite.Alpha          = 0;
                break;
            }
        }