|
|
@ -160,16 +160,20 @@ function MenuItem:init()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
self[1] = HorizontalGroup:new{
|
|
|
|
self[1] = FrameContainer:new{
|
|
|
|
HorizontalSpan:new{ width = 5 },
|
|
|
|
bordersize = 0,
|
|
|
|
ItemShortCutIcon:new{
|
|
|
|
padding = 0,
|
|
|
|
dimen = shortcut_icon_dimen,
|
|
|
|
HorizontalGroup:new{
|
|
|
|
key = self.shortcut,
|
|
|
|
HorizontalSpan:new{ width = 5 },
|
|
|
|
radius = shortcut_icon_r,
|
|
|
|
ItemShortCutIcon:new{
|
|
|
|
style = self.shortcut_style,
|
|
|
|
dimen = shortcut_icon_dimen,
|
|
|
|
},
|
|
|
|
key = self.shortcut,
|
|
|
|
HorizontalSpan:new{ width = 10 },
|
|
|
|
radius = shortcut_icon_r,
|
|
|
|
self._underline_container
|
|
|
|
style = self.shortcut_style,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
HorizontalSpan:new{ width = 10 },
|
|
|
|
|
|
|
|
self._underline_container
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -264,10 +268,6 @@ function Menu:_recalculateDimen()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
self.perpage = math.floor((self.dimen.h - self.dimen.x) / self.item_dimen.h) - 2
|
|
|
|
self.perpage = math.floor((self.dimen.h - self.dimen.x) / self.item_dimen.h) - 2
|
|
|
|
self.page_num = math.ceil(#self.item_table / self.perpage)
|
|
|
|
self.page_num = math.ceil(#self.item_table / self.perpage)
|
|
|
|
-- update page info layout, fixed #281
|
|
|
|
|
|
|
|
if self.page_info then
|
|
|
|
|
|
|
|
self.page_info:resetLayout()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function Menu:init()
|
|
|
|
function Menu:init()
|
|
|
@ -414,6 +414,7 @@ function Menu:updateItems(select_number)
|
|
|
|
-- self.layout must be updated for focusmanager
|
|
|
|
-- self.layout must be updated for focusmanager
|
|
|
|
self.layout = {}
|
|
|
|
self.layout = {}
|
|
|
|
self.item_group:clear()
|
|
|
|
self.item_group:clear()
|
|
|
|
|
|
|
|
self.page_info:resetLayout()
|
|
|
|
self:_recalculateDimen()
|
|
|
|
self:_recalculateDimen()
|
|
|
|
|
|
|
|
|
|
|
|
-- default to select the first item
|
|
|
|
-- default to select the first item
|
|
|
|