gpt4 book ai didi

ruby - 为什么 Gosu 隐藏我的鼠标指针?

转载 作者:数据小太阳 更新时间:2023-10-29 07:01:45 25 4
gpt4 key购买 nike

我正在使用 Gosu gem 进行一些图形编程。问题是,当我创建一个窗口时,我的鼠标指针被隐藏了。我可以猜到鼠标在某个时刻的位置,我可以凭直觉点击,但我的用户可能不会。

如何显示指针?

最佳答案

如果你想使用系统光标你可以这样做

class Window < Gosu::Window
def initialize
super 320, 240, false
end

def needs_cursor?
true
end
end

查看 libgosu 的文档

RubyGosu rdoc Reference / Window

关于ruby - 为什么 Gosu 隐藏我的鼠标指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1400788/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com