File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 44#include < eepp/ui/uiprogressbar.hpp>
55#include < eepp/ui/uiscenenode.hpp>
66
7- #include < format>
8-
97namespace EE ::UI::Tools {
108
119static const auto AUDIO_PLAYER_LAYOUT = R"xml(
@@ -74,12 +72,15 @@ static const auto AUDIO_PLAYER_LAYOUT = R"xml(
7472</hbox>
7573 )xml" ;
7674
75+ static std::string formatSingleTime ( const Time& t ) {
76+ long totalSeconds = static_cast <long >( t.asSeconds () );
77+ long minutes = totalSeconds / 60 ;
78+ long seconds = totalSeconds % 60 ;
79+ return String::format ( " %ld:%02ld" , minutes, seconds );
80+ }
81+
7782static std::string toTimeString ( const Time& t, const Time& t2 ) {
78- auto formatTime = []( const Time& time ) {
79- long totalSeconds = static_cast <long >( time.asSeconds () );
80- return std::format ( " {}:{:02}" , totalSeconds / 60 , totalSeconds % 60 );
81- };
82- return std::format ( " {} / {}" , formatTime ( t ), formatTime ( t2 ) );
83+ return String::format ( " %s / %s" , formatSingleTime ( t ), formatSingleTime ( t2 ) );
8384}
8485
8586UIAudioPlayer* UIAudioPlayer::New () {
You can’t perform that action at this time.
0 commit comments