mirror of
https://github.com/kepler155c/opus
synced 2025-10-17 16:57:39 +00:00
fix menu separators + sys dir restructure
This commit is contained in:
@@ -24,6 +24,7 @@ function UI.DropMenu:setParent()
|
||||
for _,child in ipairs(self.children) do
|
||||
child.width = maxWidth + 2
|
||||
if child.spacer then
|
||||
child.inactive = true
|
||||
child.text = string.rep('-', child.width - 2)
|
||||
end
|
||||
end
|
||||
|
@@ -25,8 +25,6 @@ UI.MenuBar.defaults = {
|
||||
showBackButton = false,
|
||||
buttonClass = 'MenuItem',
|
||||
}
|
||||
UI.MenuBar.spacer = { spacer = true, text = 'spacer', inactive = true }
|
||||
|
||||
function UI.MenuBar:postInit()
|
||||
self:addButtons(self.buttons)
|
||||
end
|
||||
@@ -42,7 +40,7 @@ function UI.MenuBar:addButtons(buttons)
|
||||
else
|
||||
local buttonProperties = {
|
||||
x = self.lastx,
|
||||
width = #button.text + self.spacing,
|
||||
width = #(button.text or 'button') + self.spacing,
|
||||
centered = false,
|
||||
}
|
||||
self.lastx = self.lastx + buttonProperties.width
|
||||
|
Reference in New Issue
Block a user