[examples/*] Update to new constructor call syntax.

This commit is contained in:
Lorenzo Cogotti 2022-10-25 13:32:08 +02:00
parent 7e8859e240
commit b8f4262af6
4 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ local function makeMainMenu()
guiStatus.previous = "So you left \""..w.text.."\"..."
end
return Ui.new {
return Ui:new {
x = x, y = y, -- Place UI at the calculated spot
-- Place the elements in rows from top to bottom

View File

@ -23,7 +23,7 @@ function love.load()
local W, H = 400, 80 -- pick arbitrary UI size
local x, y = centerRectOnScreen(W, H)
gui = Ui.new {
gui = Ui:new {
x = x, y = y,
Rows {

View File

@ -58,7 +58,7 @@ local function makeSelectionMenu()
local x = math.floor(love.graphics.getWidth() - W) / 2
local y = math.floor(love.graphics.getHeight() - RH * #menu) / 2
return Ui.new {
return Ui:new {
x = x, y = y,
menu
}

View File

@ -90,7 +90,7 @@ local function makeOptionsMenu()
local config = dummySave.load()
-- Make configuration editable via UI
return Ui.new {
return Ui:new {
x = x, y = y,
Rows {