-
Notifications
You must be signed in to change notification settings - Fork 45
Fix and improve time formatting #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For some reason this doesn't work in practice. anybody know why? |
What do you mean it doesn't work? I think I took formatting style from original WON HL and didn't put any thought if it's useful or not. Yours suggestion seems to make more sense to me. |
@a1batross False alarm, just the 32-bit build not loading up the menu shared object properly, and instead choosing the built in one |
menus/ServerInfo.cpp
Outdated
@@ -51,9 +51,9 @@ struct player_entry_t | |||
int seconds = ( time - hours * 3600 - minutes * 60 ); | |||
|
|||
if( hours != 0 ) | |||
time_str.Format( "%ih %i:%i", hours, minutes, seconds ); | |||
time_str.Format( "%i:%02i:%02i", hours, minutes, seconds ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to do like this:
time_str.Format( "%02i:%02i:%02i", hours, minutes, seconds );
menus/ServerInfo.cpp
Outdated
else | ||
time_str.Format( "%i:%i", minutes, seconds ); | ||
time_str.Format( "%i:%02i", minutes, seconds ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing with this line:
time_str.Format( "%02i:%02i", minutes, seconds );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with these changes but as you're a active contributer I'm happy to merge them
@SNMetamorph I've done the changes you requested. Should we merge? |
Looks good to me. Though, final word is up to @a1batross |
You can tell what it's about from the title.
Here are examples of the changes it makes: