touchEvent 中没有 Swipe TouchGesture?

发布于 2024-08-17 00:46:42 字数 782 浏览 6 评论 0 原文

我在搜索之前的问题时没有找到类似的帖子。

我正在为 Blackberry Storms 开发 MIDP 游戏。我正在使用 BlackBerryGameCanvas 并使用回调函数 touchEvent。作为参数,我正在获取 TouchEvent 的实例,但我想监听 TouchGesture,例如 Swipe。但是在模拟器触摸屏中滑动后,我得到的结果为空:

public void touchEvent(TouchEvent message) {
    TouchGesturenow = message.getGesture();

    //always getting null as a result

    //according to API when user does not perform any gesture 
    //operation then it would return null otherwise reference 
    //but here I have performed a swipe gesture then also it is returning null.

}

如果根本不可能,那么我必须使用

getMovePoints(int touch, int[] x, int[] y, int[] time) ..和一些计算。

有人可以帮我确认一下:Swipe TouchGesture 不适用于 Blackberry Storm 吗?

I didn't find any similar posts when searching previous questions.

I am developing a game in MIDP for Blackberry Storms. I am using a BlackBerryGameCanvas and using the callback function touchEvent. As an argument, I'm getting an instance of TouchEvent But I want to listen for a TouchGesture like Swipe. But after doing swipe in simulator touch screen I am getting null as result:

public void touchEvent(TouchEvent message) {
    TouchGesturenow = message.getGesture();

    //always getting null as a result

    //according to API when user does not perform any gesture 
    //operation then it would return null otherwise reference 
    //but here I have performed a swipe gesture then also it is returning null.

}

If it is not possible at all then I have to use

getMovePoints(int touch, int[] x, int[] y, int[] time) ..and some calculation .

Can anybody confirm for me: does Swipe TouchGesture not work with Blackberry Storm?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞取 2024-08-24 00:46:42

根据其他 SO 讨论中的答案,BB Storm 的滑动手势模拟似乎相当复杂: Blackberry Storm 模拟器 - TouchGesture 事件未触发,如何让 Swipe 工作?

获得 null(即每个 BlackBerry API 的“此事件不是手势”)的最可能原因是您在模拟器触摸屏中滑动做得不够好模拟器将其识别为滑动。


我正在 MIDP 中为 Blackberry Storms 开发一款游戏。

为了精确起见 - TouchGesture 与 MIDP 无关 - MIDP 2 中根本没有这样的东西 API。 MIDP API 中也没有touchEvent

您使用的所有 API 和功能均显示为 BlackBerry 特定:BlackBerryGameCanvas, TouchEvent 等。同样,这个问题通常与 MIDP 无关。

Per answer in other SO discussion, simulation of swipe gestures for BB Storm seems to be quite complicated: Blackberry Storm Emulator - TouchGesture events not firing, how to get a Swipe to work?.

Most likely reason for getting null (meaning "this event is not a gesture" per BlackBerry API) is that you just didn't do swipe in simulator touch screen well enough for emulator to recognize it as swipe.


I am developing a game in MIDP for Blackberry Storms.

For the sake of precision - TouchGesture has nothing to do with MIDP - there's simply no such thing in MIDP 2 API. Nor there is touchEvent in MIDP API.

All the API and features you use appear BlackBerry-specific: BlackBerryGameCanvas, TouchEvent etc. Again, this issue in general has nothing to do with MIDP .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文