X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fdesigner.cpp;h=32fe42391d13691d7d1d45a14d614bcd1251fa07;hb=2220ba2f11705ea9a4e480603d43ab7ed4cf5a89;hp=6ae9c0726c45701a5915adc9f852d9fdc1b75e66;hpb=e37f7bfbbee86eef3b1f6e338a21239905911608;p=r2c2.git diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index 6ae9c07..32fe423 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -17,6 +17,7 @@ #include #include #include "libr2c2/route.h" +#include "libr2c2/terrain.h" #include "libr2c2/tracktype.h" #include "libr2c2/zone.h" #include "3d/path.h" @@ -35,6 +36,7 @@ #include "selection.h" #include "slopetool.h" #include "svgexporter.h" +#include "terraintool.h" #include "trackbar.h" #include "zonebar.h" #include "zoneproperties.h" @@ -61,6 +63,7 @@ Designer::Designer(int argc, char **argv): // Setup catalogue and layout DataFile::load(catalogue, "tracks.dat"); + DataFile::load(catalogue, "terrain.dat"); cat_layout_3d = new Layout3D(catalogue.get_layout()); @@ -428,6 +431,12 @@ void Designer::key_press(unsigned key) svg_export(); else if(key==Msp::Input::KEY_P) object_properties(); + else if(key==Msp::Input::KEY_TAB) + { + Object *obj = selection.get_object(); + if(Terrain *terrain = dynamic_cast(obj)) + use_tool(new TerrainTool(*this, keyboard, mouse, *terrain)); + } } template