Ejemplo n.º 1
0
        public MessageBoxResult HandleClick(int x, int y)
        {
            if (m_CheckBox != null)
            {
                m_CheckBox.HandleClick(x, y);
            }

            if (m_Buttons != null)
            {
                foreach (UIButton b in m_Buttons)
                {
                    if (b.Click(x, y))
                    {
                        return((MessageBoxResult)b.ButtonID);
                    }
                }
            }

            return(MessageBoxResult.NoResult);
        }
Ejemplo n.º 2
0
        // Return false if this menu should close
        public bool HandleClick(int iX, int iY)
        {
            m_ExpSlowdown.HandleClick(iX, iY);
            m_ErrorDetector.HandleClick(iX, iY);
            m_ErrorDetector2.HandleClick(iX, iY);
            m_DisableTimer.HandleClick(iX, iY);

            if (m_DoneButton.Click(iX, iY))
            {
                Settings s = Settings.LoadSettings();
                s.SoundVolume         = SoundManager.Inst.SoundVolume;
                s.MusicVolume         = SoundManager.Inst.MusicVolume;
                m_Game.ExpSlowdown    = s.ExpSlowdown = m_ExpSlowdown.Enabled ? m_ExpSlowdown.Checked : false;
                m_Game.ErrorDetector  = s.ErrorDetector = m_ErrorDetector.Enabled ? m_ErrorDetector.Checked : false;
                m_Game.ErrorDetector2 = s.ErrorDetector2 = m_ErrorDetector2.Enabled ? m_ErrorDetector2.Checked : false;
                m_Game.DisableTimer   = s.DisableTimer = m_DisableTimer.Checked;
                s.Save();
                return(false);
            }

            return(true);
        }