我使用此代码来创建按钮:
var button = game.add.button(0, 0, "background", this.buttonClick, this, 2, 1, 0);
创建按钮后有光标手。 之后,在中间我需要禁用按钮,所以我添加这一行:
button.input.enabled = false;
最后,为了再次启用按钮,我添加了这一行:
button.input.enabled = true;
按钮已启用,我可以单击它,但光标是指针,而不是手。
尝试用这一行解决但没有成功:
button.useHandCursor = true;
如何解决?
最佳答案
我现在意识到我必须使用:
button.input.useHandCursor = true;
而不是
button.useHandCursor = true;
关于javascript - 如何将按钮光标更改为手形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38675565/