在 X11 上的每个窗口顶部绘图

发布于 2024-08-30 07:32:16 字数 151 浏览 10 评论 0原文

我正在尝试制作一台街机。用户将购买积分,这将允许他玩 X 分钟。我想在屏幕的左上角写下“还剩 9:42 分钟”,即使他正在玩全屏游戏(例如,UrbanTerror)。

我真的很希望能用 Ruby 来做这件事,但任何其他语言都可以。有什么想法吗?

提前致谢。

I am trying to make an arcade machine. The user will purchase credits, which will allow him to play for X minutes. I want to write "9:42 minutes left" at the left corner of the screen, even if he's playing a full screen game (UrbanTerror, for example).

I would really like if I could do this with Ruby, but any other language is OK. Any ideas?

Thanks in advance.

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

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

发布评论

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

评论(1

无畏 2024-09-06 07:32:16

此类应用程序的一个很好的示例是 XOSD

问题是,这可能会在任何 GLX 上下文中发生故障,而这正是《城市恐怖》等全屏游戏所使用的。即使它会绘制,游戏也会几乎立即透支它,所以你得到的最好的结果就是严重的闪烁。

也许您最好使用廉价的硬件解决方案,例如小型辅助显示器(有一些 USB 7 英寸显示器)或 LCD 设备。我什至会声称这对可用性有好处。

也许这对您有帮助,但是我不知道它是否适用于多个应用程序和全屏模式应用程序:
http://doc.trolltech.com/3.3/opengl-x11-overlays。 html

这个想法是使用显卡的特殊覆盖功能,通常用于弹出窗口。也许您可以在最顶层创建这样的覆盖层,并且它也可以在全屏模式下工作 - 也许不能。

A good example of such an application is XOSD.

Problem is, that will probably fail over any GLX context, which is what fullscreen games like Urban Terror work with. Even if it would draw, the game will overdraw it almost instantly, so the best thing you would get is heavy flicker.

Probably you are better off with a cheap hardware solution, like a small secondary display (there are some USB 7" displays out there) or a LCD device. I would even claim that's good for usability.

Perhaps this is of help for you, but I don't know whether it works for several applications and fullscreen mode applications:
http://doc.trolltech.com/3.3/opengl-x11-overlays.html

The idea is to use a special overlay capability of the graphics card, which is typically used for popup windows. Perhaps you can create such an overlay at the topmost level and it will also work in fullscreen -- perhaps not.

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