diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gugus/sliproDigits.lua | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/gugus/sliproDigits.lua b/scripts/gugus/sliproDigits.lua index 821dcf6..a8c1c07 100644 --- a/scripts/gugus/sliproDigits.lua +++ b/scripts/gugus/sliproDigits.lua @@ -266,9 +266,27 @@ function leftDigitsEvent(swFunction) lPanel = string.format("%5.0f", dist ) elseif swValue == 27 then - --27.lap completed + --27.laps completed:sector local laps = GetContextInfo("laps") - lPanel = string.format(" L%3.0f ", laps ) + local sLaps = " " + if laps >= 100 then + sLaps = string.format("%3d", laps ) + else + sLaps = string.format("L%02d", laps ) + end + + local sSector = " " + local sectors = GetCarInfo("sector") + if sectors ~= nil then + if sector > 9 then + sSector = string.format("S%2d", sect) + else + sSector = string.format(" S%1d", sect) + end + end + + lPanel = sLaps .. ":" .. sSector + elseif swValue == 28 then --28.total laps |