settings_gui.c
changeset 3121 2e50f731567a
parent 3119 08471cfc4ef8
child 3124 60f74c9c90e3
equal deleted inserted replaced
3120:1b41287d4ee9 3121:2e50f731567a
   671 	{_patches_stations,     lengthof(_patches_stations)},
   671 	{_patches_stations,     lengthof(_patches_stations)},
   672 	{_patches_economy,      lengthof(_patches_economy)},
   672 	{_patches_economy,      lengthof(_patches_economy)},
   673 	{_patches_ai,           lengthof(_patches_ai)},
   673 	{_patches_ai,           lengthof(_patches_ai)},
   674 };
   674 };
   675 
   675 
       
   676 extern Patches _patches_newgame;
       
   677 
   676 /** The main patches window. Shows a number of categories on top and
   678 /** The main patches window. Shows a number of categories on top and
   677  * a selection of patches in that category.
   679  * a selection of patches in that category.
   678  * Uses WP(w, def_d) macro - data_1, data_2, data_3 */
   680  * Uses WP(w, def_d) macro - data_1, data_2, data_3 */
   679 static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
   681 static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
   680 {
   682 {
   681 	static Patches *patches_ptr;
   683 	static Patches *patches_ptr;
   682 
   684 
   683 	switch (e->event) {
   685 	switch (e->event) {
   684 	case WE_CREATE:
   686 	case WE_CREATE:
   685 		patches_ptr = &_patches;
   687 		patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches;
   686 		break;
   688 		break;
   687 
   689 
   688 	case WE_PAINT: {
   690 	case WE_PAINT: {
   689 		int x, y;
   691 		int x, y;
   690 		const PatchEntry *pe;
   692 		const PatchEntry *pe;