Haze checkbox in UI doesn't disable the UI.

This commit is contained in:
Nissim Hadar 2017-09-22 18:20:35 -07:00
parent 5e1d470553
commit 736a6aa311
4 changed files with 14 additions and 1 deletions

View file

@ -171,6 +171,8 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
bool sunChanged = entity->keyLightPropertiesChanged(); bool sunChanged = entity->keyLightPropertiesChanged();
bool backgroundChanged = entity->backgroundPropertiesChanged(); bool backgroundChanged = entity->backgroundPropertiesChanged();
bool skyboxChanged = entity->skyboxPropertiesChanged(); bool skyboxChanged = entity->skyboxPropertiesChanged();
bool hazeChanged = entity->hazePropertiesChanged();
entity->resetRenderingPropertiesChanged(); entity->resetRenderingPropertiesChanged();
_lastPosition = entity->getPosition(); _lastPosition = entity->getPosition();
_lastRotation = entity->getRotation(); _lastRotation = entity->getRotation();
@ -179,7 +181,7 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
_keyLightProperties = entity->getKeyLightProperties(); _keyLightProperties = entity->getKeyLightProperties();
_stageProperties = entity->getStageProperties(); _stageProperties = entity->getStageProperties();
_skyboxProperties = entity->getSkyboxProperties(); _skyboxProperties = entity->getSkyboxProperties();
_hazeProperties = entity->getHazeProperties();
#if 0 #if 0
if (_lastShapeURL != _typedEntity->getCompoundShapeURL()) { if (_lastShapeURL != _typedEntity->getCompoundShapeURL()) {

View file

@ -93,6 +93,7 @@ private:
KeyLightPropertyGroup _keyLightProperties; KeyLightPropertyGroup _keyLightProperties;
StagePropertyGroup _stageProperties; StagePropertyGroup _stageProperties;
SkyboxPropertyGroup _skyboxProperties; SkyboxPropertyGroup _skyboxProperties;
HazePropertyGroup _hazeProperties;
// More attributes used for rendering: // More attributes used for rendering:
QString _ambientTextureURL; QString _ambientTextureURL;

View file

@ -27,6 +27,7 @@
AnimationPropertyGroup EntityItemProperties::_staticAnimation; AnimationPropertyGroup EntityItemProperties::_staticAnimation;
SkyboxPropertyGroup EntityItemProperties::_staticSkybox; SkyboxPropertyGroup EntityItemProperties::_staticSkybox;
HazePropertyGroup EntityItemProperties::_staticHaze;
StagePropertyGroup EntityItemProperties::_staticStage; StagePropertyGroup EntityItemProperties::_staticStage;
KeyLightPropertyGroup EntityItemProperties::_staticKeyLight; KeyLightPropertyGroup EntityItemProperties::_staticKeyLight;
@ -349,6 +350,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
changedProperties += _animation.getChangedProperties(); changedProperties += _animation.getChangedProperties();
changedProperties += _keyLight.getChangedProperties(); changedProperties += _keyLight.getChangedProperties();
changedProperties += _skybox.getChangedProperties(); changedProperties += _skybox.getChangedProperties();
changedProperties += _haze.getChangedProperties();
changedProperties += _stage.getChangedProperties(); changedProperties += _stage.getChangedProperties();
return changedProperties; return changedProperties;
@ -512,6 +514,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_BACKGROUND_MODE, backgroundMode, getBackgroundModeAsString()); COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_BACKGROUND_MODE, backgroundMode, getBackgroundModeAsString());
_stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties); _stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_haze.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_skybox.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties); _skybox.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
COPY_PROPERTY_TO_QSCRIPTVALUE(PROP_FLYING_ALLOWED, flyingAllowed); COPY_PROPERTY_TO_QSCRIPTVALUE(PROP_FLYING_ALLOWED, flyingAllowed);
@ -714,6 +717,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
_animation.copyFromScriptValue(object, _defaultSettings); _animation.copyFromScriptValue(object, _defaultSettings);
_keyLight.copyFromScriptValue(object, _defaultSettings); _keyLight.copyFromScriptValue(object, _defaultSettings);
_skybox.copyFromScriptValue(object, _defaultSettings); _skybox.copyFromScriptValue(object, _defaultSettings);
_haze.copyFromScriptValue(object, _defaultSettings);
_stage.copyFromScriptValue(object, _defaultSettings); _stage.copyFromScriptValue(object, _defaultSettings);
COPY_PROPERTY_FROM_QSCRIPTVALUE(xTextureURL, QString, setXTextureURL); COPY_PROPERTY_FROM_QSCRIPTVALUE(xTextureURL, QString, setXTextureURL);
@ -843,6 +847,7 @@ void EntityItemProperties::merge(const EntityItemProperties& other) {
_animation.merge(other._animation); _animation.merge(other._animation);
_keyLight.merge(other._keyLight); _keyLight.merge(other._keyLight);
_skybox.merge(other._skybox); _skybox.merge(other._skybox);
_haze.merge(other._haze);
_stage.merge(other._stage); _stage.merge(other._stage);
COPY_PROPERTY_IF_CHANGED(xTextureURL); COPY_PROPERTY_IF_CHANGED(xTextureURL);
@ -1312,6 +1317,9 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
APPEND_ENTITY_PROPERTY(PROP_FLYING_ALLOWED, properties.getFlyingAllowed()); APPEND_ENTITY_PROPERTY(PROP_FLYING_ALLOWED, properties.getFlyingAllowed());
APPEND_ENTITY_PROPERTY(PROP_GHOSTING_ALLOWED, properties.getGhostingAllowed()); APPEND_ENTITY_PROPERTY(PROP_GHOSTING_ALLOWED, properties.getGhostingAllowed());
APPEND_ENTITY_PROPERTY(PROP_FILTER_URL, properties.getFilterURL()); APPEND_ENTITY_PROPERTY(PROP_FILTER_URL, properties.getFilterURL());
_staticHaze.setProperties(properties);
_staticHaze.appendToEditPacket(packetData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState);
} }
if (properties.getType() == EntityTypes::PolyVox) { if (properties.getType() == EntityTypes::PolyVox) {
@ -1769,6 +1777,7 @@ void EntityItemProperties::markAllChanged() {
_animation.markAllChanged(); _animation.markAllChanged();
_skybox.markAllChanged(); _skybox.markAllChanged();
_haze.markAllChanged();
_stage.markAllChanged(); _stage.markAllChanged();
_sourceUrlChanged = true; _sourceUrlChanged = true;

View file

@ -88,6 +88,7 @@ public:
bool backgroundPropertiesChanged() const { return _backgroundPropertiesChanged; } bool backgroundPropertiesChanged() const { return _backgroundPropertiesChanged; }
bool stagePropertiesChanged() const { return _stagePropertiesChanged; } bool stagePropertiesChanged() const { return _stagePropertiesChanged; }
bool skyboxPropertiesChanged() const { return _skyboxPropertiesChanged; } bool skyboxPropertiesChanged() const { return _skyboxPropertiesChanged; }
bool hazePropertiesChanged() const { return _hazePropertiesChanged; }
void resetRenderingPropertiesChanged(); void resetRenderingPropertiesChanged();