From e10c0a7602c612993e6b99348bab507b7def0881 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 25 Feb 2012 16:56:25 +0000 Subject: Add entity manipulator widget, added support for editing entity angles. --- src/editorwindow.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/editorwindow.cc') diff --git a/src/editorwindow.cc b/src/editorwindow.cc index ae7d024..bd00189 100644 --- a/src/editorwindow.cc +++ b/src/editorwindow.cc @@ -137,7 +137,7 @@ bool EditorWindow::loadFile(const QString &filename) if (ini.got_key_vector3f("location" , x, y, z)) { entity->properties()->set_comment("location", ini.comment()); entity->properties()->set_location(x, y, z); - //qDebug() << "got location " << x << " " << y << " " << z; + //qDebug() << "got location " << x << " " << y << " " << z; } else if (ini.got_key_string("label", str)) { entity->properties()->set_comment("label", ini.comment()); @@ -150,6 +150,19 @@ bool EditorWindow::loadFile(const QString &filename) } else if (ini.got_key_float("radius", f)) { entity->properties()->set_comment("radius", ini.comment()); entity->properties()->set_radius(f); + + } else if (ini.got_key_vector3f("angles" , x, y, z)) { + entity->properties()->set_comment(ini.key(), ini.comment()); + entity->properties()->set_angles(x, y, z); + + } else if (ini.got_key_float("yaw", x)) { + entity->properties()->set_yaw(x); + + } else if (ini.got_key_float("pitch", y)) { + entity->properties()->set_pitch(y); + + } else if (ini.got_key_float("roll", z)) { + entity->properties()->set_roll(z); } else if (ini.got_key_string("info", str)) { QString comment = entity->properties()->comment("info"); -- cgit v1.2.3