From 3e21b04bbcecba742366b8fe6997e36c8c28f664 Mon Sep 17 00:00:00 2001 From: Chapelier2000 Date: Tue, 18 Jul 2017 12:16:54 +0200 Subject: [PATCH 1/2] Update Formatter.php Fix error in display time higher than 60 minutes --- core/Utils/Formatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Utils/Formatter.php b/core/Utils/Formatter.php index 5bf81bcf..ef4c69c0 100644 --- a/core/Utils/Formatter.php +++ b/core/Utils/Formatter.php @@ -40,7 +40,7 @@ abstract class Formatter implements UsageInformationAble { $minutes = floor($seconds / 60); $hours = floor($minutes / 60); $minutes -= $hours * 60; - $seconds -= $hours * 60 + $minutes * 60; + $seconds -= ($hours * 60 + $minutes) * 60; $format = ($hours > 0 ? $hours . ':' : ''); $format .= ($hours > 0 && $minutes < 10 ? '0' : '') . $minutes . ':'; $format .= ($seconds < 10 ? '0' : '') . $seconds . ':'; From 25fdd6121411e08e7016dfdfc555e0f9ee81d14a Mon Sep 17 00:00:00 2001 From: Chapelier2000 Date: Tue, 18 Jul 2017 12:46:50 +0200 Subject: [PATCH 2/2] Update WidgetPlugin.php --- plugins/MCTeam/WidgetPlugin.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/MCTeam/WidgetPlugin.php b/plugins/MCTeam/WidgetPlugin.php index 3297866b..c42c02f5 100644 --- a/plugins/MCTeam/WidgetPlugin.php +++ b/plugins/MCTeam/WidgetPlugin.php @@ -261,6 +261,16 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { $label->setText($map->authorLogin); $label->setTextColor('fff'); $label->setSize($width - 5, $height); + + //AUTEUR TIME + $label = new Label_Text(); + $frame->addChild($label); + $label->setPosition(0, -4.3, 0.2); + $label->setTextSize(1); + $label->setScale(0.8); + $label->setText('$s' . Formatter::formatTime($map->authorTime)); + $label->setTextColor('F7F'); + $label->setSize($width - 5, $height); if (isset($map->mx->pageurl)) { $quad = new Quad();