summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-05 18:06:48 +0100
committerPatric Stout <github@truebrain.nl>2021-01-05 21:56:24 +0100
commit62cdadb58207b28dfdf1ab4ceb46278c2561f079 (patch)
treed6e8308cf106daf372ad673d87169f075d3c3a86 /src/widgets
parentd6e15d4943936a89d275354ee59d0e3b7c6a2018 (diff)
downloadopenttd-62cdadb58207b28dfdf1ab4ceb46278c2561f079.tar.xz
Change: move "give money" from client-list to company window
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/company_widget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/company_widget.h b/src/widgets/company_widget.h
index 2fb2234d4..29164896d 100644
--- a/src/widgets/company_widget.h
+++ b/src/widgets/company_widget.h
@@ -46,6 +46,9 @@ enum CompanyWidgets {
WID_C_VIEW_INFRASTRUCTURE, ///< Panel about infrastructure.
+ WID_C_SELECT_GIVE_MONEY, ///< Selection widget for the give money button.
+ WID_C_GIVE_MONEY, ///< Button to give money.
+
WID_C_HAS_PASSWORD, ///< Has company password lock.
WID_C_SELECT_MULTIPLAYER, ///< Multiplayer selection panel.
WID_C_COMPANY_PASSWORD, ///< Button to set company password.