Process renamed to update to be more inline with naming of raylib and common convention.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user