diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-31 19:39:09 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch) | |
tree | 161f0e6ac300e604de61b8203b5a58279637f9eb /src/goal_gui.cpp | |
parent | e740c24eb7a90bc771f5976d64d80639ee7576e5 (diff) | |
download | openttd-0f64ee5ce1548d9cda69917f27c5b1a3cb91823d.tar.xz |
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/goal_gui.cpp')
-rw-r--r-- | src/goal_gui.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index d6180b0df..ef63197d5 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -23,6 +23,7 @@ #include "story_base.h" #include "command_func.h" #include "string_func.h" +#include "goal_cmd.h" #include "widgets/goal_widget.h" @@ -382,17 +383,17 @@ struct GoalQuestionWindow : public Window { { switch (widget) { case WID_GQ_BUTTON_1: - DoCommandP(CMD_GOAL_QUESTION_ANSWER, 0, this->window_number, this->button[0]); + Command<CMD_GOAL_QUESTION_ANSWER>::Post(0, this->window_number, this->button[0], {}); this->Close(); break; case WID_GQ_BUTTON_2: - DoCommandP(CMD_GOAL_QUESTION_ANSWER, 0, this->window_number, this->button[1]); + Command<CMD_GOAL_QUESTION_ANSWER>::Post(0, this->window_number, this->button[1], {}); this->Close(); break; case WID_GQ_BUTTON_3: - DoCommandP(CMD_GOAL_QUESTION_ANSWER, 0, this->window_number, this->button[2]); + Command<CMD_GOAL_QUESTION_ANSWER>::Post(0, this->window_number, this->button[2], {}); this->Close(); break; } |