Skip to content

Commit c91cddf

Browse files
committed
Fix _gui_input() method name in Drawable textures
1 parent c8f1230 commit c91cddf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tutorials/rendering/drawable_textures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ texture to a new DrawableTexture.
142142
texture.setup(500, 500, DrawableTexture2D.DRAWABLE_FORMAT_RGBA8, false)
143143
144144
Next, we need the TextureRect to respond to the player clicking and dragging as
145-
if they are painting. To do this, we can override the ``_on_gui_input()`` method
145+
if they are painting. To do this, we can override the ``_gui_input()`` method
146146
from the TextureRect in our script, and parse InputMouseButton and
147147
InputMouseMotion events:
148148

149149
.. code-block:: gdscript
150150
151151
var drawing = false
152152
153-
func _on_gui_input(event):
153+
func _gui_input(event):
154154
if event is InputEventMouseButton:
155155
# Mouse click/unclick - start/stop drawing.
156156
drawing = not drawing
@@ -190,7 +190,7 @@ smaller strokes.
190190
var my_color = Color.RED
191191
var my_size = 20.0
192192
193-
func _on_gui_input(event):
193+
func _gui_input(event):
194194
if event is InputEventMouseButton:
195195
# Mouse click/unclick - start/stop drawing.
196196
drawing = not drawing

0 commit comments

Comments
 (0)