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 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

This comment has been minimized.

Copy link
Contributor

nielsmh commented Jan 26, 2019

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

@andythenorth

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

PeterN commented Jan 26, 2019

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

@andythenorth

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

andythenorth commented Jan 26, 2019

Just 2 more 😛

horse horsey liveries 8

horse horsey liveries 7

@J0anJosep

This comment has been minimized.

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

This comment has been minimized.

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'.

@PeterN PeterN force-pushed the PeterN:group-livery branch from 5d1cb6d to 92499e0 Jan 27, 2019
@andythenorth

This comment has been minimized.

Copy link
Contributor

andythenorth commented Jan 27, 2019

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

Copy link
Contributor

nielsmh left a comment

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 PeterN force-pushed the PeterN:group-livery branch from 92499e0 to 9383c79 Jan 27, 2019
@PeterN

This comment has been minimized.

Copy link
Member Author

PeterN commented Jan 27, 2019

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

@J0anJosep

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

J0anJosep commented Jan 27, 2019

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 PeterN force-pushed the PeterN:group-livery branch from 9383c79 to dc8362a Jan 27, 2019
@PeterN

This comment has been minimized.

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.

@PeterN PeterN force-pushed the PeterN:group-livery branch from dc8362a to 73cde85 Jan 28, 2019
PeterN added 2 commits Apr 16, 2018
…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 PeterN force-pushed the PeterN:group-livery branch from 73cde85 to b115c53 Jan 28, 2019
@PeterN

This comment has been minimized.

Copy link
Member Author

PeterN commented Jan 28, 2019

Group hierarchy is now followed for liveries.

@andythenorth

This comment has been minimized.

Copy link
Contributor

andythenorth commented Jan 28, 2019

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

This comment has been minimized.

Copy link
Contributor

planetmaker commented Jan 31, 2019

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

Copy link
Contributor

planetmaker left a comment

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

@planetmaker planetmaker merged commit 23960d0 into OpenTTD:master Jan 31, 2019
1 check passed
1 check passed
OpenTTD CI Build #20190128.13 succeeded
Details
@PeterN PeterN deleted the PeterN:group-livery branch Feb 2, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this pull request Feb 3, 2019
PeterN added a commit that referenced this pull request Feb 3, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this pull request Feb 6, 2019
michicc added a commit 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 added 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 added a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
nielsmh added 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 added 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.