Compare commits

..

No commits in common. "145bc90eae3afae81eed6ede82fc1bb016922f12" and "63e1e544624c31feb4684c208e31230472ae598b" have entirely different histories.

2 changed files with 13 additions and 39 deletions

View File

@ -122,6 +122,10 @@ function Children:with(elementType)
end
function elementType:handleEvent(evt)
if Element.handleEvent(self, evt) then
return true
end
local evtLocalCoords = Event.toElementLocalPosition(evt, self)
if Event.isClickEvent(evt) then
@ -135,15 +139,15 @@ function Children:with(elementType)
return true
end
end
return false
else
for _,child in self:_iterateChildren() do
if child:handleEvent(evtLocalCoords) then
return true
end
end
return false
end
return Element.handleEvent(self, evt)
end
return elementType

View File

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