コード例 #1
0
        internal bool MouseOnButton(Vector2 posButton, Render.Sprite button)
        {
            var pos = Utils.GetCursorPos();

            return((pos.X >= posButton.X) && pos.X <= posButton.X + button.Width &&
                   pos.Y >= posButton.Y && pos.Y <= posButton.Y + button.Height);
        }
コード例 #2
0
        public CardsFrame()
        {
            _isActive = true;
            PosDraw   = new Vector2(50, 50) + new Vector2(-10, -10);

            Frame = new Render.Sprite(Resources.frame, PosDraw)
            {
                Color = new ColorBGRA(255, 255, 255, 170)
            };
            Frame.Add();

            CardFarm  = new CardDrawing(this, new Vector2(8, 10));
            CardCombo = new CardDrawing(this, new Vector2(Frame.Width / 2 + 8, 10));

            Game.OnWndProc += Game_OnWndProc;
        }