From b8f4262af6a91f271d85cb7470ec4de1fe48871c Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Tue, 25 Oct 2022 13:32:08 +0200 Subject: [PATCH] [examples/*] Update to new constructor call syntax. --- examples/basicmenu.lua | 2 +- examples/helloworld.lua | 2 +- examples/init.lua | 2 +- examples/optionsmenu.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basicmenu.lua b/examples/basicmenu.lua index f8370eb..74863d8 100644 --- a/examples/basicmenu.lua +++ b/examples/basicmenu.lua @@ -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 diff --git a/examples/helloworld.lua b/examples/helloworld.lua index 9d3c7c5..2c6a1ea 100644 --- a/examples/helloworld.lua +++ b/examples/helloworld.lua @@ -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 { diff --git a/examples/init.lua b/examples/init.lua index 83a4580..a1fd708 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -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 } diff --git a/examples/optionsmenu.lua b/examples/optionsmenu.lua index d1a39da..dff1941 100644 --- a/examples/optionsmenu.lua +++ b/examples/optionsmenu.lua @@ -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 {