浏览代码

Update get_set_material.script

Björn Ritzl 2 月之前
父节点
当前提交
2027efc493
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/get_set_material/example/get_set_material.script

+ 1 - 1
gui/get_set_material/example/get_set_material.script

@@ -10,7 +10,7 @@ function init(self)
 end
 
 function on_input(self, action_id, action)
-	if action.pressed then
+	if action_id == hash("mouse_button_left") and action.pressed then
 		-- get the material file currently assigned to the material with id 'default'
 		local current_texture = go.get("#gui", "materials", { key = "default" })