summaryrefslogtreecommitdiff
path: root/examples/raygui_extensions/sprite_button.lua
diff options
context:
space:
mode:
authorjussi2024-02-18 15:26:21 +0200
committerjussi2024-02-18 15:26:21 +0200
commit9b27daefc225752f3f24ea862e9c2be13f8addf6 (patch)
treecfa74048b9bddb9dc58e8117a4a7af845ee137eb /examples/raygui_extensions/sprite_button.lua
parent9de10be468c5151765a0e007d5889971c637fd24 (diff)
downloadreilua-enhanced-9b27daefc225752f3f24ea862e9c2be13f8addf6.tar.gz
reilua-enhanced-9b27daefc225752f3f24ea862e9c2be13f8addf6.tar.bz2
reilua-enhanced-9b27daefc225752f3f24ea862e9c2be13f8addf6.zip
Process renamed to update to be more inline with naming of raylib and common convention.
Diffstat (limited to 'examples/raygui_extensions/sprite_button.lua')
-rw-r--r--examples/raygui_extensions/sprite_button.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/raygui_extensions/sprite_button.lua b/examples/raygui_extensions/sprite_button.lua
index 2b22344..401c1a9 100644
--- a/examples/raygui_extensions/sprite_button.lua
+++ b/examples/raygui_extensions/sprite_button.lua
@@ -19,12 +19,12 @@ function SpriteButton:new( bounds, text, texture, nPatchNormal, nPatchPressed, c
return object
end
-function SpriteButton:process()
+function SpriteButton:update()
return RL.CheckCollisionPointRec( RL.GetMousePosition(), self.bounds )
end
function SpriteButton:draw()
- if RL.IsMouseButtonDown( RL.MOUSE_BUTTON_LEFT ) and self:process() and not RL.GuiIsLocked() and not self._parent.scrolling then
+ if RL.IsMouseButtonDown( RL.MOUSE_BUTTON_LEFT ) and self:update() and not RL.GuiIsLocked() and not self._parent.scrolling then
RL.DrawTextureNPatchRepeat( self.buttonTexture, self.nPatchPressed, self.bounds, { 0, 0 }, 0.0, RL.WHITE )
else
RL.DrawTextureNPatchRepeat( self.buttonTexture, self.nPatchNormal, self.bounds, { 0, 0 }, 0.0, RL.WHITE )