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: Object class selection string filtering #8603

Merged
merged 1 commit into from Feb 19, 2021

Conversation

perezdidac
Copy link
Contributor

@perezdidac perezdidac commented Jan 23, 2021

Motivation / Problem

Players can use NewGRF in a new game, and some of them contain objects than can be placed on the map. To make it easier for players to browse throughout the list of object classes, this pull request adds a text edit box to the Object Selection window so object classes can be filtered by.

Description

Adding a filter for object classes in the Object Selection window.

filter

Limitations

Note that object classes are filtered by objects themselves are not.

Highlights

  • Selection gets preserved when filtering
  • Always a class selected if filter removes all
  • Re-opening the window selects the previous object class and object
  • Starting a new game too, but only if the corresponding NewGRF is still available.

I plan to do the same for stations next probably. Or vehicles?

Checklist for review

N/A

Copy link
Contributor

@J0anJosep J0anJosep left a comment

Choose a reason for hiding this comment

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

You have a warning that should be checked.

src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
@TrueBrain TrueBrain added the preview This PR is receiving preview builds label Jan 23, 2021
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 January 23, 2021 09:26 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 January 23, 2021 18:30 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 January 23, 2021 18:37 Inactive
@J0anJosep
Copy link
Contributor

You have a warning that should be checked.

Hi Joan Josep, I don't see the warning, where is it?

Check the CI results. Also, under "Files Changed" you have references to the warning.

@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 January 23, 2021 18:55 Inactive
@perezdidac perezdidac marked this pull request as ready for review January 23, 2021 19:02
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 February 1, 2021 22:47 Inactive
Copy link
Contributor

@stormcone stormcone left a comment

Choose a reason for hiding this comment

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

I found some code style and documentation issues.

src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 February 16, 2021 02:18 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 February 17, 2021 02:25 Inactive
Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

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

No real issues

src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
src/object_gui.cpp Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 February 19, 2021 00:55 Inactive
@perezdidac
Copy link
Contributor Author

No real issues

Thank you! Addressed your comments.

@TrueBrain
Copy link
Member

@perezdidac : just for future learning, if you resolved an issue, you can just hit the "Resolve conversation" button without leaving a comment :) Saves you a lot of time, saves us from reading acknowledgements :D Cheers!

@TrueBrain TrueBrain merged commit 96990b2 into OpenTTD:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview This PR is receiving preview builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants