Changeset - r15345:889addb8230c
[Not reviewed]
master
0 2 0
rubidium - 14 years ago 2010-06-19 16:40:31
rubidium@openttd.org
(svn r19997) -Codechange: Unify order of ship and plane icon in stationlist and stationsigns with the rest of the game (frosch)
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_gui.cpp
Show inline comments
 
@@ -172,24 +172,25 @@ static void StationsWndShowStationRating
 
	rating = minu(rating, rating_full) / 16;
 
	if (rating != 0) GfxFillRect(left + 1, y, left + rating, y, 0xD0);
 
}
 

	
 
typedef GUIList<const Station*> GUIStationList;
 

	
 
/** Enum for CompanyStations, referring to _company_stations_widgets */
 
enum StationListWidgets {
 
	SLW_CAPTION,        ///< Window caption
 
	SLW_LIST,           ///< The main panel, list of stations
 
	SLW_SCROLLBAR,      ///< Scrollbar next to the main panel
 

	
 
	/* Vehicletypes need to be in order of StationFacility due to bit magic */
 
	SLW_TRAIN,          ///< 'TRAIN' button - list only facilities where is a railroad station
 
	SLW_TRUCK,          ///< 'TRUCK' button - list only facilities where is a truck stop
 
	SLW_BUS,            ///< 'BUS' button - list only facilities where is a bus stop
 
	SLW_AIRPLANE,       ///< 'AIRPLANE' button - list only facilities where is an airport
 
	SLW_SHIP,           ///< 'SHIP' button - list only facilities where is a dock
 
	SLW_FACILALL,       ///< 'ALL' button - list all facilities
 

	
 
	SLW_NOCARGOWAITING, ///< 'NO' button - list stations where no cargo is waiting
 
	SLW_CARGOALL,       ///< 'ALL' button - list all stations
 

	
 
	SLW_SORTBY,         ///< 'Sort by' button - reverse sort direction
 
	SLW_SORTDROPBTN,    ///< Dropdown button
 
@@ -756,26 +757,26 @@ static NWidgetBase *CargoWidgets(int *bi
 

	
 
static const NWidgetPart _nested_company_stations_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY),
 
		NWidget(WWT_CAPTION, COLOUR_GREY, SLW_CAPTION), SetDataTip(STR_STATION_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
		NWidget(WWT_SHADEBOX, COLOUR_GREY),
 
		NWidget(WWT_STICKYBOX, COLOUR_GREY),
 
	EndContainer(),
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_TRAIN), SetMinimalSize(14, 11), SetDataTip(STR_TRAIN, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_TRUCK), SetMinimalSize(14, 11), SetDataTip(STR_LORRY, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_BUS), SetMinimalSize(14, 11), SetDataTip(STR_BUS, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_SHIP), SetMinimalSize(14, 11), SetDataTip(STR_SHIP, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_AIRPLANE), SetMinimalSize(14, 11), SetDataTip(STR_PLANE, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_SHIP), SetMinimalSize(14, 11), SetDataTip(STR_SHIP, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1),
 
		NWidget(WWT_PUSHBTN, COLOUR_GREY, SLW_FACILALL), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_SELECT_ALL_FACILITIES), SetFill(0, 1),
 
		NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(5, 11), SetFill(0, 1), EndContainer(),
 
		NWidgetFunction(CargoWidgets),
 
		NWidget(WWT_PANEL, COLOUR_GREY, SLW_NOCARGOWAITING), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_NO_WAITING_CARGO), SetFill(0, 1), EndContainer(),
 
		NWidget(WWT_PUSHBTN, COLOUR_GREY, SLW_CARGOALL), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_SELECT_ALL_TYPES), SetFill(0, 1),
 
		NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(),
 
	EndContainer(),
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_SORTBY), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
 
		NWidget(WWT_DROPDOWN, COLOUR_GREY, SLW_SORTDROPBTN), SetMinimalSize(163, 12), SetDataTip(STR_SORT_BY_NAME, STR_TOOLTIP_SORT_CRITERIA), // widget_data gets overwritten.
 
		NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(),
 
	EndContainer(),
src/strings.cpp
Show inline comments
 
@@ -1109,26 +1109,26 @@ static char *FormatString(char *buff, co
 
		}
 
	}
 
	*buff = '\0';
 
	return buff;
 
}
 

	
 

	
 
static char *StationGetSpecialString(char *buff, int x, const char *last)
 
{
 
	if ((x & FACIL_TRAIN)      && (buff + Utf8CharLen(SCC_TRAIN) < last)) buff += Utf8Encode(buff, SCC_TRAIN);
 
	if ((x & FACIL_TRUCK_STOP) && (buff + Utf8CharLen(SCC_LORRY) < last)) buff += Utf8Encode(buff, SCC_LORRY);
 
	if ((x & FACIL_BUS_STOP)   && (buff + Utf8CharLen(SCC_BUS)   < last)) buff += Utf8Encode(buff, SCC_BUS);
 
	if ((x & FACIL_DOCK)       && (buff + Utf8CharLen(SCC_SHIP)  < last)) buff += Utf8Encode(buff, SCC_SHIP);
 
	if ((x & FACIL_AIRPORT)    && (buff + Utf8CharLen(SCC_PLANE) < last)) buff += Utf8Encode(buff, SCC_PLANE);
 
	if ((x & FACIL_DOCK)       && (buff + Utf8CharLen(SCC_SHIP)  < last)) buff += Utf8Encode(buff, SCC_SHIP);
 
	*buff = '\0';
 
	return buff;
 
}
 

	
 
static char *GetSpecialTownNameString(char *buff, int ind, uint32 seed, const char *last)
 
{
 
	return GenerateTownNameString(buff, last, ind, seed);
 
}
 

	
 
static const char * const _silly_company_names[] = {
 
	"Bloggs Brothers",
 
	"Tiny Transport Ltd.",
0 comments (0 inline, 0 general)