Merge branch 'master' of https://github.com/supertuxkart/stk-code into save_gp

This commit is contained in:
konstin 2014-07-22 21:16:00 +02:00
commit 3da38823a7
4 changed files with 57 additions and 44 deletions

View File

@ -70,27 +70,11 @@
</div>
</div>
<spacer height="20" width="10" />
<div layout="horizontal-row" width="100%" proportion="1">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="motionblur"/>
<spacer width="10" height="10"/>
<label text="Motion blur" I18N="Video settings"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="texture_compression"/>
<spacer width="10" height="10"/>
<label text="Texture compression" I18N="Video settings"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" proportion="1">
<spacer width="70" height="10"/>
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="glow"/>
<spacer width="10" height="10"/>
@ -105,7 +89,27 @@
<label text="Anti-aliasing" I18N="Video settings"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" proportion="1">
<spacer width="70" height="10"/>
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="motionblur"/>
<spacer width="10" height="10"/>
<label text="Motion blur" I18N="Video settings"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="dof"/>
<spacer width="10" height="10"/>
<label text="Depth of field" I18N="Video settings"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" proportion="1">
@ -136,9 +140,9 @@
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="dof"/>
<checkbox id="texture_compression"/>
<spacer width="10" height="10"/>
<label text="Depth of field" I18N="Video settings"/>
<label text="Texture compression" I18N="Video settings"/>
</div>
</div>

View File

@ -3,6 +3,7 @@ uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 InverseViewMatrix;
uniform mat4 InverseProjectionMatrix;
uniform vec2 screen;
#else
layout (std140) uniform MatrixesData
{

View File

@ -26,6 +26,7 @@
#include "utils/log.hpp"
#include <IGUIEnvironment.h>
#include <IGUIButton.h>
using namespace irr;
using namespace core;
@ -134,6 +135,8 @@ void ModalDialog::doInit()
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow(m_area,
true /* modal */);
m_irrlicht_window->setDrawTitlebar(false);
m_irrlicht_window->getCloseButton()->setVisible(false);
GUIEngine::getSkin()->m_dialog = true;
GUIEngine::getSkin()->m_dialog_size = 0.0f;

View File

@ -102,29 +102,19 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
{
if (eventSource == "close")
{
bool dynamic_light = getWidget<CheckBoxWidget>("dynamiclight")->getState();
UserConfigParams::m_dynamic_lights = dynamic_light;
bool advanced_pipeline = getWidget<CheckBoxWidget>("dynamiclight")->getState();
UserConfigParams::m_dynamic_lights = advanced_pipeline;
UserConfigParams::m_graphical_effects =
getWidget<CheckBoxWidget>("anim_gfx")->getState();
UserConfigParams::m_weather_effects =
getWidget<CheckBoxWidget>("weather_gfx")->getState();
UserConfigParams::m_ubo_disabled =
!getWidget<CheckBoxWidget>("ubo")->getState();
UserConfigParams::m_dof =
getWidget<CheckBoxWidget>("dof")->getState();
UserConfigParams::m_high_definition_textures =
getWidget<CheckBoxWidget>("hd-textures")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("dof")->getState();
UserConfigParams::m_motionblur =
getWidget<CheckBoxWidget>("motionblur")->getState();
UserConfigParams::m_show_steering_animations =
getWidget<SpinnerWidget>("steering_animations")->getValue();
if (dynamic_light)
advanced_pipeline && getWidget<CheckBoxWidget>("motionblur")->getState();
if (advanced_pipeline)
{
UserConfigParams::m_shadows =
getWidget<SpinnerWidget>("shadows")->getValue();
advanced_pipeline && getWidget<SpinnerWidget>("shadows")->getValue();
}
else
{
@ -132,26 +122,41 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
}
UserConfigParams::m_mlaa =
getWidget<CheckBoxWidget>("mlaa")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("mlaa")->getState();
UserConfigParams::m_ssao =
getWidget<CheckBoxWidget>("ssao")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("ssao")->getState();
UserConfigParams::m_light_shaft =
getWidget<CheckBoxWidget>("lightshaft")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("lightshaft")->getState();
UserConfigParams::m_gi =
getWidget<CheckBoxWidget>("global_illumination")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("global_illumination")->getState();
UserConfigParams::m_glow =
getWidget<CheckBoxWidget>("glow")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("glow")->getState();
UserConfigParams::m_bloom =
getWidget<CheckBoxWidget>("bloom")->getState();
advanced_pipeline && getWidget<CheckBoxWidget>("bloom")->getState();
UserConfigParams::m_texture_compression =
getWidget<CheckBoxWidget>("texture_compression")->getState();
UserConfigParams::m_graphical_effects =
getWidget<CheckBoxWidget>("anim_gfx")->getState();
UserConfigParams::m_weather_effects =
getWidget<CheckBoxWidget>("weather_gfx")->getState();
UserConfigParams::m_ubo_disabled =
!getWidget<CheckBoxWidget>("ubo")->getState();
UserConfigParams::m_high_definition_textures =
getWidget<CheckBoxWidget>("hd-textures")->getState();
UserConfigParams::m_show_steering_animations =
getWidget<SpinnerWidget>("steering_animations")->getValue();
switch (getWidget<SpinnerWidget>("filtering")->getValue())
{
case 0: