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

Feature: Group liveries, and livery window usability enhancements. #7108

Merged
merged 2 commits into from Jan 31, 2019

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Jan 26, 2019

This PR add liveries to vehicle groups, and makes some usability changes to the livery selection window, replacing the checkbox enable/disable with a 'default' option in the colour drop down.

@nielsmh
Copy link
Contributor

nielsmh commented Jan 26, 2019

A PR like this ought to have some PR screenshots, I say.

@andythenorth
Copy link
Contributor

andythenorth commented Jan 26, 2019

A PR like this ought to have some PR screenshots, I say.

You probably meant for the new UI features, not just train colours, right? 😛

horse horsey liveries 4

horse horsey liveries 3

horse horsey liveries

@PeterN
Copy link
Member Author

PeterN commented Jan 26, 2019

Thanks Andy. Didn't have time earlier to post screenshots.

@andythenorth
Copy link
Contributor

andythenorth commented Jan 26, 2019

Company Colour defaults are now set like this:

group-livery-default

For ungrouped trains, RVs etc, the long established (and weird imo) settings for some types of vehicle are kept. Note however that the checkboxes are now removed, reducing UI friction:

group-livery-trains

Liveries for groups do not offer settings by types of vehicle, 1CC and 2CC will be applied consistently to all vehicles in the group:

group-livery-group

Results:

group-livery-results

Group livery UI can also be opened directly from the groups window, with the correct group selected:

group-livery-direct-access

@andythenorth
Copy link
Contributor

Just 2 more 😛

horse horsey liveries 8

horse horsey liveries 7

@J0anJosep
Copy link
Contributor

J0anJosep commented Jan 27, 2019

Looks good. I tested it and works as expected. But please run script/api/generate_widget.sh.

Some questions:

  • (unrelated to this PR) Could be "New Colour Scheme" window renamed to "Name of the company - Colour Scheme"? And could its title widget have the company color as other company-related windows?
  • Group hierarchy isn't shown in the Colour Scheme Window. Could it be added?
  • Can the colour of a parent group change the colour of all its descendants? In other words, can group hierarchy be used for colour schemes?
  • Shouldn't new icons have a similar style to those on openttd.grf or OpenGFX?

@PeterN
Copy link
Member Author

PeterN commented Jan 27, 2019

Looks good. I tested it and works as expected. But please run script/api/generate_widget.sh.

Ah yes. We really ought to make this part of the build process!

Some questions:

* (unrelated to this PR) Could be "New Colour Scheme" window renamed to "Name of the company - Colour Scheme"? And could its title widget have the company color as other company-related windows?

Hmm, sounds reasonable, although the title widget is already the company colour. EDIT Or not. Confused as I was testing something else and it was. EDIT And it is in master, just broken in this PR, wow.

* Group hierarchy isn't shown in the Colour Scheme Window. Could it be added?

Possibly depending on the next point.

* Can the colour of a parent group change the colour of all its descendants? In other words, can group hierarchy be used for colour schemes?

This will change how setting a colour to 'Default' will work. Currently it means to fall back to the system of picking the colour based on the original liveries system. With hierarchy in place it would mean falling back to the parent scheme.

* Shouldn't new icons have a similar style to those on openttd.grf or OpenGFX?

It's based on the extra OpenTTD GUI sprites that already exist, but there's no icon for 'choose colour'.

@andythenorth
Copy link
Contributor

I would ship what we've got, and consider group hierarchy stuff later. Some things need to be used in prod for a while to see what really needs changed / improved :)

Also group hierarchy might be a moving target, e.g. #6053 and #6189

nielsmh
nielsmh previously approved these changes Jan 27, 2019
Copy link
Contributor

@nielsmh nielsmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will admit to not testing this myself, but the code looks sound, and others' testing indicates it works as intended.
Were the new sprites final?

@PeterN
Copy link
Member Author

PeterN commented Jan 27, 2019

Another update as I had, again, forgotten to run generate_widgets

@J0anJosep
Copy link
Contributor

J0anJosep commented Jan 27, 2019

This will change how setting a colour to 'Default' will work. Currently it means to fall back to the system of picking the colour based on the original liveries system. With hierarchy in place it would mean falling back to the parent scheme.

Well, instead of "Default", it should be "Inherited". But it is more consistent to inherit colour from parents, the same way autoreplacements work.

I would ship what we've got, and consider group hierarchy stuff later. Some things need to be used in prod for a while to see what really needs changed / improved :)

I think it is better to deal with this now for keeping commits to master in a better order.

@J0anJosep
Copy link
Contributor

About icons, it is my fault. I thought those icons were based on non-free graphics instead of being based on OpenGFX. Probably, some static newGRF must have had replaced the ones in OpenGFX when I checked this.

@PeterN
Copy link
Member Author

PeterN commented Jan 27, 2019

@nielsmh Unless someone wants to improve them, I think the icons are fine.

Current version now displays the group hierarchy so the list order is the same as the group window, but does not affect how colour is assigned.

There's a small discrepancy anyway that when 'Default' is selected it shows the main company colour, but vehicles may not be that colour if the type-based liveries are used.

…on in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.
@PeterN
Copy link
Member Author

PeterN commented Jan 28, 2019

Group hierarchy is now followed for liveries.

@nielsmh nielsmh added component: interface This is an interface issue enhancement Issue would be a good enhancement; we accept Pull Requests! savegame upgrade labels Jan 28, 2019
@andythenorth
Copy link
Contributor

Tested, works for me.

I thought I had found an issue where default was sometimes wrong for 2CC, but can't repro. Only saw it in a savegame with groups created in a previous version of patch, assuming it was stale data.

@planetmaker
Copy link
Contributor

It compiles and looks good. Let's ship it ;)

Copy link
Contributor

@planetmaker planetmaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As by the comment... let's ship it

@planetmaker planetmaker merged commit 23960d0 into OpenTTD:master Jan 31, 2019
@PeterN PeterN deleted the group-livery branch February 2, 2019 22:22
PeterN added a commit to PeterN/OpenTTD that referenced this pull request Feb 3, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this pull request Feb 6, 2019
smearle added a commit to smearle/pyOpenTTD that referenced this pull request Feb 12, 2019
Revert "Feature: Group liveries, and livery window usability enhancements. (OpenTTD#7108)"

This reverts commit 23960d0.
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
…penTTD#7108)

* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
stormcone added a commit to stormcone/nml that referenced this pull request Apr 20, 2019
The number of GUI sprites has increased since the group liveries addition (OpenTTD/OpenTTD#7108).
michicc pushed a commit to OpenTTD/nml that referenced this pull request Apr 20, 2019
The number of GUI sprites has increased since the group liveries addition (OpenTTD/OpenTTD#7108).
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
…penTTD#7108)

* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
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 enhancement Issue would be a good enhancement; we accept Pull Requests!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants