Changeset - r10678:c59e6c7504cc
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-01-11 14:01:45
rubidium@openttd.org
(svn r14989) -Codechange: remove a lookup table by reordering some items in english.txt (Swallow)
2 files changed with 3 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/autoreplace_gui.cpp
Show inline comments
 
@@ -232,83 +232,76 @@ public:
 
			this->SetWidgetsHiddenState(true,
 
									RVW_WIDGET_TRAIN_ENGINEWAGON_TOGGLE,
 
									RVW_WIDGET_TRAIN_FLUFF_LEFT,
 
									RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN,
 
									RVW_WIDGET_TRAIN_FLUFF_RIGHT,
 
									RVW_WIDGET_TRAIN_WAGONREMOVE_TOGGLE,
 
									WIDGET_LIST_END);
 
		}
 

	
 
		ResizeWindow(this, 0, this->resize.step_height * this->vscroll.cap);
 

	
 
		/* Set the minimum window size to the current window size */
 
		this->resize.width  = this->width;
 
		this->resize.height = this->height;
 

	
 
		this->caption_color = _local_company;
 
		this->sel_group = id_g;
 
		this->vscroll2.cap = this->vscroll.cap;   // these two are always the same
 

	
 
		this->FindWindowPlacementAndResize(desc);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		static const StringID _vehicle_type_names[] = {
 
			STR_019F_TRAIN,
 
			STR_019C_ROAD_VEHICLE,
 
			STR_019E_SHIP,
 
			STR_019D_AIRCRAFT
 
		};
 

	
 
		if (this->update_left || this->update_right) this->GenerateLists();
 

	
 
		Company *c = GetCompany(_local_company);
 
		EngineID selected_id[2];
 
		const GroupID selected_group = this->sel_group;
 

	
 
		selected_id[0] = this->sel_engine[0];
 
		selected_id[1] = this->sel_engine[1];
 

	
 
		/* Disable the "Start Replacing" button if:
 
		 *    Either list is empty
 
		 * or The selected replacement engine has a replacement (to prevent loops)
 
		 * or The right list (new replacement) has the existing replacement vehicle selected */
 
		this->SetWidgetDisabledState(RVW_WIDGET_START_REPLACE,
 
										selected_id[0] == INVALID_ENGINE ||
 
										selected_id[1] == INVALID_ENGINE ||
 
										EngineReplacementForCompany(c, selected_id[1], selected_group) != INVALID_ENGINE ||
 
										EngineReplacementForCompany(c, selected_id[0], selected_group) == selected_id[1]);
 

	
 
		/* Disable the "Stop Replacing" button if:
 
		 *   The left list (existing vehicle) is empty
 
		 *   or The selected vehicle has no replacement set up */
 
		this->SetWidgetDisabledState(RVW_WIDGET_STOP_REPLACE,
 
										selected_id[0] == INVALID_ENGINE ||
 
										!EngineHasReplacementForCompany(c, selected_id[0], selected_group));
 

	
 
		/* now the actual drawing of the window itself takes place */
 
		SetDParam(0, _vehicle_type_names[this->window_number]);
 
		SetDParam(0, STR_019F_TRAIN + this->window_number);
 

	
 
		if (this->window_number == VEH_TRAIN) {
 
			/* set on/off for renew_keep_length */
 
			SetDParam(1, c->renew_keep_length ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF);
 

	
 
			/* set wagon/engine button */
 
			SetDParam(2, this->wagon_btnstate ? STR_ENGINES : STR_WAGONS);
 

	
 
			/* sets the colour of that art thing */
 
			this->widget[RVW_WIDGET_TRAIN_FLUFF_LEFT].color  = _company_colours[_local_company];
 
			this->widget[RVW_WIDGET_TRAIN_FLUFF_RIGHT].color = _company_colours[_local_company];
 
		}
 

	
 
		if (this->window_number == VEH_TRAIN) {
 
			/* Show the selected railtype in the pulldown menu */
 
			const RailtypeInfo *rti = GetRailTypeInfo(sel_railtype);
 
			this->widget[RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN].data = rti->strings.replace_text;
 
		}
 

	
 
		this->DrawWidgets();
 

	
 
		/* sets up the string for the vehicle that is being replaced to */
 
		if (selected_id[0] != INVALID_ENGINE) {
 
			if (!EngineHasReplacementForCompany(c, selected_id[0], selected_group)) {
src/lang/english.txt
Show inline comments
 
@@ -457,52 +457,52 @@ STR_018A_CAN_T_CHANGE_SERVICING         
 
STR_018B_CLOSE_WINDOW                                           :{BLACK}Close window
 
STR_018C_WINDOW_TITLE_DRAG_THIS                                 :{BLACK}Window title - drag this to move window
 
STR_STICKY_BUTTON                                               :{BLACK}Mark this window as uncloseable by the 'Close All Windows' key
 
STR_RESIZE_BUTTON                                               :{BLACK}Click and drag to resize this window
 
STR_SAVELOAD_HOME_BUTTON                                        :{BLACK}Click here to jump to the current default save/load directory
 
STR_018D_DEMOLISH_BUILDINGS_ETC                                 :{BLACK}Demolish buildings etc. on a square of land
 
STR_018E_LOWER_A_CORNER_OF_LAND                                 :{BLACK}Lower a corner of land
 
STR_018F_RAISE_A_CORNER_OF_LAND                                 :{BLACK}Raise a corner of land
 
STR_0190_SCROLL_BAR_SCROLLS_LIST                                :{BLACK}Scroll bar - scrolls list up/down
 
STR_HSCROLL_BAR_SCROLLS_LIST                                    :{BLACK}Scroll bar - scrolls list left/right
 
STR_0191_SHOW_LAND_CONTOURS_ON_MAP                              :{BLACK}Show land contours on map
 
STR_0192_SHOW_VEHICLES_ON_MAP                                   :{BLACK}Show vehicles on map
 
STR_0193_SHOW_INDUSTRIES_ON_MAP                                 :{BLACK}Show industries on map
 
STR_0194_SHOW_TRANSPORT_ROUTES_ON                               :{BLACK}Show transport routes on map
 
STR_0195_SHOW_VEGETATION_ON_MAP                                 :{BLACK}Show vegetation on map
 
STR_0196_SHOW_LAND_OWNERS_ON_MAP                                :{BLACK}Show land owners on map
 
STR_0197_TOGGLE_TOWN_NAMES_ON_OFF                               :{BLACK}Toggle town names on/off on map
 
STR_0198_PROFIT_THIS_YEAR_LAST_YEAR                             :{TINYFONT}{BLACK}Profit this year: {CURRENCY} (last year: {CURRENCY})
 

	
 
############ range for service numbers starts
 
STR_AGE                                                         :{COMMA} year{P "" s} ({COMMA})
 
STR_AGE_RED                                                     :{RED}{COMMA} year{P "" s} ({COMMA})
 
############ range for service numbers ends
 

	
 
STR_019F_TRAIN                                                  :Train
 
STR_019C_ROAD_VEHICLE                                           :Road vehicle
 
STR_019E_SHIP                                                   :Ship
 
STR_019D_AIRCRAFT                                               :Aircraft
 
STR_019E_SHIP                                                   :Ship
 
STR_019F_TRAIN                                                  :Train
 
STR_01A0_IS_GETTING_OLD                                         :{WHITE}{VEHICLE} is getting old
 
STR_01A1_IS_GETTING_VERY_OLD                                    :{WHITE}{VEHICLE} is getting very old
 
STR_01A2_IS_GETTING_VERY_OLD_AND                                :{WHITE}{VEHICLE} is getting very old and urgently needs replacing
 
STR_01A3_LAND_AREA_INFORMATION                                  :{WHITE}Land Area Information
 
STR_01A4_COST_TO_CLEAR_N_A                                      :{BLACK}Cost to clear: {LTBLUE}N/A
 
STR_01A5_COST_TO_CLEAR                                          :{BLACK}Cost to clear: {RED}{CURRENCY}
 
STR_REVENUE_WHEN_CLEARED                                        :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY}
 
STR_01A6_N_A                                                    :N/A
 
STR_01A7_OWNER                                                  :{BLACK}Owner: {LTBLUE}{STRING1}
 
STR_ROAD_OWNER                                                  :{BLACK}Road owner: {LTBLUE}{STRING1}
 
STR_TRAM_OWNER                                                  :{BLACK}Tramway owner: {LTBLUE}{STRING1}
 
STR_RAIL_OWNER                                                  :{BLACK}Railroad owner: {LTBLUE}{STRING1}
 
STR_01A8_LOCAL_AUTHORITY                                        :{BLACK}Local authority: {LTBLUE}{STRING1}
 
STR_01A9_NONE                                                   :None
 
STR_01AA_NAME                                                   :{BLACK}Name
 
STR_01AB                                                        :{BLACK}{TINYFONT}{VEHICLE}
 

	
 
############ range for days starts
 
STR_01AC_1ST                                                    :1st
 
STR_01AD_2ND                                                    :2nd
 
STR_01AE_3RD                                                    :3rd
 
STR_01AF_4TH                                                    :4th
 
STR_01B0_5TH                                                    :5th
 
STR_01B1_6TH                                                    :6th
0 comments (0 inline, 0 general)