真的,诚实到善,隐藏鼠标和手写笔光标? [英] Really, honest-to-goodness, hiding the mouse & stylus cursor?

查看:106
本文介绍了真的,诚实到善,隐藏鼠标和手写笔光标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图*总是*隐藏系统在游戏中的光标,因为我们的游戏引擎中有一个与游戏上下文相关的动画光标w /自定义动画。

I'm trying to *always* hide the system's cursor in our game, because we have a game context-dependent animated cursor w/ custom animations in our game engine.

看起来像Window.Current.CoreWindow.PointerCursor = null做我想要的但它行为不可靠。我不能只在应用程序启动时执行此操作,因为看起来任何输入或可能的其他窗口事件(?)都会将其恢复。

Seems like Window.Current.CoreWindow.PointerCursor = null does what I want but it doesn't behave reliably. I can't just do that once when the app starts, as it seems any input or possibly other window events(?) will restore it.

所以我在执行后设置为每帧都为空一个WIndows.Current.Dispatcher.ProcessEvents(通过DispatcherTimer)。如果我使用的是鼠标,这将会起作用。

So I set to null every frame after doing a WIndows.Current.Dispatcher.ProcessEvents (via a DispatcherTimer). This will do the trick if I'm using a mouse.

但是,如果我使用手写笔,每当sylus接近或触摸屏幕,光标重新出现。我似乎无法找到将PointerCursor设置为null的任何其他地方实际上阻止它显示。

However if I'm using a stylus, whenever the sylus nears or touches the screen, the cursor reappears. I can't seem to find any additional places where setting the PointerCursor to null will actually prevent it from displaying.

任何想法?

谢谢,

  Borut

  Borut

推荐答案

我会问这个。


这篇关于真的,诚实到善,隐藏鼠标和手写笔光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆