Process renamed to update to be more inline with naming of raylib and common convention.

This commit is contained in:
jussi
2024-02-18 15:26:21 +02:00
parent 9de10be468
commit 9b27daefc2
35 changed files with 99 additions and 98 deletions

View File

@@ -237,8 +237,8 @@ function RL.init()
addPropertyList()
end
function RL.process( delta )
Gui:process()
function RL.update( delta )
Gui:update()
end
function RL.draw()

View File

@@ -158,14 +158,14 @@ function PropertyList:addGroup( name, active, group )
return control
end
function PropertyList:process()
function PropertyList:update()
if not RL.CheckCollisionRecs( self.view, RL.GetMousePosition() ) then
self.gui.locked = true
else
self.gui.locked = false
end
self.gui:process()
self.gui:update()
RL.BeginTextureMode( self.framebuffer )
RL.ClearBackground( RL.BLANK )

View File

@@ -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 )