Changed: #1193 Polished layout dialogs and code.

This commit is contained in:
dnk-88 2011-02-24 15:12:16 +02:00
parent 4e8fa8bd72
commit 3ab536cf84
4 changed files with 43 additions and 16 deletions

View file

@ -25,9 +25,7 @@
// NeL includes // NeL includes
#include <nel/misc/path.h> #include <nel/misc/path.h>
#include <nel/3d/u_driver.h> #include <nel/3d/u_driver.h>
#include <nel/3d/u_instance.h>
#include <nel/3d/u_scene.h> #include <nel/3d/u_scene.h>
#include <nel/3d/u_skeleton.h>
#include <nel/3d/u_animation_set.h> #include <nel/3d/u_animation_set.h>
#include <nel/3d/u_animation.h> #include <nel/3d/u_animation.h>
#include <nel/3d/u_play_list_manager.h> #include <nel/3d/u_play_list_manager.h>
@ -124,8 +122,10 @@ void CEntity::loadAnimation(std::string &fileName)
uint id = _AnimationSet->addAnimation(fileName.c_str(),CFile::getFilenameWithoutExtension(fileName).c_str()); uint id = _AnimationSet->addAnimation(fileName.c_str(),CFile::getFilenameWithoutExtension(fileName).c_str());
_AnimationList.push_back(_AnimationSet->getAnimationName(id)); _AnimationList.push_back(_AnimationSet->getAnimationName(id));
_AnimationSet->build(); _AnimationSet->build();
if (!_Skeleton.empty()) _PlayList->registerTransform(_Skeleton); if (!_Skeleton.empty())
else _PlayList->registerTransform(_Instance); _PlayList->registerTransform(_Skeleton);
else
_PlayList->registerTransform(_Instance);
} }
void CEntity::loadSWT(std::string &fileName) void CEntity::loadSWT(std::string &fileName)

View file

@ -39,9 +39,7 @@ namespace NL3D
class UDriver; class UDriver;
class UScene; class UScene;
class ULight; class ULight;
class UInstance;
class UCamera; class UCamera;
class USkeleton;
class UTextContext; class UTextContext;
class UPlayListManager; class UPlayListManager;
class U3dMouseListener; class U3dMouseListener;

View file

@ -6,26 +6,26 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1101</width> <width>1053</width>
<height>121</height> <height>85</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>950</width> <width>896</width>
<height>121</height> <height>85</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>524287</width> <width>524287</width>
<height>121</height> <height>85</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -39,8 +39,20 @@
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>9</number> <number>0</number>
</property>
<property name="spacing">
<number>3</number>
</property> </property>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QToolButton" name="playToolButton"> <widget class="QToolButton" name="playToolButton">
@ -84,6 +96,9 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0" rowspan="3"> <item row="0" column="0" rowspan="3">
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="frame_2">
<property name="frameShape"> <property name="frameShape">
@ -93,6 +108,12 @@
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QStackedWidget" name="stackedWidget"> <widget class="QStackedWidget" name="stackedWidget">
<property name="sizePolicy"> <property name="sizePolicy">
@ -102,12 +123,12 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="pageGeneral"> <widget class="QWidget" name="pageGeneral">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="margin"> <property name="margin">
<number>9</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
@ -200,6 +221,9 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="linkCheckBox"> <widget class="QCheckBox" name="linkCheckBox">
<property name="enabled"> <property name="enabled">

View file

@ -84,6 +84,11 @@ void QNLWidget::setInterval(int msec)
m_mainTimer->setInterval(msec); m_mainTimer->setInterval(msec);
} }
void QNLWidget::setBackgroundColor(NLMISC::CRGBA backgroundColor)
{
m_backgroundColor = backgroundColor;
}
void QNLWidget::updateRender() void QNLWidget::updateRender()
{ {
if (isVisible()) if (isVisible())
@ -101,7 +106,7 @@ void QNLWidget::updateRender()
if (m_initialized && !m_driver->isLost()) if (m_initialized && !m_driver->isLost())
{ {
//_driver->activate(); //_driver->activate();
m_driver->clearBuffers(NLMISC::CRGBA(125,12,58)); m_driver->clearBuffers(m_backgroundColor);
Q_EMIT updatePreRender(); Q_EMIT updatePreRender();
Q_EMIT updatePostRender(); Q_EMIT updatePostRender();