Skip to content
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

Detailed performance rating window is too narrow for some currencies #4102

Closed
DorpsGek opened this issue Aug 31, 2010 · 3 comments
Closed

Detailed performance rating window is too narrow for some currencies #4102

DorpsGek opened this issue Aug 31, 2010 · 3 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Krille opened the ticket and wrote:

When using e.g. Euro as the currency the detailed performance rating window is too narrow to show the whole numbers, even for a new game.

The window width calculation renders a string with a fixed value. Due to the exchange rates that may result into a very large amount which is heavily shortened by {CURRCOMPACT} then. For Euro the result is 2,000M, while the actual values are wider. For pounds it's 1,000,000k, which results into enough space.

The patch tries to fix that by making the example value smaller so that the example string will be longer in some cases and adds some extra fixed space to account for the cases where it's shorter now.

For a new game all strings fit into the window now.

The patch also makes the window resize accordingly when changing the currency in-game, it did only when changing the language.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4102
@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 9, 2010

Rubidium wrote:

If I'm using a font twice as big as the normal font those 11 pixels will likely not be enough. So there needs to be a more thorough examination on what the widest values are going to be and how to figure that out. Maybe checking the currency and inverse-applying the rate on the number before passing it through CURRCOMPACT? That would probably do the trick, wouldn't it?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4102#comment8751

@DorpsGek
Copy link
Member Author

Krille wrote:

Thanks for the hint, it's working even better now.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4102#comment8764

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

In r21010


This comment was imported from FlySpray: https://bugs.openttd.org/task/4102

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant