paysages: More UI polishing.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@293 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
6099241ec9
commit
85e19d380a
5 changed files with 30 additions and 19 deletions
|
@ -51,6 +51,6 @@ DialogWanderer::~DialogWanderer()
|
|||
void DialogWanderer::validateCamera()
|
||||
{
|
||||
_wanderer->validateCamera();
|
||||
reject();
|
||||
accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,25 +50,28 @@ public:
|
|||
_renderer.getTerrainHeight = _getTerrainHeight;
|
||||
_renderer.applyLightingToSurface = _applyLightingToSurface;
|
||||
_renderer.maskLight = _maskLight;
|
||||
_renderer.camera_location.x = 0.0;
|
||||
_renderer.camera_location.y = 50.0;
|
||||
_renderer.camera_location.z = 0.0;
|
||||
|
||||
_lighting = lightingCreateDefinition();
|
||||
light.color.r = 0.7;
|
||||
light.color.g = 0.7;
|
||||
light.color.b = 0.7;
|
||||
light.color.r = 0.6;
|
||||
light.color.g = 0.6;
|
||||
light.color.b = 0.6;
|
||||
light.amplitude = 0.0;
|
||||
light.direction.x = -0.5;
|
||||
light.direction.y = -0.7071;
|
||||
light.direction.z = 0.5;
|
||||
light.filtered = 0;
|
||||
light.masked = 1;
|
||||
light.reflection = 0.0;
|
||||
light.reflection = 1.0;
|
||||
lightingAddLight(&_lighting, light);
|
||||
light.color.r = 0.3;
|
||||
light.color.g = 0.3;
|
||||
light.color.b = 0.3;
|
||||
light.amplitude = 0.0;
|
||||
light.direction.x = 0.5;
|
||||
light.direction.y = -0.7071;
|
||||
light.direction.y = 0.7071;
|
||||
light.direction.z = -0.5;
|
||||
light.filtered = 0;
|
||||
light.masked = 0;
|
||||
|
@ -81,7 +84,8 @@ public:
|
|||
texturesAddLayer(&_textures);
|
||||
texture = texturesGetLayer(&_textures, 0);
|
||||
texture->material.base = COLOR_WHITE;
|
||||
texture->material.reflection = 0.0;
|
||||
texture->material.reflection = 0.3;
|
||||
texture->material.shininess = 2.0;
|
||||
texture->bump_height = 0.0;
|
||||
texturesLayerValidateDefinition(texture);
|
||||
|
||||
|
|
|
@ -38,11 +38,15 @@ void InputCamera::revert()
|
|||
|
||||
void InputCamera::editCamera()
|
||||
{
|
||||
int result;
|
||||
|
||||
DialogWanderer* dialog = new DialogWanderer(_control, _value, true);
|
||||
dialog->exec();
|
||||
result = dialog->exec();
|
||||
|
||||
delete dialog;
|
||||
|
||||
// TODO Only if camera was edited
|
||||
applyValue();
|
||||
if (result == QDialog::Accepted)
|
||||
{
|
||||
applyValue();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,15 +174,18 @@ void MainWindow::quickPreview()
|
|||
void MainWindow::explore3D()
|
||||
{
|
||||
CameraDefinition camera;
|
||||
int result;
|
||||
|
||||
sceneryGetCamera(&camera);
|
||||
|
||||
DialogWanderer* dialog = new DialogWanderer(this, &camera, true);
|
||||
dialog->exec();
|
||||
result = dialog->exec();
|
||||
|
||||
scenerySetCamera(&camera);
|
||||
|
||||
delete dialog;
|
||||
|
||||
refreshAll();
|
||||
if (result == QDialog::Accepted)
|
||||
{
|
||||
scenerySetCamera(&camera);
|
||||
refreshAll();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ Maintenir Ctrl : Plus rapide</translation>
|
|||
<context>
|
||||
<name>FormTerrain</name>
|
||||
<message>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="139"/>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="143"/>
|
||||
<source>Height preview (normalized)</source>
|
||||
<translation>Aperçu de la hauteur (normalisée)</translation>
|
||||
</message>
|
||||
|
@ -463,22 +463,22 @@ Maintenir Ctrl : Plus rapide</translation>
|
|||
<translation type="obsolete">Aperçu du rendu (sans ombres)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="140"/>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="144"/>
|
||||
<source>Lighted preview (no texture)</source>
|
||||
<translation>Aperçu éclairé (sans texture)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="142"/>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="146"/>
|
||||
<source>Noise</source>
|
||||
<translation>Bruit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="143"/>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="147"/>
|
||||
<source>Height</source>
|
||||
<translation>Hauteur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="144"/>
|
||||
<location filename="../gui_qt/formterrain.cpp" line="148"/>
|
||||
<source>Scaling</source>
|
||||
<translation>Echelle</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in a new issue