mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +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
|
-- this is the default draw function if one is not provided
|
||||||
function center._center:draw(frame)
|
function center._center:draw(frame)
|
||||||
|
Gui.bar(frame,520)
|
||||||
local tab_bar = frame.add{
|
local tab_bar = frame.add{
|
||||||
type='frame',
|
type='frame',
|
||||||
name='tab_bar'
|
name='tab_bar',
|
||||||
|
direction='vertical'
|
||||||
}
|
}
|
||||||
local tab_bar_scroll = tab_bar.add{
|
local tab_bar_scroll = tab_bar.add{
|
||||||
type='scroll-pane',
|
type='scroll-pane',
|
||||||
@@ -76,6 +78,7 @@ function center._center:draw(frame)
|
|||||||
name='tab_bar_scroll_flow',
|
name='tab_bar_scroll_flow',
|
||||||
direction='horizontal'
|
direction='horizontal'
|
||||||
}
|
}
|
||||||
|
Gui.bar(frame,520)
|
||||||
local tab = frame.add{
|
local tab = frame.add{
|
||||||
type ='frame',
|
type ='frame',
|
||||||
name='tab',
|
name='tab',
|
||||||
@@ -87,6 +90,7 @@ function center._center:draw(frame)
|
|||||||
horizontal_scroll_policy='never',
|
horizontal_scroll_policy='never',
|
||||||
vertical_scroll_policy='auto'
|
vertical_scroll_policy='auto'
|
||||||
}
|
}
|
||||||
|
Gui.bar(frame,520)
|
||||||
local first_tab = nil
|
local first_tab = nil
|
||||||
for name,button in pairs(self.tabs) do
|
for name,button in pairs(self.tabs) do
|
||||||
first_tab = first_tab or name
|
first_tab = first_tab or name
|
||||||
|
|||||||
@@ -25,6 +25,18 @@ function Gui:_load_parts(parts)
|
|||||||
end
|
end
|
||||||
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)
|
Event.register(defines.events.on_tick, function(event)
|
||||||
if (event.tick/(3600*game.speed)) % 15 == 0 then
|
if (event.tick/(3600*game.speed)) % 15 == 0 then
|
||||||
Gui.left.update()
|
Gui.left.update()
|
||||||
|
|||||||
Reference in New Issue
Block a user