settings_gui.c
changeset 835 f6a341f541d7
parent 833 b8b8fb18ad51
child 842 efc3546bc313
equal deleted inserted replaced
834:effaa59fbba6 835:f6a341f541d7
     8 #include "engine.h"
     8 #include "engine.h"
     9 #include "screenshot.h"
     9 #include "screenshot.h"
    10 #include "newgrf.h"
    10 #include "newgrf.h"
    11 #include "network.h"
    11 #include "network.h"
    12 #include "console.h"
    12 #include "console.h"
       
    13 #include "town.h"
    13 
    14 
    14 static uint32 _difficulty_click_a;
    15 static uint32 _difficulty_click_a;
    15 static uint32 _difficulty_click_b;
    16 static uint32 _difficulty_click_b;
    16 static byte _difficulty_timeout;
    17 static byte _difficulty_timeout;
    17 
    18 
   524     ShowErrorMessage(-1, TEMP_AI_ACTIVATED, 0, 0);
   525     ShowErrorMessage(-1, TEMP_AI_ACTIVATED, 0, 0);
   525 
   526 
   526   return 0;
   527   return 0;
   527 }
   528 }
   528 
   529 
       
   530 int32 PopulationInLabelActive(int32 p1)
       
   531 {
       
   532 	Town *t;
       
   533 
       
   534 	FOR_ALL_TOWNS(t) {
       
   535 		if (t->xy) {
       
   536 			UpdateTownVirtCoord(t);
       
   537 		}
       
   538 	}
       
   539 
       
   540 	return 0;
       
   541 }
       
   542 
   529 int32 InvisibleTreesActive(int32 p1)
   543 int32 InvisibleTreesActive(int32 p1)
   530 {
   544 {
   531 	MarkWholeScreenDirty();
   545 	MarkWholeScreenDirty();
   532 	return 0;
   546 	return 0;
   533 }
   547 }
   596 	{PE_UINT8,	PF_PLAYERBASED, STR_CONFIG_PATCHES_ERRMSG_DURATION,	"errmsg_duration",	&_patches.errmsg_duration,					0, 20,  1, NULL},
   610 	{PE_UINT8,	PF_PLAYERBASED, STR_CONFIG_PATCHES_ERRMSG_DURATION,	"errmsg_duration",	&_patches.errmsg_duration,					0, 20,  1, NULL},
   597 
   611 
   598 	{PE_UINT8,	PF_MULTISTRING | PF_PLAYERBASED, STR_CONFIG_PATCHES_TOOLBAR_POS, "toolbar_pos", &_patches.toolbar_pos,			0,  2,  1, &v_PositionMainToolbar},
   612 	{PE_UINT8,	PF_MULTISTRING | PF_PLAYERBASED, STR_CONFIG_PATCHES_TOOLBAR_POS, "toolbar_pos", &_patches.toolbar_pos,			0,  2,  1, &v_PositionMainToolbar},
   599 	{PE_UINT8,	PF_0ISDIS | PF_PLAYERBASED, STR_CONFIG_PATCHES_SNAP_RADIUS, "window_snap_radius", &_patches.window_snap_radius,     1, 32,  1, NULL},
   613 	{PE_UINT8,	PF_0ISDIS | PF_PLAYERBASED, STR_CONFIG_PATCHES_SNAP_RADIUS, "window_snap_radius", &_patches.window_snap_radius,     1, 32,  1, NULL},
   600 	{PE_BOOL,		PF_PLAYERBASED, STR_CONFIG_PATCHES_INVISIBLE_TREES,	"invisible_trees", &_patches.invisible_trees,					0,  1,  1, &InvisibleTreesActive},
   614 	{PE_BOOL,		PF_PLAYERBASED, STR_CONFIG_PATCHES_INVISIBLE_TREES,	"invisible_trees", &_patches.invisible_trees,					0,  1,  1, &InvisibleTreesActive},
       
   615 	{PE_BOOL,		PF_PLAYERBASED, STR_CONFIG_PATCHES_POPULATION_IN_LABEL, "population_in_label", &_patches.population_in_label, 0, 1, 1, &PopulationInLabelActive},
   601 };
   616 };
   602 
   617 
   603 static const PatchEntry _patches_construction[] = {
   618 static const PatchEntry _patches_construction[] = {
   604 	{PE_BOOL,		0, STR_CONFIG_PATCHES_BUILDONSLOPES,		"build_on_slopes",	&_patches.build_on_slopes,					0,  0,  0, NULL},
   619 	{PE_BOOL,		0, STR_CONFIG_PATCHES_BUILDONSLOPES,		"build_on_slopes",	&_patches.build_on_slopes,					0,  0,  0, NULL},
   605 	{PE_BOOL,		0, STR_CONFIG_PATCHES_EXTRADYNAMITE,		"extra_dynamite",		&_patches.extra_dynamite,						0,  0,  0, NULL},
   620 	{PE_BOOL,		0, STR_CONFIG_PATCHES_EXTRADYNAMITE,		"extra_dynamite",		&_patches.extra_dynamite,						0,  0,  0, NULL},