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

More flexible toolbar #1950

Closed
DorpsGek opened this issue Apr 24, 2008 · 6 comments
Closed

More flexible toolbar #1950

DorpsGek opened this issue Apr 24, 2008 · 6 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

Dominik opened the ticket and wrote:

This patch makes the main toolbar a bit more flexible for small screens. For any screen width greater then 440 pixels (20 [icons] x 22 [pixel width]) it behaves as usual. Below that, it splits the toolbar in two parts. You can switch between those two parts with the (new) last button. It always tries to find a good setup of the buttons so that important buttons (pause, zoom, ...) are available on both toolbars and so that similar buttons are grouped (build rail, build road, ...).

This works down to a width of 280 (14 [icons] x 22 [pixels]). Below that it shuffles the buttons on the split toolbar together again.

Caveat: Not all toolbar sizes are perfect regarding the button setup. It works pretty well with 16 buttons (NDS, small icons) and also 20 buttons (PPC, small icons). What could be done is replacing the awkward priority/order algorithm with a simple table for all seven (14..20) possible sizes.

Missing: I didn't add a new sprite for the "switch screen" button yet. And there's no string for the tooltip.

Attachments

Reported version: trunk
Operating system: All


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

Rubidium wrote:

Why does the company league button need to go?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1950#comment3978

@DorpsGek
Copy link
Member Author

Dominik wrote:

Well, that kinda carried over from the NDS port...
With the Company League button there are 27 standard buttons. Plus 2 buttons to switch the toolbar. That's a total of 29 buttons. When you spread them over the both toolbars (32 buttons) you'll end up with 3 spare buttons that you can assign to both toolbars. But I wanted to have pause, fast forward, zoom in and zoom out on both toolbars.
And when you think about it, both menu entries from the company league button fit very well under the graphs button. At least I think so. :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1950#comment3979

@DorpsGek
Copy link
Member Author

DorpsGek commented May 9, 2008

Dominik wrote:

Ok, here's a new version of my diff. I made static lists for all reasonable sizes. Should be easier to maintain. I think it integrates very nicely and non-intrusive into the current code.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1950#comment4107

@DorpsGek
Copy link
Member Author

DorpsGek commented May 9, 2008

Dominik wrote:

Add( GrainOf( _coding_style ) );

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1950#comment4108

@DorpsGek
Copy link
Member Author

Dominik wrote:

Updated to r13280.
Trunk inclusion and/or comments would be much appreciated.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1950#comment4194

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

In r13339.


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

@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 6, 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