Changeset - r11156:94cc27f7f726
[Not reviewed]
master
0 4 0
smatz - 15 years ago 2009-02-17 00:21:08
smatz@openttd.org
(svn r15506) -Codechange: rename ScenarioEditorTownGenerationWindow to FoundTownWindow
4 files changed with 16 insertions and 16 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -644,8 +644,8 @@ STR_02A1_SMALL                          
 
STR_02A2_MEDIUM                                                 :{BLACK}Medium
 
STR_02A3_LARGE                                                  :{BLACK}Large
 
STR_SELECT_TOWN_SIZE_RANDOM                                     :{BLACK}Random
 
STR_SCENARIO_EDITOR_CITY                                        :{BLACK}City
 
STR_SCENARIO_EDITOR_CITY_TOOLTIP                                :{BLACK}Cities grow faster than regular towns{}Depending on settings, they are bigger when founded
 
STR_FOUND_TOWN_CITY                                             :{BLACK}City
 
STR_FOUND_TOWN_CITY_TOOLTIP                                     :{BLACK}Cities grow faster than regular towns{}Depending on settings, they are bigger when founded
 
STR_02A4_SELECT_TOWN_SIZE                                       :{BLACK}Select town size
 
STR_02A5_TOWN_SIZE                                              :{YELLOW}Town size:
 

	
src/settings.cpp
Show inline comments
 
@@ -1311,7 +1311,7 @@ const SettingDesc _settings[] = {
 
	    SDT_BOOL(GameSettings, construction.longbridges,                                            0,NN,  true,                    STR_CONFIG_SETTING_LONGBRIDGES,            NULL),
 
	    SDT_BOOL(GameSettings, construction.signal_side,                                            N,NN,  true,                    STR_CONFIG_SETTING_SIGNALSIDE,             RedrawScreen),
 
	    SDT_BOOL(GameSettings, station.always_small_airport,                                        0,NN, false,                    STR_CONFIG_SETTING_SMALL_AIRPORTS,         NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_layout,                  SLE_UINT8, 59, SL_MAX_VERSION, 0,MS,TL_ORIGINAL,TL_BEGIN,NUM_TLS-1,1, STR_CONFIG_SETTING_TOWN_LAYOUT, NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_layout,                  SLE_UINT8, 59, SL_MAX_VERSION, 0,MS,TL_ORIGINAL,TL_BEGIN,NUM_TLS-1,1, STR_CONFIG_SETTING_TOWN_LAYOUT,     NULL),
 
	SDT_CONDBOOL(GameSettings, economy.allow_town_roads,                       113, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_ALLOW_TOWN_ROADS,       NULL),
 

	
 
	     SDT_VAR(GameSettings, vehicle.train_acceleration_model,     SLE_UINT8,                     0,MS,     0,     0,       1, 1, STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL, TrainAccelerationModelChanged),
src/town_gui.cpp
Show inline comments
 
@@ -598,7 +598,7 @@ void CcBuildTown(bool success, TileIndex
 
	}
 
}
 

	
 
static const Widget _scen_edit_town_gen_widgets[] = {
 
static const Widget _found_town_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_DARK_GREEN,    0,    10,     0,    13, STR_00C5,                 STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_DARK_GREEN,   11,   147,     0,    13, STR_0233_TOWN_GENERATION, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{  WWT_STICKYBOX,   RESIZE_NONE,  COLOUR_DARK_GREEN,  148,   159,     0,    13, 0x0,                      STR_STICKY_BUTTON},
 
@@ -613,7 +613,7 @@ static const Widget _scen_edit_town_gen_
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,         80,   157,    68,    79, STR_02A2_MEDIUM,             STR_02A4_SELECT_TOWN_SIZE},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          2,    79,    81,    92, STR_02A3_LARGE,              STR_02A4_SELECT_TOWN_SIZE},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,         80,   157,    81,    92, STR_SELECT_TOWN_SIZE_RANDOM, STR_02A4_SELECT_TOWN_SIZE},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          2,   157,    96,   107, STR_SCENARIO_EDITOR_CITY,    STR_SCENARIO_EDITOR_CITY_TOOLTIP},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          2,   157,    96,   107, STR_FOUND_TOWN_CITY,         STR_FOUND_TOWN_CITY_TOOLTIP},
 

	
 
{      WWT_LABEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,    0,   147,   108,   121, STR_TOWN_ROAD_LAYOUT,           STR_NULL},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          2,    79,   122,   133, STR_SELECT_LAYOUT_ORIGINAL,     STR_SELECT_TOWN_ROAD_LAYOUT},
 
@@ -625,7 +625,7 @@ static const Widget _scen_edit_town_gen_
 
{   WIDGETS_END},
 
};
 

	
 
struct ScenarioEditorTownGenerationWindow : Window
 
struct FoundTownWindow : Window
 
{
 
private:
 
	enum TownScenarioEditorWidget {
 
@@ -651,7 +651,7 @@ private:
 
	static TownLayout town_layout;
 

	
 
public:
 
	ScenarioEditorTownGenerationWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
 
	FoundTownWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
 
	{
 
		this->FindWindowPlacementAndResize(desc);
 
		town_layout = _settings_game.economy.town_layout;
 
@@ -762,19 +762,19 @@ public:
 
	}
 
};
 

	
 
TownSize ScenarioEditorTownGenerationWindow::town_size = TS_MEDIUM; // select medium-sized towns per default
 
bool ScenarioEditorTownGenerationWindow::city;
 
TownLayout ScenarioEditorTownGenerationWindow::town_layout;
 
TownSize FoundTownWindow::town_size = TS_MEDIUM; // select medium-sized towns per default;
 
bool FoundTownWindow::city;
 
TownLayout FoundTownWindow::town_layout;
 

	
 
static const WindowDesc _scen_edit_town_gen_desc = {
 
static const WindowDesc _found_town_desc = {
 
	WDP_AUTO, WDP_AUTO, 160, 162, 160, 162,
 
	WC_SCEN_TOWN_GEN, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	_scen_edit_town_gen_widgets,
 
	WC_FOUND_TOWN, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	_found_town_widgets,
 
};
 

	
 
void ShowBuildTownWindow()
 
{
 
	if (_game_mode != GM_EDITOR && !IsValidCompanyID(_local_company)) return;
 
	AllocateWindowDescFront<ScenarioEditorTownGenerationWindow>(&_scen_edit_town_gen_desc, 0);
 
	AllocateWindowDescFront<FoundTownWindow>(&_found_town_desc, 0);
 
}
src/window_type.h
Show inline comments
 
@@ -20,6 +20,7 @@ enum WindowClass {
 
	WC_TOWN_DIRECTORY,
 
	WC_STATION_LIST,
 
	WC_TOWN_VIEW,
 
	WC_FOUND_TOWN,
 
	WC_SMALLMAP,
 
	WC_TRAINS_LIST,
 
	WC_ROADVEH_LIST,
 
@@ -64,7 +65,6 @@ enum WindowClass {
 
	WC_MUSIC_WINDOW,
 
	WC_MUSIC_TRACK_SELECTION,
 
	WC_SCEN_LAND_GEN,
 
	WC_SCEN_TOWN_GEN,
 
	WC_SCEN_INDUSTRY,
 
	WC_SCEN_BUILD_TOOLBAR,
 
	WC_BUILD_TREES,
0 comments (0 inline, 0 general)