From b288cc43a260cf26ea4ca46bcb410d5fa24a3e5f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 15 Aug 2013 15:29:05 -0700 Subject: [PATCH] fix disabling of delta sending and low res while moving --- interface/src/Menu.cpp | 18 ++++++++++++------ interface/src/Menu.h | 4 ++-- libraries/avatars/src/AvatarData.h | 3 +-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 0db6f3456a..2da9d81ee9 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -330,13 +330,19 @@ Menu::Menu() : appInstance->getAvatar(), SLOT(setWantColor(bool))); - addCheckableActionToQMenuAndActionHash(debugMenu, MenuOption::DisableLowRes, NULL, NULL); + addCheckableActionToQMenuAndActionHash(debugMenu, + MenuOption::LowRes, + 0, + true, + appInstance->getAvatar(), + SLOT(setWantLowResMoving(bool))); - // debugMenu->addAction("Disable Lower Resolution While Moving", this, SLOT(disableLowResMoving(bool)))->setCheckable(true); - - addCheckableActionToQMenuAndActionHash(debugMenu, MenuOption::DisableDeltaSending, NULL, NULL); - - // debugMenu->addAction("Disable Delta Sending", this, SLOT(disableDeltaSending(bool)))->setCheckable(true); + addCheckableActionToQMenuAndActionHash(debugMenu, + MenuOption::DeltaSending, + 0, + true, + appInstance->getAvatar(), + SLOT(setWantDelta(bool))); addCheckableActionToQMenuAndActionHash(debugMenu, MenuOption::DisableOcclusionCulling, Qt::SHIFT | Qt::Key_C); // (_occlusionCulling = debugMenu->addAction("Disable Occlusion Culling", this, SLOT(disableOcclusionCulling(bool)), diff --git a/interface/src/Menu.h b/interface/src/Menu.h index ae0e2edcbe..fa0655d4fa 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -120,8 +120,7 @@ namespace MenuOption { const QString DecreaseAvatarSize = "Decrease Avatar Size"; const QString DecreaseVoxelSize = "Decrease Voxel Size"; const QString DestructiveAddVoxel = "Create Voxel is Destructive"; - const QString DisableDeltaSending = "Disable Delta Sending"; - const QString DisableLowRes = "Disable Lower Resolution While Moving"; + const QString DeltaSending = "Delta Sending"; const QString DisableOcclusionCulling = "Disable Occlusion Culling"; const QString DisplayFrustum = "Display Frustum"; const QString EchoAudio = "Echo Audio"; @@ -154,6 +153,7 @@ namespace MenuOption { const QString Log = "Log"; const QString LookAtIndicator = "Look-at Indicator"; const QString LookAtVectors = "Look-at Vectors"; + const QString LowRes = "Lower Resolution While Moving"; const QString Mirror = "Mirror"; const QString Oscilloscope = "Audio Oscilloscope"; const QString Pair = "Pair"; diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 75c1a19146..0af4e86280 100755 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -116,8 +116,6 @@ public: bool getWantOcclusionCulling() const { return _wantOcclusionCulling; } uint16_t getLeaderID() const { return _leaderID; } - void setWantDelta(bool wantDelta) { _wantDelta = wantDelta; } - void setWantOcclusionCulling(bool wantOcclusionCulling) { _wantOcclusionCulling = wantOcclusionCulling; } void setHeadData(HeadData* headData) { _headData = headData; } @@ -127,6 +125,7 @@ public slots: void sendData(); void setWantLowResMoving(bool wantLowResMoving) { _wantLowResMoving = wantLowResMoving; } void setWantColor(bool wantColor) { _wantColor = wantColor; } + void setWantDelta(bool wantDelta) { _wantDelta = wantDelta; } protected: glm::vec3 _position;