示例#1
0
        private bool buttonClicked(MenuButton b, MouseState ms)
        {
            Rectangle buttonArea = new Rectangle(b.x, b.y, b.width, b.height);

            return(buttonArea.Contains(ms.X, ms.Y));
        }
示例#2
0
        public void addButton(String text, Color color, Color clickedColor, int x, int y, int width, int height, ButtonDelegate onClick)
        {
            MenuButton b = new MenuButton(text, color, clickedColor, x, y, width, height, onClick);

            buttons.Add(b);
        }