From 3ab536cf84335e0ac5a715b040ac8fba6bae22f8 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Thu, 24 Feb 2011 15:12:16 +0200 Subject: [PATCH] Changed: #1193 Polished layout dialogs and code. --- .../tools/3d/object_viewer_qt/src/entity.cpp | 8 ++-- .../3d/object_viewer_qt/src/object_viewer.h | 2 - .../src/particle_control_form.ui | 42 +++++++++++++++---- .../src/plugins/example/qnel_widget.cpp | 7 +++- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/entity.cpp b/code/nel/tools/3d/object_viewer_qt/src/entity.cpp index 0f8a05b92..72ee5ee32 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/entity.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/entity.cpp @@ -25,9 +25,7 @@ // NeL includes #include #include -#include #include -#include #include #include #include @@ -124,8 +122,10 @@ void CEntity::loadAnimation(std::string &fileName) uint id = _AnimationSet->addAnimation(fileName.c_str(),CFile::getFilenameWithoutExtension(fileName).c_str()); _AnimationList.push_back(_AnimationSet->getAnimationName(id)); _AnimationSet->build(); - if (!_Skeleton.empty()) _PlayList->registerTransform(_Skeleton); - else _PlayList->registerTransform(_Instance); + if (!_Skeleton.empty()) + _PlayList->registerTransform(_Skeleton); + else + _PlayList->registerTransform(_Instance); } void CEntity::loadSWT(std::string &fileName) diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.h b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.h index b74544a3c..a7ea7fdc9 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.h +++ b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.h @@ -39,9 +39,7 @@ namespace NL3D class UDriver; class UScene; class ULight; -class UInstance; class UCamera; -class USkeleton; class UTextContext; class UPlayListManager; class U3dMouseListener; diff --git a/code/nel/tools/3d/object_viewer_qt/src/particle_control_form.ui b/code/nel/tools/3d/object_viewer_qt/src/particle_control_form.ui index 69a76c963..11c19572d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/particle_control_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/particle_control_form.ui @@ -6,26 +6,26 @@ 0 0 - 1101 - 121 + 1053 + 85 - + 0 0 - 950 - 121 + 896 + 85 524287 - 121 + 85 @@ -39,8 +39,20 @@ + + 6 + + + 0 + + + 6 + - 9 + 0 + + + 3 @@ -84,6 +96,9 @@ 0 + + 3 + @@ -93,6 +108,12 @@ QFrame::Plain + + 0 + + + 3 + @@ -102,12 +123,12 @@ - 1 + 0 - 9 + 0 3 @@ -200,6 +221,9 @@ 0 + + 3 + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp index 7c2338de1..88d42c7b6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp @@ -84,6 +84,11 @@ void QNLWidget::setInterval(int msec) m_mainTimer->setInterval(msec); } +void QNLWidget::setBackgroundColor(NLMISC::CRGBA backgroundColor) +{ + m_backgroundColor = backgroundColor; +} + void QNLWidget::updateRender() { if (isVisible()) @@ -101,7 +106,7 @@ void QNLWidget::updateRender() if (m_initialized && !m_driver->isLost()) { //_driver->activate(); - m_driver->clearBuffers(NLMISC::CRGBA(125,12,58)); + m_driver->clearBuffers(m_backgroundColor); Q_EMIT updatePreRender(); Q_EMIT updatePostRender();