예제 #1
0
        protected void UpdateCustomButtonControls()
        {
            fnId = $"{classId}.UpdateCustomButtonControls()";
            bool mouseOver = false;

            if (mouseOver = playRound.CheckIfMouseOver(mouse.position))
            {
                if (mouseOver && mouse.leftClick)
                {
                    playRound.Clicked();
                    Helpers.PrintDebug(fnId, $"play round button clicked");
                    PlayRoundClicked();
                }
                playRound.Update();
            }
            if (mouseOver = resetGame.CheckIfMouseOver(mouse.position))
            {
                if (mouseOver && mouse.leftClick)
                {
                    resetGame.Clicked();
                    Helpers.PrintDebug(fnId, $"reset game button clicked");
                    ResetGameClicked();
                }
                resetGame.Update();
            }

            //for(int i = 0; i < buttons.Count; i++)
            //{
            //    mouseOver = buttons[i].CheckIfMouseOver(mouse.position);
            //    if(mouseOver && mouse.leftClick)
            //    {
            //        buttons[i].Clicked();
            //    }
            //    buttons[i].Update();
            //}
        }