mirror of
https://codeberg.org/1414codeforge/yui-examples.git
synced 2025-04-19 21:07:27 +02:00
[examples/*] Update to new constructor call syntax.
This commit is contained in:
parent
7e8859e240
commit
b8f4262af6
@ -40,7 +40,7 @@ local function makeMainMenu()
|
|||||||
guiStatus.previous = "So you left \""..w.text.."\"..."
|
guiStatus.previous = "So you left \""..w.text.."\"..."
|
||||||
end
|
end
|
||||||
|
|
||||||
return Ui.new {
|
return Ui:new {
|
||||||
x = x, y = y, -- Place UI at the calculated spot
|
x = x, y = y, -- Place UI at the calculated spot
|
||||||
|
|
||||||
-- Place the elements in rows from top to bottom
|
-- Place the elements in rows from top to bottom
|
||||||
|
@ -23,7 +23,7 @@ function love.load()
|
|||||||
local W, H = 400, 80 -- pick arbitrary UI size
|
local W, H = 400, 80 -- pick arbitrary UI size
|
||||||
local x, y = centerRectOnScreen(W, H)
|
local x, y = centerRectOnScreen(W, H)
|
||||||
|
|
||||||
gui = Ui.new {
|
gui = Ui:new {
|
||||||
x = x, y = y,
|
x = x, y = y,
|
||||||
|
|
||||||
Rows {
|
Rows {
|
||||||
|
@ -58,7 +58,7 @@ local function makeSelectionMenu()
|
|||||||
local x = math.floor(love.graphics.getWidth() - W) / 2
|
local x = math.floor(love.graphics.getWidth() - W) / 2
|
||||||
local y = math.floor(love.graphics.getHeight() - RH * #menu) / 2
|
local y = math.floor(love.graphics.getHeight() - RH * #menu) / 2
|
||||||
|
|
||||||
return Ui.new {
|
return Ui:new {
|
||||||
x = x, y = y,
|
x = x, y = y,
|
||||||
menu
|
menu
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ local function makeOptionsMenu()
|
|||||||
local config = dummySave.load()
|
local config = dummySave.load()
|
||||||
|
|
||||||
-- Make configuration editable via UI
|
-- Make configuration editable via UI
|
||||||
return Ui.new {
|
return Ui:new {
|
||||||
x = x, y = y,
|
x = x, y = y,
|
||||||
|
|
||||||
Rows {
|
Rows {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user