-
-
Notifications
You must be signed in to change notification settings - Fork 990
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
add adv. preference for number of menu items displayed at once #229
Conversation
See earlier commit: f24f6ad Forum discussion: http://forums.wesnoth.org/viewtopic.php?f=6&t=40668
This commit makes the pager just show enough entries from the previous page to ensure that we have a full page. When the number of displayed entries is large, if we don't do this then the menu can resize dramatically which is a bit jarring.
This doesn't feel like something that should be a preference, but something that should be a function of the vertical space available. What happens if someone sets 32 and tries to play on 800x480? |
Edit: Basically, allowing the user to set 32 and play on a small screen just disables the pager and reverts to default gui behavior. The gui code gives you a vertical slider if the menu goes over some hardcoded vertical size I think: http://i.imgur.com/bTETfOu.png?1 The pager exists at a very low level of the code. The previous limit of 7 was hard coded in the wmi_container object, it would never emit more than 7 items to a gui menu. The pager wraps over that object, keeping a page counter. In principle I guess the pager could be generalized and become a gui element and interact with the layout algorithm for menus, but I think the current behavior is probably fine. The alternative is that it's always 7 and you can't reset it even if you have lots of space available -- in any case this version feels like an improvement. |
I also change the interface to wmi_container to be a bit more natural.
This branch is getting stale -- there are clearly ways it can be improved but no obvious step forward without rewriting a bunch of gui code that we intend to remove eventually anyway, or putting new gui logic inside of the play_controller. Someone else is free to build upon this as they see fit but esp. with regards to the latter I wipe my hands of the matter. Besides this I think a user might legitimately have preferences about how many items to display at once, independent of how much space is on their screen. So for now I will merge it. |
add adv. preference for number of menu items displayed at once, and remaining fixups there
Not completely sure if this is necessary, but various people have expressed varying opinions about how this should work, what is most comfortable for machines with large screens vs small screens etc.
The purpose is that, we are making an effort to support having lots of add-ons active simultaneously, and then the number of wml item slots becomes a scarce resource, so we want to mitigate that and make it not a concern.
See earlier commit: f24f6ad
Forum discussion: http://forums.wesnoth.org/viewtopic.php?f=6&t=40668