Jelajahi Sumber

Update get_set_material.script

Björn Ritzl 2 bulan lalu
induk
melakukan
2027efc493
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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" })