diff -r c7dcf4c3c76f src/lang/english.txt --- a/src/lang/english.txt Sun Nov 02 13:26:18 2008 +0100 +++ b/src/lang/english.txt Sun Nov 02 14:05:54 2008 +0100 @@ -1218,6 +1218,13 @@ STR_CONFIG_PATCHES_STATIONS :{BLACK}Stations STR_CONFIG_PATCHES_ECONOMY :{BLACK}Economy STR_CONFIG_PATCHES_AI :{BLACK}Competitors + +STR_TREEVIEW_USER_INTERFACE :{ORANGE}User interface +STR_TREEVIEW_CONSTRUCTION :{ORANGE}Construction +STR_TREEVIEW_VEHICLES :{ORANGE}Vehicles +STR_TREEVIEW_STATIONS :{ORANGE}Stations +STR_TREEVIEW_ECONOMY :{ORANGE}Economy +STR_TREEVIEW_COMPETITORS :{ORANGE}Competitors STR_CONFIG_PATCHES_DISABLED :disabled STR_CONFIG_PATCHES_INT32 :{NUM} diff -r c7dcf4c3c76f src/settings_gui.cpp --- a/src/settings_gui.cpp Sun Nov 02 13:26:18 2008 +0100 +++ b/src/settings_gui.cpp Sun Nov 02 14:05:54 2008 +0100 @@ -1052,7 +1052,8 @@ DrawString(x + TREE_PATCH_TEXT_OFFSET, y, (sdb->str) + disabled, TC_FROMSTRING); } -static const char *_patches_ui[] = { +/** Tree fields of the User interface section */ +static TreeField _treeview_ui_fields[] = { "gui.vehicle_speed", "gui.status_long_date", "gui.show_finances", @@ -1084,8 +1085,13 @@ "gui.always_build_infrastructure", "gui.show_track_reservation", }; +/** User interface treeview section */ +static TreeSection _treeview_ui = TreeSection(STR_TREEVIEW_USER_INTERFACE, + _treeview_ui_fields, + lengthof(_treeview_ui_fields)); -static const char *_patches_construction[] = { +/** Tree fields of the Construction section */ +static TreeField _treeview_construction_fields[] = { "construction.build_on_slopes", "construction.autoslope", "construction.extra_dynamite", @@ -1099,8 +1105,13 @@ "gui.default_signal_type", "gui.cycle_signal_types", }; +/** Construction treeview section */ +static TreeSection _treeview_construction = TreeSection(STR_TREEVIEW_CONSTRUCTION, + _treeview_construction_fields, + lengthof(_treeview_construction_fields)); -static const char *_patches_stations[] = { +/** Tree fields of the Stations section */ +static TreeField _treeview_stations_fields[] = { "station.join_stations", "order.improved_load", "order.selectgoods", @@ -1114,8 +1125,13 @@ "station.adjacent_stations", "economy.station_noise_level", }; +/** Stations treeview section */ +static TreeSection _treeview_stations = TreeSection(STR_TREEVIEW_STATIONS, + _treeview_stations_fields, + lengthof(_treeview_stations_fields)); -static const char *_patches_economy[] = { +/** Tree fields of the Economy section */ +static TreeField _treeview_economy_fields[] = { "economy.inflation", "construction.raw_industry_construction", "economy.multiple_industry_per_town", @@ -1133,8 +1149,13 @@ "economy.larger_towns", "economy.initial_city_size", }; +/** Economy treeview section */ +static TreeSection _treeview_economy = TreeSection(STR_TREEVIEW_ECONOMY, + _treeview_economy_fields, + lengthof(_treeview_economy_fields)); -static const char *_patches_ai[] = { +/** Tree fields of the Competitors section */ +static TreeField _treeview_competitors_fields[] = { "ai.ainew_active", "ai.ai_in_multiplayer", "ai.ai_disable_veh_train", @@ -1142,8 +1163,13 @@ "ai.ai_disable_veh_aircraft", "ai.ai_disable_veh_ship", }; +/** Competitors treeview section */ +static TreeSection _treeview_competitors = TreeSection(STR_TREEVIEW_COMPETITORS, + _treeview_competitors_fields, + lengthof(_treeview_competitors_fields)); -static const char *_patches_vehicles[] = { +/** Tree fields of the Vehicles section */ +static TreeField _treeview_vehicles_fields[] = { "vehicle.realistic_acceleration", "pf.forbid_90_deg", "vehicle.mammoth_trains", @@ -1176,6 +1202,24 @@ "order.timetabling", "vehicle.dynamic_engines", }; +/** Vehicles treeview section */ +static TreeSection _treeview_vehicles = TreeSection(STR_TREEVIEW_VEHICLES, + _treeview_vehicles_fields, + lengthof(_treeview_vehicles_fields)); + +/** Tree fields of the root section */ +static TreeField _treeview_fields[] = { + TreeField(&_treeview_ui), + TreeField(&_treeview_construction), + TreeField(&_treeview_vehicles), + TreeField(&_treeview_stations), + TreeField(&_treeview_economy), + TreeField(&_treeview_competitors) +}; +/** Root treeview section */ +static TreeSection _treeview = TreeSection(STR_NULL, + _treeview_fields, + lengthof(_treeview_fields)); /** Data structure describing a single patch in a tab */ struct PatchEntry {