Merge branch 'wip' into testing

This commit is contained in:
Cooldude2606
2017-12-30 14:06:15 +00:00
2 changed files with 17 additions and 1 deletions

View File

@@ -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

View File

@@ -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()