File diff r24596:eddf98238034 → r24597:afde5721a3b6
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -374,12 +374,12 @@ struct NewGRFInspectWindow : Window {
 
			case WID_NGRFI_VEH_CHAIN: {
 
				assert(this->HasChainIndex());
 
				GrfSpecFeature f = GetFeatureNum(this->window_number);
 
				size->height = max(size->height, GetVehicleImageCellSize((VehicleType)(VEH_TRAIN + (f - GSF_TRAINS)), EIT_IN_DEPOT).height + 2 + WD_BEVEL_TOP + WD_BEVEL_BOTTOM);
 
				size->height = std::max(size->height, GetVehicleImageCellSize((VehicleType)(VEH_TRAIN + (f - GSF_TRAINS)), EIT_IN_DEPOT).height + 2 + WD_BEVEL_TOP + WD_BEVEL_BOTTOM);
 
				break;
 
			}
 

	
 
			case WID_NGRFI_MAINPANEL:
 
				resize->height = max(11, FONT_HEIGHT_NORMAL + 1);
 
				resize->height = std::max(11, FONT_HEIGHT_NORMAL + 1);
 
				resize->width  = 1;
 

	
 
				size->height = 5 * resize->height + TOP_OFFSET + BOTTOM_OFFSET;
 
@@ -430,7 +430,7 @@ struct NewGRFInspectWindow : Window {
 
				int skip = 0;
 
				if (total_width > width) {
 
					int sel_center = (sel_start + sel_end) / 2;
 
					if (sel_center > width / 2) skip = min(total_width - width, sel_center - width / 2);
 
					if (sel_center > width / 2) skip = std::min(total_width - width, sel_center - width / 2);
 
				}
 

	
 
				GrfSpecFeature f = GetFeatureNum(this->window_number);
 
@@ -861,7 +861,7 @@ struct SpriteAlignerWindow : Window {
 
				size->height = ScaleGUITrad(200);
 
				break;
 
			case WID_SA_LIST:
 
				resize->height = max(11, FONT_HEIGHT_NORMAL + 1);
 
				resize->height = std::max(11, FONT_HEIGHT_NORMAL + 1);
 
				resize->width  = 1;
 
				break;
 
			default:
 
@@ -897,7 +897,7 @@ struct SpriteAlignerWindow : Window {
 
				int step_size = nwid->resize_y;
 

	
 
				std::vector<SpriteID> &list = _newgrf_debug_sprite_picker.sprites;
 
				int max = min<int>(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), (uint)list.size());
 
				int max = std::min<int>(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), (uint)list.size());
 

	
 
				int y = r.top + WD_FRAMERECT_TOP;
 
				for (int i = this->vscroll->GetPosition(); i < max; i++) {