Changed naming of gui functions set2Top and set2Back to setToTop and setToBack.

This commit is contained in:
jussi
2024-06-26 22:28:13 +03:00
parent c96306bcc3
commit e45564ea3f
15 changed files with 94 additions and 77 deletions

View File

@@ -18,7 +18,7 @@ function Calculator:new( pos )
"Calculator",
{ -- Callbacks.
close = function() object:setVisible( false ) end,
grab = function() object:set2Top() end,
grab = function() object:setToTop() end,
drag = function( this ) object:setPosition( Vec2:new( this.bounds.x, this.bounds.y ) ) end
}
)
@@ -137,12 +137,12 @@ function Calculator:setPosition( pos )
end
end
function Calculator:set2Top()
Gui:set2Top( self.window )
Gui:set2Top( self.display )
function Calculator:setToTop()
Gui:setToTop( self.window )
Gui:setToTop( self.display )
for _, button in ipairs( self.buttons ) do
Gui:set2Top( button )
Gui:setToTop( button )
end
end

View File

@@ -39,7 +39,7 @@ function FileBrowser:new( pos )
"File Browser",
{ -- callbacks.
close = function() object:setVisible( false ) end,
grab = function() object:set2Top() end,
grab = function() object:setToTop() end,
drag = function( this ) object:setPosition( Vec2:new( this.bounds.x, this.bounds.y ) ) end
}
)
@@ -363,11 +363,11 @@ function FileBrowser:setPosition( pos )
end
end
function FileBrowser:set2Top()
Gui:set2Top( self.window )
function FileBrowser:setToTop()
Gui:setToTop( self.window )
for _, control in ipairs( self.controls ) do
Gui:set2Top( control )
Gui:setToTop( control )
end
end