diff options
Diffstat (limited to 'examples/resources')
| -rw-r--r-- | examples/resources/lib/gui.lua | 32 | ||||
| -rw-r--r-- | examples/resources/lib/raygui.lua | 5 |
2 files changed, 18 insertions, 19 deletions
diff --git a/examples/resources/lib/gui.lua b/examples/resources/lib/gui.lua index 2bae0eb..de40dd0 100644 --- a/examples/resources/lib/gui.lua +++ b/examples/resources/lib/gui.lua @@ -95,11 +95,11 @@ function Gui.delete( cell ) end end -function Gui.set2Top( cell ) +function Gui.setToTop( cell ) Util.tableMove( Gui._cells, Gui.getId( cell ), 1, #Gui._cells ) end -function Gui.set2Back( cell ) +function Gui.setToBack( cell ) Util.tableMove( Gui._cells, Gui.getId( cell ), 1, 1 ) end @@ -518,12 +518,12 @@ function Element:delete() Gui.delete( self ) end -function Element:set2Top() - Gui.set2Top( self ) +function Element:setToTop() + Gui.setToTop( self ) end -function Element:set2Back() - Gui.set2Back( self ) +function Element:setToBack() + Gui.setToBack( self ) end -- Container. @@ -820,34 +820,34 @@ function Container:clear() self.cells = {} end -function Container:set2Top() - Gui.set2Top( self ) +function Container:setToTop() + Gui.setToTop( self ) for _, cell in ipairs( self.cells ) do - cell:set2Top() + cell:setToTop() end if self._VScrollbar ~= nil then - Gui.set2Top( self._VScrollbar ) + Gui.setToTop( self._VScrollbar ) end if self._HScrollbar ~= nil then - Gui.set2Top( self._HScrollbar ) + Gui.setToTop( self._HScrollbar ) end end -function Container:set2Back() +function Container:setToBack() if self._VScrollbar ~= nil then - Gui.set2Back( self._VScrollbar ) + Gui.setToBack( self._VScrollbar ) end if self._HScrollbar ~= nil then - Gui.set2Back( self._HScrollbar ) + Gui.setToBack( self._HScrollbar ) end for _, cell in ipairs( self.cells ) do - cell:set2Back() + cell:setToBack() end - Gui.set2Back( self ) + Gui.setToBack( self ) end function Container:draw() diff --git a/examples/resources/lib/raygui.lua b/examples/resources/lib/raygui.lua index 1cd0269..437bc96 100644 --- a/examples/resources/lib/raygui.lua +++ b/examples/resources/lib/raygui.lua @@ -1922,11 +1922,10 @@ function Raygui:checkScrolling() end function Raygui:clickedInBounds( bounds ) - print( self._mousePressPos, bounds ) return RL.CheckCollisionPointRec( self._mousePressPos, bounds ) end -function Raygui:set2Top( control ) +function Raygui:setToTop( control ) for i, curControl in ipairs( self.controls ) do if control == curControl then Util.tableMove( self.controls, i, 1, #self.controls ) @@ -1936,7 +1935,7 @@ function Raygui:set2Top( control ) end end -function Raygui:set2Back( control ) +function Raygui:setToBack( control ) for i, curControl in ipairs( self.controls ) do if control == curControl then Util.tableMove( self.controls, i, 1, 1 ) |
