コード例 #1
0
ファイル: GameScreen.cs プロジェクト: xerohour/scsharp
        public override void KeyboardDown(NSEvent theEvent)
        {
            switch (theEvent.CharactersIgnoringModifiers[0])
            {
            case (char)27:             /*Key.F10:*/
                GameMenuDialog d = new GameMenuDialog(this, mpq);

                d.ReturnToGame += delegate() { DismissDialog(); };
                ShowDialog(d);
                break;

            case (char)NSKey.RightArrow:
                horiz_delta = SCROLL_DELTA;
                break;

            case (char)NSKey.LeftArrow:
                horiz_delta = -SCROLL_DELTA;
                break;

            case (char)NSKey.DownArrow:
                vert_delta = SCROLL_DELTA;
                break;

            case (char)NSKey.UpArrow:
                vert_delta = -SCROLL_DELTA;
                break;
            }
        }
コード例 #2
0
ファイル: GameScreen.cs プロジェクト: carriercomm/scsharp
		public override void KeyboardDown (NSEvent theEvent)
		{
			switch (theEvent.CharactersIgnoringModifiers[0]) {
			case (char)27: /*Key.F10:*/
				GameMenuDialog d = new GameMenuDialog (this, mpq);

				d.ReturnToGame += delegate () { DismissDialog (); };
				ShowDialog (d);
				break;
			case (char)NSKey.RightArrow:
				horiz_delta = SCROLL_DELTA;
				break;
			case (char)NSKey.LeftArrow:
				horiz_delta = -SCROLL_DELTA;
				break;
			case (char)NSKey.DownArrow:
				vert_delta = SCROLL_DELTA;
				break;
			case (char)NSKey.UpArrow:
				vert_delta = -SCROLL_DELTA;
				break;
			}
		}