Fixed Errors in gui

This commit is contained in:
Cooldude2606
2017-12-31 18:18:03 +00:00
parent 8dc45bb926
commit 630e476733
3 changed files with 8 additions and 6 deletions

View File

@@ -18,7 +18,8 @@ Gui.left.add{
caption='item/rocket-silo', caption='item/rocket-silo',
tooltip={'rockets.tooltip'}, tooltip={'rockets.tooltip'},
draw=function(frame) draw=function(frame)
frame.caption = {'rocket-gui.name'} frame.caption = {'rockets.name'}
local player = Game.get_player(frame.player_index)
local data = _global() local data = _global()
local satellites = player.force.get_item_launched('satellite') local satellites = player.force.get_item_launched('satellite')
local time = {'rockets.nan'} local time = {'rockets.nan'}
@@ -34,7 +35,7 @@ Gui.left.add{
} }
frame.add{ frame.add{
type='label', type='label',
caption={'rockets.last',tick_to_display_format(data.last)} caption={'rockets.last',tick_to_display_format(game.tick-data.last)}
} }
frame.add{ frame.add{
type='label', type='label',
@@ -45,7 +46,7 @@ Gui.left.add{
caption={'rockets.milestones'}, caption={'rockets.milestones'},
style='caption_label' style='caption_label'
} }
local milestones = { local milestones = frame.add{
type='flow', type='flow',
direction='vertical' direction='vertical'
} }
@@ -60,7 +61,7 @@ Gui.left.add{
if time > 0 then _time = tick_to_display_format(time) end if time > 0 then _time = tick_to_display_format(time) end
milestones.add{ milestones.add{
type='label', type='label',
caption={'rockets.format',tostring(milestone),time} caption={'rockets.format',tostring(milestone),_time}
} }
end end
end, end,

View File

@@ -16,7 +16,7 @@ Discord: https://discord.gg/r6dC2uK
-- guis dir -- guis dir
require('Guis/readme') require('Guis/readme')
require('Guis/player-list')
require('Guis/rockets') require('Guis/rockets')
require('Guis/player-list')
-- other -- other

View File

@@ -7,4 +7,5 @@ sent=Rockets Sent: __1__
first=First Lanuched At: __1__ first=First Lanuched At: __1__
last=Last Launch Took: __1__ last=Last Launch Took: __1__
time=Average Launch Time: __1__ time=Average Launch Time: __1__
milestones=Milestones: milestones=Milestones:
format=__1__: __2__