Changeset - r24130:fb25135e54b7
[Not reviewed]
master
0 1 0
SamuXarick - 4 years ago 2020-03-22 14:05:10
43006711+SamuXarick@users.noreply.github.com
Change: Open company window when clicking on a company goal (#8033)
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/goal_gui.cpp
Show inline comments
 
@@ -19,6 +19,7 @@
 
#include "core/geometry_func.hpp"
 
#include "company_func.h"
 
#include "company_base.h"
 
#include "company_gui.h"
 
#include "story_base.h"
 
#include "command_func.h"
 
#include "string_func.h"
 
@@ -106,7 +107,12 @@ struct GoalListWindow : public Window {
 
		TileIndex xy;
 
		switch (s->type) {
 
			case GT_NONE: return;
 
			case GT_COMPANY: return;
 

	
 
			case GT_COMPANY:
 
				/* s->dst here is not a tile, but a CompanyID.
 
				 * Show the window with the overview of the company instead. */
 
				ShowCompany((CompanyID)s->dst);
 
				return;
 

	
 
			case GT_TILE:
 
				if (!IsValidTile(s->dst)) return;
0 comments (0 inline, 0 general)