示例#1
0
 public static void Initialize()
 {
     TouchPanel.EnabledGestures = GestureType.None;
     TouchPanel.DisplayHeight   = RPGGame.GetClientBounds().Height;
     TouchPanel.DisplayWidth    = RPGGame.GetClientBounds().Width;
     _useMouse = !TouchPanel.GetCapabilities().IsConnected;
 }
示例#2
0
        public RPGGame()
        {
            Game     = this;
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            IsMouseVisible = true;
#if WINDOWS
            graphics.PreferredBackBufferWidth  = 960;
            graphics.PreferredBackBufferHeight = 540;
            graphics.ApplyChanges();

            Window.AllowAltF4        = false;
            Window.AllowUserResizing = false;
            Window.Title             = "RPGEngine";
            graphics.IsFullScreen    = false;
#else
            graphics.IsFullScreen              = true;
            graphics.PreferredBackBufferWidth  = GetClientBounds().Width;
            graphics.PreferredBackBufferHeight = GetClientBounds().Height;
#endif
        }
示例#3
0
 private static bool CursorInWindow()
 {
     return(RPGGame.GetClientBounds().Contains(_nowMouseState.Position + RPGGame.GetClientBounds().Location));
 }