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

Re-ordering of settings / options and alike #3826

Closed
DorpsGek opened this issue May 9, 2010 · 9 comments
Closed

Re-ordering of settings / options and alike #3826

DorpsGek opened this issue May 9, 2010 · 9 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

DorpsGek commented May 9, 2010

planetmaker opened the ticket and wrote:

Currently OpenTTD has a number of places where various settings are found:
- Game Options
- Adv. Settings
- World generation dialoge
- Difficulty settings
- Cheat menu
and partially also
- Transparency settings
- Settings dialogue ingame
- NewGRF dialogue
- KI dialogue

For new users this can be quite confusing, the idea is to unify this a bit:
- move settings specific to a single game all to the 'new game' dialogue. This also means that newgrf, AI and adv. settings selection become a sub-window (tab?) of the 'new game' dialogue.
- move settings related to the UI to the game options (or preferences) dialogue.

This change has to be done in small steps. A first small step is attached: moving "road vehicle driving side" and "town names" from the 'game options' to the 'world generation' dialogue. The 'road vehicle driving side' is in a 2nd patch (also) added to the advanced settings vehicles tab. A 3rd patch adjust the string names in all languages.

Attachments

Reported version: trunk
Operating system: All


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

planetmaker wrote:

Here's a next (or rather a first) step toward unifying the options and settings (I try to keep steps small for better readability, less likely to break things): The game creation dialogue receives tab capability and makes use of that for - so far - three not directly map (shape) related settings.

The next steps from here are:
- integration of the height map dialogue with this one to a joint dialogue which will then again result in a slightly different layout in the map tab.
- making use of a variation of the game_setup.diff as in the initial posting, moving two settings from the options to the new game settings tab
- adding the capability to call this window with a tab pre-defined

Later then:
- adding link(?) or direct integration to the adv. settings
- moving the difficulty options to adv. settings, removing all difficulty levels except 'custom' (newgrf spoil that concept anyway)
- adding a newgrf tab
- adding an AI tab
- call this AI and newgrf tab directly when accessed from ingame via the corresponding menu entries

At some stage possibly:
- give the active tab a slightly different shade than the window itself
- other minor widget tweaks to accomodate fancy layout desires

EDIT: added an update to the diff. Two unused strings slipped into english.txt

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8024

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Following advice I first went to re-order and structure the new game window itself.
Attached a patch which re-models this and unifies it with the 'load heightmap' button (which will now both end up in this window).

Special attention I'd like to draw to genworld_gui:611 and following. It's a bit of a hack in my eyes: should another solution be found for the feedback whether a heightmap was selected or not? But on the other hand it's AFAIK pretty fail-safe.

A bit of a todo remains still:
- moving things like this->SetWidgetLoweredState(GLAND_USE_HEIGHTMAP_BUTTON, this->landscape_source == USE_HEIGHTMAP); out of OnPaint()
- the widget which provides size display of the heightmap is not yet properly re-scaled. I'd like advice there how to achieve that; the same method seems to work for other strings

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8053

@DorpsGek
Copy link
Member Author

planetmaker wrote:

White space and tabs can be evil. Fixed diff.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8055

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Attached a small patch which applies on top of the previous one. It de-duplicates a bit code by introducing a small function SetPlane which does all the tasks related to preparing to display the newly selected plane of a NWID_SELECTION. Good idea? Bad idea? Or should and can it be even more generalized?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8057

@DorpsGek
Copy link
Member Author

planetmaker wrote:

As prelimnary work here a small patch which tidies the OnPaint function of the newgame window and moves all widget updates to the places where their state gets changed. For those where there are several places, I introduced a function WidgetUpdateStatus() in order to avoid code duplication.

The patch is against clean trunk r19859.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8067

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Updated version. It uses OnInvalidateData in order to set the widget data. Also it fixes the issue that the main menu and the new game window could show different climates; they now communicate a state change to eachother. Thanks to Yexo for his comments.

EDIT: yet another update

EDIT2: hg diff -rXXX:tip didn't give the diff I hoped. Here's the update the last one was meant to be.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8068

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Split patch:
talkback_mainmenu.diff makes sure that the climate slected in either the main menu or the newgame menu updates also the climate status in the other window.
newgame_onpaint.diff moves the widget updates to either the constructor or the OnInvalidateData procedures.

EDIT: slight update to newgame_onpaint.diff

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8070

@DorpsGek
Copy link
Member Author

planetmaker wrote:

a mercurial queue repo with a sequence of small patches can be found at http://dev.openttdcoop.org/projects/openttd-gui-mq/repository


This comment was imported from FlySpray: https://bugs.openttd.org/task/3826#comment8142

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Mass closure of patch tickets with no commentary for >5 years. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets).


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

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) wontfix 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