File diff r1476:60383d08b0e8 → r1477:d0fe35adb3c4
settings_gui.c
Show inline comments
 
@@ -1191,26 +1191,26 @@ static const WindowDesc _patches_selecti
 
void ShowPatchesSelection(void)
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	AllocateWindowDesc(&_patches_selection_desc);
 
}
 

	
 
struct GRFFile *_sel_grffile;
 
GRFFile *_sel_grffile;
 

	
 
enum {
 
	NEWGRF_WND_PROC_OFFSET_TOP_WIDGET = 14,
 
	NEWGRF_WND_PROC_ROWSIZE = 14
 
};
 

	
 
static void NewgrfWndProc(Window *w, WindowEvent *e)
 
{
 
	switch (e->event) {
 
	case WE_PAINT: {
 
		int x, y = NEWGRF_WND_PROC_OFFSET_TOP_WIDGET;
 
		uint16 i = 0;
 
		struct GRFFile *c = _first_grffile;
 
		GRFFile *c = _first_grffile;
 

	
 
		DrawWindowWidgets(w);
 

	
 
		if (_first_grffile == NULL) { // no grf sets installed
 
			DrawStringMultiCenter(140, 210, STR_NEWGRF_NO_FILES_INSTALLED, 250);
 
			break;
 
@@ -1320,13 +1320,14 @@ void ShowNewgrf(void)
 
	Window *w;
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	w = AllocateWindowDesc(&_newgrf_desc);
 

	
 
	{ // little helper function to calculate _grffile_count
 
	  // should be REMOVED once _grffile_count is calculated at loading
 
		struct GRFFile *c = _first_grffile;
 
		GRFFile *c = _first_grffile;
 

	
 
		_grffile_count = 0;
 
		while (c != NULL) {
 
			_grffile_count++;
 
			c = c->next;
 
		}
 
	}