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

You have a warning that should be checked.

src/object_gui.cpp Show resolved Hide resolved
src/object_gui.cpp Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 Jan 23, 2021 Inactive
src/object_gui.cpp Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 Jan 23, 2021 Inactive
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 Jan 23, 2021 Inactive
@J0anJosep
Copy link
Contributor

@J0anJosep J0anJosep commented Jan 23, 2021

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 Jan 23, 2021 Inactive
@perezdidac perezdidac marked this pull request as ready for review Jan 23, 2021
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 Feb 1, 2021 Inactive
Copy link
Contributor

@stormcone stormcone left a comment

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 Feb 16, 2021 Inactive
@perezdidac perezdidac requested a review from LordAro Feb 16, 2021
@DorpsGek DorpsGek temporarily deployed to preview-pr-8603 Feb 17, 2021 Inactive
Copy link
Member

@LordAro LordAro left a comment

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
@perezdidac
Copy link
Contributor Author

@perezdidac perezdidac commented Feb 19, 2021

No real issues

Thank you! Addressed your comments.

@perezdidac perezdidac requested a review from LordAro Feb 19, 2021
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Feb 19, 2021

@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
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants