Redesign simple item info

This commit is contained in:
Gabriel Tofvesson 2024-10-12 00:48:31 +02:00
parent 1a63a7054f
commit 145bc90eae

View File

@ -331,11 +331,36 @@ local PAGES = {
bgColor = colors.gray
}
local itemCount = Text:new{
text = "Count: "..tostring(group:getItemCount()),
}
local itemSlots = Text:new{
text = "Slots: "..tostring(group:getStackCount())
local simpleDetailsList = List:new{
[Orientation:getId()] = Orientation.HORIZONTAL,
[Children:getId()] = {
Padding:new{
top = 0,
left = 1,
right = 1,
bottom = 0,
element = List:new{
[Orientation:getId()] = Orientation.VERTICAL,
[Children:getId()] = {
Text:new{ text = "Count" },
Text:new{ text = tostring(group:getItemCount()) }
}
}
},
Padding:new{
top = 0,
left = 1,
right = 1,
bottom = 0,
element = List:new{
[Orientation:getId()] = Orientation.VERTICAL,
[Children:getId()] = {
Text:new{ text = "Slot" },
Text:new{ text = tostring(group:getStackCount()) }
}
}
}
}
}
local damage = group:getDamage()
@ -353,8 +378,13 @@ local PAGES = {
local infoElements = List:new{
[Children:getId()] = {
paddedTitle,
itemCount,
itemSlots,
Padding:new{
top = 0,
bottom = 1,
left = 0,
right = 0,
element = simpleDetailsList
},
damageBar
},
[Orientation:getId()] = Orientation.VERTICAL,