Material Box

Material Box

WEBデザイン & フリー素材

Godot - Buttonに重なった時のカーソルを指にする

Godot

GDScriptからButtonノードに重なった時のカーソルを指にする方法とコード例です。


GDScriptからButtonノードに重なった時のカーソルを指に変更するには「mouse_default_cursor_shape」プロパティに「2」を指定します。
「pointing_hand」などの文字列での指定はできません。

# Buttonノードを作成する
var button = Button.new()
add_child(button)
button.set_text("Button")

# 重なった時のカーソルを指にする
button.mouse_default_cursor_shape = 2

Godot

TitleGodot - Buttonに重なった時のカーソルを指にする

CategoryGodot

Created

Update

AuthorYousuke.U