mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
New Lines Add To Gui
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user