mirror of
https://gitlab.com/4w/mtimer.git
synced 2025-02-17 17:03:46 +01:00
adapt ingame time format to new style
Addresses https://gitlab.com/4w/mtimer/-/issues/16
This commit is contained in:
@ -82,25 +82,23 @@ end
|
||||
|
||||
mtimer.dialog.ingame_time_format = function (player_name)
|
||||
local time_data = mtimer.get_times(player_name).ingame_time
|
||||
local line = mtimer.get_table_line
|
||||
|
||||
mtimer.show_formspec('mtimer:ingame_time_format', {
|
||||
title = S('Ingame Time Format'),
|
||||
height = 3.8,
|
||||
show_to = player_name,
|
||||
formspec = {
|
||||
'field_close_on_enter[format;false]',
|
||||
'field[0,0;+contentWidth,0.5;format;;'..esc(time_data.format)..']',
|
||||
'container[0,0.9]',
|
||||
'label[2.8,0;'..S('Variable')..']',
|
||||
'label[4.25,0;'..S('Current Value')..']',
|
||||
'box[0,0.25;+contentWidth,0.02;#ffffff]',
|
||||
'label[0,0.5;'..S('Hours (24h)')..'] label[2.8,0.5;{24h}] label[4.25,0.5;'..time_data.hours_24..']',
|
||||
'label[0,0.9;'..S('Hours (12h)')..'] label[2.8,0.9;{12h}] label[4.25,0.9;'..time_data.hours_12..']',
|
||||
'label[0,1.3;'..S('Minutes')..'] label[2.8,1.3;{min}] label[4.25,1.3;'..time_data.minutes..']',
|
||||
'label[0,1.7;'..S('Ingame Timestamp')..'] label[2.8,1.7;{its}] label[4.25,1.7;'..time_data.ingame_timestamp..']',
|
||||
'box[0,2;+contentWidth,0.02;#ffffff]',
|
||||
'label[0,2.25;'..S('Current Result')..']',
|
||||
'label[2.8,2.25;'..esc(time_data.formatted)..']',
|
||||
'container[0,1.5]',
|
||||
line(0, '', S('Variable'), S('Current Value')),
|
||||
line(1, '-'),
|
||||
line(2, S('Hours (24h)'), '{24h}', time_data.hours_24),
|
||||
line(3, S('Hours (12h)'), '{12h}', time_data.hours_12),
|
||||
line(4, S('Minutes'), '{min}', time_data.minutes),
|
||||
line(5, S('Ingame Timestamp'), '{its}', time_data.ingame_timestamp),
|
||||
line(6, '-'),
|
||||
line(7, S('Current Result'), esc(time_data.formatted), ''),
|
||||
'container_end[]'
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user