Merge pull request #2524 from Hzj-jie/master2

Add characters in menu items to indicate sub menus
This commit is contained in:
Frans de Jonge
2017-02-08 10:43:40 +01:00
committed by GitHub
3 changed files with 26 additions and 12 deletions

View File

@@ -266,4 +266,17 @@ function util.splitFileNameSuffix(file)
return string.gsub(file, "(.*)%.(.*)", "%1"), string.gsub(file, ".*%.", "")
end
function util.getMenuText(item)
local text
if item.text_func then
text = item.text_func()
else
text = item.text
end
if item.sub_item_table ~= nil then
text = text .. " \226\150\184"
end
return text
end
return util