diff --git a/ExpCore/GuiParts/center.lua b/ExpCore/GuiParts/center.lua index fa58961d..dd650603 100644 --- a/ExpCore/GuiParts/center.lua +++ b/ExpCore/GuiParts/center.lua @@ -61,9 +61,11 @@ end -- this is the default draw function if one is not provided function center._center:draw(frame) + Gui.bar(frame,520) local tab_bar = frame.add{ type='frame', - name='tab_bar' + name='tab_bar', + direction='vertical' } local tab_bar_scroll = tab_bar.add{ type='scroll-pane', @@ -76,6 +78,7 @@ function center._center:draw(frame) name='tab_bar_scroll_flow', direction='horizontal' } + Gui.bar(frame,520) local tab = frame.add{ type ='frame', name='tab', @@ -87,6 +90,7 @@ function center._center:draw(frame) horizontal_scroll_policy='never', vertical_scroll_policy='auto' } + Gui.bar(frame,520) local first_tab = nil for name,button in pairs(self.tabs) do first_tab = first_tab or name diff --git a/ExpCore/gui.lua b/ExpCore/gui.lua index 9314a097..aa961f5b 100644 --- a/ExpCore/gui.lua +++ b/ExpCore/gui.lua @@ -25,6 +25,18 @@ function Gui:_load_parts(parts) end end +function Gui.bar(frame,width) + local line = frame.add{ + type='progressbar', + size=1, + value=1 + } + line.style.height = 3 + line.style.width = width or 10 + line.style.color = defines.color.white + return line +end + Event.register(defines.events.on_tick, function(event) if (event.tick/(3600*game.speed)) % 15 == 0 then Gui.left.update()