Place text in freeform container
This commit is contained in:
parent
3bb7a69577
commit
f06a979536
@ -5,6 +5,7 @@ local Text = require("gfx.text")
|
|||||||
local List = require("gfx.list")
|
local List = require("gfx.list")
|
||||||
local Event = require("gfx.event")
|
local Event = require("gfx.event")
|
||||||
local Padding = require("gfx.padding")
|
local Padding = require("gfx.padding")
|
||||||
|
local Container = require("gfx.container")
|
||||||
|
|
||||||
|
|
||||||
local CACHE_FILE = "/.storage.cache"
|
local CACHE_FILE = "/.storage.cache"
|
||||||
@ -245,7 +246,7 @@ local PAGES = {
|
|||||||
pageState.stacks = ItemGroup.collectStacks(state.controller:find(function(stack)
|
pageState.stacks = ItemGroup.collectStacks(state.controller:find(function(stack)
|
||||||
return not stack:isEmpty()
|
return not stack:isEmpty()
|
||||||
end))
|
end))
|
||||||
|
|
||||||
table.sort(pageState.stacks, function(a, b) return a:getItemCount() > b:getItemCount() end)
|
table.sort(pageState.stacks, function(a, b) return a:getItemCount() > b:getItemCount() end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -307,8 +308,17 @@ local PAGES = {
|
|||||||
bottom = 1,
|
bottom = 1,
|
||||||
element = title
|
element = title
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local stuffContainer = Container:new{
|
||||||
|
children = {
|
||||||
|
paddedTitle
|
||||||
|
},
|
||||||
|
width = state.width,
|
||||||
|
height = state.height,
|
||||||
|
parent = state.monitor
|
||||||
|
}
|
||||||
|
|
||||||
return renderDefault(state, paddedTitle)
|
return renderDefault(state, stuffContainer)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
REQUEST = function(state, newPage)
|
REQUEST = function(state, newPage)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user