示例#1
0
        public override void OnMouseDown(MouseButton button, int x, int y)
        {
            base.OnMouseDown(button, x, y);
            foreach (InterfaceElement element in elements)
            {
                element.OnMouseDown(button, x, y);
            }
            switch (ClickRegion.HitTest(clkMenuSettings, new Point(x, y)))
            {
            case "cancel":
                nextState = "Infiniminer.States.ServerBrowserState";
                break;

            case "accept":
                if (saveData() >= 1)
                {
                    Sm.Exit();
                }
                break;

                /*case "keylayout":
                 *  saveData();
                 *  nextState = "Infiniminer.States.KeySettingsState";
                 *  break;*/
            }
        }
示例#2
0
 public override void OnKeyDown(Keys key)
 {
     if (key == Keys.Escape)
     {
         Sm.Exit();
     }
 }