File diff r23537:f6a6d4ce4bd5 → r23538:8df50944b27a
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -44,13 +44,13 @@
 

	
 
#include "table/strings.h"
 

	
 
#include "safeguards.h"
 

	
 
/** The sprite picker. */
 
NewGrfDebugSpritePicker _newgrf_debug_sprite_picker = { SPM_NONE, NULL, 0, SmallVector<SpriteID, 256>() };
 
NewGrfDebugSpritePicker _newgrf_debug_sprite_picker = { SPM_NONE, NULL, 0, std::vector<SpriteID>() };
 

	
 
/**
 
 * Get the feature index related to the window number.
 
 * @param window_number The window to get the feature index from.
 
 * @return the feature index
 
 */
 
@@ -891,13 +891,13 @@ struct SpriteAlignerWindow : Window {
 
			}
 

	
 
			case WID_SA_LIST: {
 
				const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget);
 
				int step_size = nwid->resize_y;
 

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

	
 
				int y = r.top + WD_FRAMERECT_TOP;
 
				for (int i = this->vscroll->GetPosition(); i < max; i++) {
 
					SetDParam(0, list[i]);
 
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_BLACK_COMMA, TC_FROMSTRING, SA_RIGHT | SA_FORCE);