Change: move "give money" from client-list to company window #8500
+133
−148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
While fixing a bug with
INT32_MAX
"Give Money" situation, I found that JGRPP included a nice patch that brings the "Give Money" button to the company window. To me, it makes so much more sense to have that button there, over anywhere else.Description
It is mostly moving of code. I did fix the Company GUI with the Multiplayer buttons, as they were not aligned properly. As I never did anything with the new Window system before, please review carefully. Tnx :)
This removes
HandleOnEditText
as it was only used for GiveMoney .. that means less special code.CcGiveMoney callback is removed, as now the Command itself generates the chat message. This means modified clients cannot prevent a chat message from being send out, and it was a rather ugly hack on the chat system.
As a bonus, this now works in single-player too! Even AIs can receive your money, if you so like.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.