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

recruit dialog: Gray out units that will not be able to be recruited #4444

Merged
merged 8 commits into from
Oct 16, 2019

Conversation

jostephd
Copy link
Member

Fixes #4443. This doesn't add or remove any units to the recruit dialog, it simply makes units that will fail to be recruited be listed in gray.

See the individual commits for details.

@jostephd jostephd self-assigned this Oct 10, 2019
@Wedge009
Copy link
Member

Testing An Orcish Incursion S5 as mentioned in #4443 and your branch name, this seems to do what is intended.

@jostephd
Copy link
Member Author

Thanks for the review!

@jostephd jostephd added the Ready for testing Issues for which a potential fix is available but untested. label Oct 10, 2019
@@ -27,11 +27,13 @@ namespace dialogs
class unit_recruit : public modal_dialog
{
public:
unit_recruit(std::vector<const unit_type*>& recruit_list, team& team);
/// @param recruit_list maps unit typs to strings. The strings are ""
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no param called recruit_list.

Should it map to t_string instead of string?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no param called recruit_list.

Fixed

Should it map to t_string instead of string?

What difference would that make?

Thanks for the review!

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel t_string makes it obvious that it's a string for showing to the user, because it's explicitly translatable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Anything else before merging?

src/gui/dialogs/unit_recruit.hpp Outdated Show resolved Hide resolved
@jostephd
Copy link
Member Author

The conflict is trivial, caused by @sevu's 0dc80ec. I'll fix it as part of merging.

@jostephd jostephd force-pushed the recruit-extrarecruit-gray-AOI-S5 branch from 424d446 to bc4613d Compare October 16, 2019 03:50
@jostephd jostephd force-pushed the recruit-extrarecruit-gray-AOI-S5 branch from bc4613d to 129e53b Compare October 16, 2019 03:52
jostephd added a commit that referenced this pull request Oct 16, 2019
@jostephd jostephd merged commit 129e53b into wesnoth:master Oct 16, 2019
@jostephd jostephd mentioned this pull request Oct 16, 2019
Wedge009 pushed a commit to Wedge009/wesnoth that referenced this pull request Nov 12, 2019
(cherry picked from commit 70a2046)
Wedge009 pushed a commit to Wedge009/wesnoth that referenced this pull request Nov 13, 2019
(cherry picked from commit 70a2046)
Wedge009 pushed a commit that referenced this pull request Nov 13, 2019
(cherry picked from commit 70a2046)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for testing Issues for which a potential fix is available but untested.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

recruit dialog lists unrecruitable units
3 participants