Changeset - r13436:8c37cd6574ae
[Not reviewed]
master
0 5 0
rubidium - 15 years ago 2009-11-02 16:07:09
rubidium@openttd.org
(svn r17955) -Codechange: s/SPR_PLAYER_ICON/SPR_COMPANY_ICON/
5 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/company_cmd.cpp
Show inline comments
 
@@ -111,7 +111,7 @@ uint16 GetDrawStringCompanyColour(Compan
 

	
 
void DrawCompanyIcon(CompanyID c, int x, int y)
 
{
 
	DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOUR(c), x, y);
 
	DrawSprite(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(c), x, y);
 
}
 

	
 
/**
src/graph_gui.cpp
Show inline comments
 
@@ -1056,7 +1056,7 @@ struct PerformanceRatingDetailWindow : W
 
			if (this->IsWidgetDisabled(widget)) return;
 
			CompanyID cid = (CompanyID)(widget - PRW_COMPANY_FIRST);
 
			int offset = (cid == this->company) ? 1 : 0;
 
			Dimension sprite_size = GetSpriteSize(SPR_PLAYER_ICON);
 
			Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON);
 
			DrawCompanyIcon(cid, (r.left + r.right - sprite_size.width) / 2 + offset, (r.top + r.bottom - sprite_size.height) / 2 + offset);
 
			return;
 
		}
 
@@ -1222,7 +1222,7 @@ static NWidgetBase *MakeCompanyButtonRow
 
	NWidgetHorizontal *hor = NULL; // Storage for buttons in one row.
 
	int hor_length = 0;
 

	
 
	Dimension sprite_size = GetSpriteSize(SPR_PLAYER_ICON);
 
	Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON);
 
	sprite_size.width  += WD_MATRIX_LEFT + WD_MATRIX_RIGHT;
 
	sprite_size.height += WD_MATRIX_TOP + WD_MATRIX_BOTTOM + 1; // 1 for the 'offset' of being pressed
 

	
src/network/network_gui.cpp
Show inline comments
 
@@ -2038,7 +2038,7 @@ struct NetworkClientListWindow : Window 
 
		if (widget != CLW_PANEL) return;
 

	
 
		this->server_client_width = max(GetStringBoundingBox(STR_NETWORK_SERVER).width, GetStringBoundingBox(STR_NETWORK_CLIENT).width) + WD_FRAMERECT_RIGHT;
 
		this->company_icon_width = GetSpriteSize(SPR_PLAYER_ICON).width + WD_FRAMERECT_LEFT;
 
		this->company_icon_width = GetSpriteSize(SPR_COMPANY_ICON).width + WD_FRAMERECT_LEFT;
 

	
 
		uint width = 200; // Default width
 
		const NetworkClientInfo *ci;
src/signs_gui.cpp
Show inline comments
 
@@ -163,9 +163,9 @@ struct SignListWindow : Window, SignList
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	{
 
		if (widget == SLW_LIST) {
 
			Dimension spr_dim = GetSpriteSize(SPR_PLAYER_ICON);
 
			Dimension spr_dim = GetSpriteSize(SPR_COMPANY_ICON);
 
			this->text_offset = WD_FRAMETEXT_LEFT + spr_dim.width + 2; // 2 pixels space between icon and the sign text.
 
			resize->height = max<uint>(FONT_HEIGHT_NORMAL, GetSpriteSize(SPR_PLAYER_ICON).height);
 
			resize->height = max<uint>(FONT_HEIGHT_NORMAL, GetSpriteSize(SPR_COMPANY_ICON).height);
 
			Dimension d = {this->text_offset + MAX_LENGTH_SIGN_NAME_PIXELS + WD_FRAMETEXT_RIGHT, WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM};
 
			*size = maxdim(*size, d);
 
		}
src/table/sprites.h
Show inline comments
 
@@ -254,7 +254,7 @@ enum Sprites {
 
	SPR_GRADIENT = 874, // background gradient behind manager face
 

	
 
	/* Icon showing company colour. */
 
	SPR_PLAYER_ICON = 747,
 
	SPR_COMPANY_ICON = 747,
 

	
 
	/* is itself no foundation sprite, because tileh 0 has no foundation */
 
	SPR_FOUNDATION_BASE = 989,
0 comments (0 inline, 0 general)