diff options
| author | jussi | 2024-06-26 22:28:13 +0300 |
|---|---|---|
| committer | jussi | 2024-06-26 22:28:13 +0300 |
| commit | e45564ea3f0f27c32264f98da80c6d3556256de0 (patch) | |
| tree | dd9fb36032fcd2aa791226c75826c9cec4a7c3ff /examples/ReiLuaGui_examples | |
| parent | c96306bcc3bc685297b8553d01d2eff163754afc (diff) | |
| download | reilua-enhanced-e45564ea3f0f27c32264f98da80c6d3556256de0.tar.gz reilua-enhanced-e45564ea3f0f27c32264f98da80c6d3556256de0.tar.bz2 reilua-enhanced-e45564ea3f0f27c32264f98da80c6d3556256de0.zip | |
Changed naming of gui functions set2Top and set2Back to setToTop and setToBack.
Diffstat (limited to 'examples/ReiLuaGui_examples')
| -rw-r--r-- | examples/ReiLuaGui_examples/calculator.lua | 14 | ||||
| -rw-r--r-- | examples/ReiLuaGui_examples/file_explorer.lua | 20 |
2 files changed, 17 insertions, 17 deletions
diff --git a/examples/ReiLuaGui_examples/calculator.lua b/examples/ReiLuaGui_examples/calculator.lua index f6fcb7c..5bd2d7b 100644 --- a/examples/ReiLuaGui_examples/calculator.lua +++ b/examples/ReiLuaGui_examples/calculator.lua @@ -19,7 +19,7 @@ function Calculator:new( pos ) bounds = Rect:new( 0, 0, object.windowRect.width, object.HANDLE_HIGHT ), padding = 10, onClicked = function() - object:set2Top() + object:setToTop() object.dragPos = Vec2:newT( RL.GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) Gui.heldCallback = function() object:drag() end end, @@ -186,16 +186,16 @@ function Calculator:setVisible( visible ) end end -function Calculator:set2Top() - self.panel:set2Top() +function Calculator:setToTop() + self.panel:setToTop() for _, button in ipairs( self.buttons ) do - button:set2Top() + button:setToTop() end - self.handle:set2Top() - self.closeButton:set2Top() - self.display:set2Top() + self.handle:setToTop() + self.closeButton:setToTop() + self.display:setToTop() end function Calculator:addValue( value ) diff --git a/examples/ReiLuaGui_examples/file_explorer.lua b/examples/ReiLuaGui_examples/file_explorer.lua index 398adef..89fc173 100644 --- a/examples/ReiLuaGui_examples/file_explorer.lua +++ b/examples/ReiLuaGui_examples/file_explorer.lua @@ -19,7 +19,7 @@ function FileExplorer:new( pos ) bounds = Rect:new( 0, 0, object.windowRect.width, object.HANDLE_HIGHT ), padding = 10, onClicked = function() - object:set2Top() + object:setToTop() object.dragPos = Vec2:newT( RL.GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) Gui.heldCallback = function() object:drag() end end, @@ -305,15 +305,15 @@ function FileExplorer:setVisible( visible ) self.files:update() end -function FileExplorer:set2Top() - self.panel:set2Top() - self.handle:set2Top() - self.closeButton:set2Top() - self.pathBox:set2Top() - self.backButton:set2Top() - self.files:set2Top() - self.fileName:set2Top() - self.openButton:set2Top() +function FileExplorer:setToTop() + self.panel:setToTop() + self.handle:setToTop() + self.closeButton:setToTop() + self.pathBox:setToTop() + self.backButton:setToTop() + self.files:setToTop() + self.fileName:setToTop() + self.openButton:setToTop() end return FileExplorer |
