misc_gui.c
changeset 1392 136eaaac002c
parent 1390 e7cdf3ce0fb6
child 1397 fa8539dcab46
equal deleted inserted replaced
1391:929b46b9e3cc 1392:136eaaac002c
   197 	"  Michael Blunck - Pre-Signals and Semaphores © 2003",
   197 	"  Michael Blunck - Pre-Signals and Semaphores © 2003",
   198 	"  George - Canal/Lock graphics © 2003-2004",
   198 	"  George - Canal/Lock graphics © 2003-2004",
   199 	"  Marcin Grzegorczyk - Foundations for Tracks on Slopes",
   199 	"  Marcin Grzegorczyk - Foundations for Tracks on Slopes",
   200 	"  All Translators - Who made OpenTTD a truly international game",
   200 	"  All Translators - Who made OpenTTD a truly international game",
   201 	"  Bug Reporters - Without whom OpenTTD would still be full of bugs!",
   201 	"  Bug Reporters - Without whom OpenTTD would still be full of bugs!",
   202 	NULL,
       
   203 	"",
   202 	"",
   204 	"",
   203 	"",
   205 	"And last but not least:",
   204 	"And last but not least:",
   206 	"  Chris Sawyer - For an amazing game!"
   205 	"  Chris Sawyer - For an amazing game!"
   207 };
   206 };
   212 	case WE_CREATE: /* Set up window counter and start position of scroller */
   211 	case WE_CREATE: /* Set up window counter and start position of scroller */
   213 		WP(w, scroller_d).counter = 0;
   212 		WP(w, scroller_d).counter = 0;
   214 		WP(w, scroller_d).height = w->height - 40;
   213 		WP(w, scroller_d).height = w->height - 40;
   215 		break;
   214 		break;
   216 	case WE_PAINT: {
   215 	case WE_PAINT: {
   217 		const char *str;
       
   218 		char buffer[100];
       
   219 		uint i;
   216 		uint i;
   220 		int y = WP(w, scroller_d).height;
   217 		int y = WP(w, scroller_d).height;
   221 		DrawWindowWidgets(w);
   218 		DrawWindowWidgets(w);
   222 
   219 
   223 		// Show original copyright and revision version
   220 		// Show original copyright and revision version
   225 		DrawStringCentered(210, 17 + 10, STR_00B7_VERSION, 0);
   222 		DrawStringCentered(210, 17 + 10, STR_00B7_VERSION, 0);
   226 
   223 
   227 		// Show all scrolling credits
   224 		// Show all scrolling credits
   228 		for (i = 0; i < lengthof(credits); i++) {
   225 		for (i = 0; i < lengthof(credits); i++) {
   229 			if (y >= 50 && y < (w->height - 40)) {
   226 			if (y >= 50 && y < (w->height - 40)) {
   230 				str = credits[i];
   227 				DoDrawString(credits[i], 10, y, 0x10);
   231 				/* Hack-Alert: Translated by is a dynamic string as it changes
       
   232 				 * with the language chosen. So the special value of NULL is used
       
   233 				 * to identify this for the moment */
       
   234 				if (str == NULL) {
       
   235 					GetString(buffer, STR_TRANSLATED_BY);
       
   236 					str = buffer;
       
   237 				}
       
   238 
       
   239 			 DoDrawString(str, 10, y, 0x10);
       
   240 			}
   228 			}
   241 			y += 10;
   229 			y += 10;
   242 		}
   230 		}
   243 
   231 
   244 		// If the last text has scrolled start anew from the start
   232 		// If the last text has scrolled start anew from the start