Changeset - r7934:e3e55ff50986
[Not reviewed]
master
0 1 0
smatz - 17 years ago 2007-11-21 13:50:36
smatz@openttd.org
(svn r11487) -Fix (r11435): move the list of vehicles a bit higher in the player GUI
1 file changed with 26 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/player_gui.cpp
Show inline comments
 
@@ -975,10 +975,15 @@ static const Widget _player_company_widg
 
{   WIDGETS_END},
 
};
 

	
 

	
 
/**
 
 * Draws text "Vehicles:" and number of all vehicle types, or "(none)"
 
 * @param player ID of player to print statistics of
 
 */
 
static void DrawPlayerVehiclesAmount(PlayerID player)
 
{
 
	const int x = 110;
 
	int y = 72;
 
	int y = 63;
 
	const Vehicle *v;
 
	uint train = 0;
 
	uint road  = 0;
 
@@ -1035,6 +1040,10 @@ int GetAmountOwnedBy(const Player *p, Pl
 
				 (p->share_owners[3] == owner);
 
}
 

	
 
/**
 
 * Draws list of all companies with shares
 
 * @param p pointer to the Player structure
 
 */
 
static void DrawCompanyOwnerText(const Player *p)
 
{
 
	const Player *p2;
 
@@ -1101,23 +1110,30 @@ static void PlayerCompanyWndProc(Window 
 

	
 
			DrawWindowWidgets(w);
 

	
 
			SetDParam(0, p->inaugurated_year);
 
			DrawString(110, 25, STR_7038_INAUGURATED, TC_FROMSTRING);
 

	
 
			DrawPlayerVehiclesAmount((PlayerID)w->window_number);
 

	
 
			DrawString(110, 48, STR_7006_COLOR_SCHEME, TC_FROMSTRING);
 
			/* Draw company-colour bus */
 
			DrawSprite(SPR_VEH_BUS_SW_VIEW, PLAYER_SPRITE_COLOR(p->index), 215, 49);
 

	
 
			/* Player face */
 
			DrawPlayerFace(p->face, p->player_color, 2, 16);
 

	
 
			/* "xxx (Manager)" */
 
			SetDParam(0, p->index);
 
			DrawStringMultiCenter(48, 141, STR_7037_PRESIDENT, 94);
 

	
 
			/* "Inaugurated:" */
 
			SetDParam(0, p->inaugurated_year);
 
			DrawString(110, 23, STR_7038_INAUGURATED, TC_FROMSTRING);
 

	
 
			/* "Colour scheme:" */
 
			DrawString(110, 43, STR_7006_COLOR_SCHEME, TC_FROMSTRING);
 
			/* Draw company-colour bus */
 
			DrawSprite(SPR_VEH_BUS_SW_VIEW, PLAYER_SPRITE_COLOR(p->index), 215, 44);
 

	
 
			/* "Vehicles:" */
 
			DrawPlayerVehiclesAmount((PlayerID)w->window_number);
 

	
 
			/* "Company value:" */
 
			SetDParam(0, CalculateCompanyValue(p));
 
			DrawString(110, 106, STR_7076_COMPANY_VALUE, TC_FROMSTRING);
 

	
 
			/* Shares list */
 
			DrawCompanyOwnerText(p);
 

	
 
			break;
0 comments (0 inline, 0 general)