【问题标题】:Mouse cursor is not showing in windows store game developing using monogame使用monogame开发的Windows商店游戏中未显示鼠标光标
【发布时间】:2014-04-27 11:01:13
【问题描述】:

我正在使用 monogame 框架为 Windows 商店(台式机)开发游戏。其他一切都运行良好,除了鼠标光标运行良好但在玩游戏时不显示。

    protected override void Update(GameTime gameTime)
     {
        // TODO: Add your update logic here
        TouchCollection touch = TouchPanel.GetState();
        ms = Mouse.GetState();
        if (ms.LeftButton == ButtonState.Pressed)
        {
            Debug.WriteLine("pressedddddd");
        }


    }

你可以看到上面的代码......我在输出窗口“按下”时得到了输出,但我看不到屏幕上的光标我正在使用 monogame 在 Windows 8.1 pc 和 Visual Studio 2013 上开发这个

【问题讨论】:

  • 你应该在提问前先去谷歌看看。只需在初始化时设置 this.IsMouseVisible = true。
  • 我实际上已经在谷歌上查过了,但没有任何用处。 bdw 你的效果很好。请把它贴在ans中
  • MonoGame 和 XNA 具有相同的 API,因此当您在 Google 上搜索这些内容时,请尝试将 xna 作为关键字。例如“显示鼠标光标 xna”会显示大量结果。

标签: xna monogame windows-store


【解决方案1】:

在初始化函数中加入以下内容,使鼠标可见。

    this.IsMouseVisible = true;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多