merge
commit
ef58be0f74
|
|
@ -2541,51 +2541,21 @@ void LLMaturityPreferencesResponder::error(U32 pStatus, const std::string& pReas
|
|||
|
||||
U8 LLMaturityPreferencesResponder::parseMaturityFromServerResponse(const LLSD &pContent)
|
||||
{
|
||||
// stinson 05/24/2012 Pathfinding regions have re-defined the response behavior. In the old server code,
|
||||
// if you attempted to change the preferred maturity to the same value, the response content would be an
|
||||
// undefined LLSD block. In the new server code with pathfinding, the response content should always be
|
||||
// defined. Thus, the check for isUndefined() can be replaced with an assert after pathfinding is merged
|
||||
// into server trunk and fully deployed.
|
||||
U8 maturity = SIM_ACCESS_MIN;
|
||||
if (pContent.isUndefined())
|
||||
|
||||
llassert(!pContent.isUndefined());
|
||||
llassert(pContent.isMap());
|
||||
llassert(pContent.has("access_prefs"));
|
||||
llassert(pContent.get("access_prefs").isMap());
|
||||
llassert(pContent.get("access_prefs").has("max"));
|
||||
llassert(pContent.get("access_prefs").get("max").isString());
|
||||
if (!pContent.isUndefined() && pContent.isMap() && pContent.has("access_prefs")
|
||||
&& pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max")
|
||||
&& pContent.get("access_prefs").get("max").isString())
|
||||
{
|
||||
maturity = mPreferredMaturity;
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(!pContent.isUndefined());
|
||||
llassert(pContent.isMap());
|
||||
|
||||
if (!pContent.isUndefined() && pContent.isMap())
|
||||
{
|
||||
// stinson 05/24/2012 Pathfinding regions have re-defined the response syntax. The if statement catches
|
||||
// the new syntax, and the else statement catches the old syntax. After pathfinding is merged into
|
||||
// server trunk and fully deployed, we can remove the else statement.
|
||||
if (pContent.has("access_prefs"))
|
||||
{
|
||||
llassert(pContent.has("access_prefs"));
|
||||
llassert(pContent.get("access_prefs").isMap());
|
||||
llassert(pContent.get("access_prefs").has("max"));
|
||||
llassert(pContent.get("access_prefs").get("max").isString());
|
||||
if (pContent.get("access_prefs").isMap() && pContent.get("access_prefs").has("max") &&
|
||||
pContent.get("access_prefs").get("max").isString())
|
||||
{
|
||||
LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString();
|
||||
LLStringUtil::trim(actualPreference);
|
||||
maturity = LLViewerRegion::shortStringToAccess(actualPreference);
|
||||
}
|
||||
}
|
||||
else if (pContent.has("max"))
|
||||
{
|
||||
llassert(pContent.get("max").isString());
|
||||
if (pContent.get("max").isString())
|
||||
{
|
||||
LLSD::String actualPreference = pContent.get("max").asString();
|
||||
LLStringUtil::trim(actualPreference);
|
||||
maturity = LLViewerRegion::shortStringToAccess(actualPreference);
|
||||
}
|
||||
}
|
||||
}
|
||||
LLSD::String actualPreference = pContent.get("access_prefs").get("max").asString();
|
||||
LLStringUtil::trim(actualPreference);
|
||||
maturity = LLViewerRegion::shortStringToAccess(actualPreference);
|
||||
}
|
||||
|
||||
return maturity;
|
||||
|
|
|
|||
|
|
@ -191,7 +191,8 @@ LLConversationLog::LLConversationLog()
|
|||
if (ctrl)
|
||||
{
|
||||
ctrl->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
|
||||
if (ctrl->getValue().asBoolean())
|
||||
if (ctrl->getValue().asBoolean()
|
||||
&& gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
|
||||
{
|
||||
enableLogging(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||
return ;
|
||||
}
|
||||
|
||||
// stinson 11/12/2012: Need to check with davep on the following.
|
||||
// Fix for MAINT-1894
|
||||
// Skipping the flexible update if render res is negative. If we were to continue with a negative value,
|
||||
// the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of
|
||||
// render sections which will then create a length exception in the std::vector::resize() method.
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ BOOL LLFloaterConversationLog::postBuild()
|
|||
if (ctrl)
|
||||
{
|
||||
ctrl->getSignal()->connect(boost::bind(&LLFloaterConversationLog::onCallLoggingEnabledDisabled, this, _2));
|
||||
onCallLoggingEnabledDisabled(ctrl->getValue().asBoolean());
|
||||
onCallLoggingEnabledDisabled(ctrl->getValue().asBoolean()
|
||||
&& gSavedSettings.getBOOL("KeepConversationLogTranscripts"));
|
||||
}
|
||||
|
||||
return LLFloater::postBuild();
|
||||
|
|
|
|||
|
|
@ -83,6 +83,9 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
|
|||
setOverlapsScreenChannel(true);
|
||||
|
||||
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
|
||||
mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&LLFloaterIMSession::enableGearMenuItem, this, _2));
|
||||
mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&LLFloaterIMSession::GearDoToSelected, this, _2));
|
||||
mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&LLFloaterIMSession::checkGearMenuItem, this, _2));
|
||||
|
||||
setDocked(true);
|
||||
}
|
||||
|
|
@ -190,6 +193,36 @@ void LLFloaterIMSession::onSendMsg( LLUICtrl* ctrl, void* userdata )
|
|||
self->setTyping(false);
|
||||
}
|
||||
|
||||
bool LLFloaterIMSession::enableGearMenuItem(const LLSD& userdata)
|
||||
{
|
||||
std::string command = userdata.asString();
|
||||
uuid_vec_t selected_uuids;
|
||||
selected_uuids.push_back(mOtherParticipantUUID);
|
||||
|
||||
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
|
||||
return floater_container->enableContextMenuItem(command, selected_uuids);
|
||||
}
|
||||
|
||||
void LLFloaterIMSession::GearDoToSelected(const LLSD& userdata)
|
||||
{
|
||||
std::string command = userdata.asString();
|
||||
uuid_vec_t selected_uuids;
|
||||
selected_uuids.push_back(mOtherParticipantUUID);
|
||||
|
||||
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
|
||||
floater_container->doToParticipants(command, selected_uuids);
|
||||
}
|
||||
|
||||
bool LLFloaterIMSession::checkGearMenuItem(const LLSD& userdata)
|
||||
{
|
||||
std::string command = userdata.asString();
|
||||
uuid_vec_t selected_uuids;
|
||||
selected_uuids.push_back(mOtherParticipantUUID);
|
||||
|
||||
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
|
||||
return floater_container->checkContextMenuItem(command, selected_uuids);
|
||||
}
|
||||
|
||||
void LLFloaterIMSession::sendMsgFromInputEditor()
|
||||
{
|
||||
if (gAgent.isGodlike()
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ public:
|
|||
void setPositioned(bool b) { mPositioned = b; };
|
||||
|
||||
void onVisibilityChange(const LLSD& new_visibility);
|
||||
bool enableGearMenuItem(const LLSD& userdata);
|
||||
void GearDoToSelected(const LLSD& userdata);
|
||||
bool checkGearMenuItem(const LLSD& userdata);
|
||||
|
||||
// Implements LLVoiceClientStatusObserver::onChange() to enable the call
|
||||
// button when voice is available
|
||||
|
|
|
|||
|
|
@ -198,6 +198,8 @@ BOOL LLFloaterIMSessionTab::postBuild()
|
|||
mTearOffBtn = getChild<LLButton>("tear_off_btn");
|
||||
mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this));
|
||||
|
||||
mGearBtn = getChild<LLButton>("gear_btn");
|
||||
|
||||
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
|
||||
|
||||
// Add a scroller for the folder (participant) view
|
||||
|
|
@ -241,11 +243,11 @@ BOOL LLFloaterIMSessionTab::postBuild()
|
|||
// Now ready to build the conversation and participants list
|
||||
buildConversationViewParticipant();
|
||||
refreshConversation();
|
||||
|
||||
|
||||
// Zero expiry time is set only once to allow initial update.
|
||||
mRefreshTimer->setTimerExpirySec(0);
|
||||
mRefreshTimer->start();
|
||||
|
||||
initBtns();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -771,6 +773,53 @@ void LLFloaterIMSessionTab::onTearOffClicked()
|
|||
forceReshape();
|
||||
}
|
||||
refreshConversation();
|
||||
updateGearBtn();
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::updateGearBtn()
|
||||
{
|
||||
|
||||
BOOL prevVisibility = mGearBtn->getVisible();
|
||||
mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat);
|
||||
|
||||
|
||||
// Move buttons if Gear button changed visibility
|
||||
if(prevVisibility != mGearBtn->getVisible())
|
||||
{
|
||||
LLRect gear_btn_rect = mGearBtn->getRect();
|
||||
LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
|
||||
LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
|
||||
S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
|
||||
S32 right_shift = gear_btn_rect.getWidth() + gap_width;
|
||||
if(mGearBtn->getVisible())
|
||||
{
|
||||
// Move buttons to the right to give space for Gear button
|
||||
add_btn_rect.translate(right_shift,0);
|
||||
call_btn_rect.translate(right_shift,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
add_btn_rect.translate(-right_shift,0);
|
||||
call_btn_rect.translate(-right_shift,0);
|
||||
}
|
||||
getChild<LLButton>("add_btn")->setRect(add_btn_rect);
|
||||
getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::initBtns()
|
||||
{
|
||||
LLRect gear_btn_rect = mGearBtn->getRect();
|
||||
LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
|
||||
LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
|
||||
S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
|
||||
S32 right_shift = gear_btn_rect.getWidth() + gap_width;
|
||||
|
||||
add_btn_rect.translate(-right_shift,0);
|
||||
call_btn_rect.translate(-right_shift,0);
|
||||
|
||||
getChild<LLButton>("add_btn")->setRect(add_btn_rect);
|
||||
getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ public:
|
|||
|
||||
void setSortOrder(const LLConversationSort& order);
|
||||
virtual void onTearOffClicked();
|
||||
|
||||
void updateGearBtn();
|
||||
void initBtns();
|
||||
virtual void updateMessages() {}
|
||||
LLConversationItem* getCurSelectedViewModelItem();
|
||||
|
||||
|
|
@ -159,6 +160,8 @@ protected:
|
|||
LLButton* mExpandCollapseBtn;
|
||||
LLButton* mTearOffBtn;
|
||||
LLButton* mCloseBtn;
|
||||
LLButton* mGearBtn;
|
||||
|
||||
|
||||
private:
|
||||
// Handling selection and contextual menu
|
||||
|
|
|
|||
|
|
@ -232,11 +232,9 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)
|
|||
case LL_HUD_EFFECT_LOOKAT:
|
||||
hud_objectp = new LLHUDEffectLookAt(type);
|
||||
break;
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
case LL_HUD_EFFECT_VOICE_VISUALIZER:
|
||||
hud_objectp = new LLVoiceVisualizer(type);
|
||||
break;
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
case LL_HUD_EFFECT_POINTAT:
|
||||
hud_objectp = new LLHUDEffectPointAt(type);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
#include "lldrawpool.h" // TODO: eliminate, unused below
|
||||
#include <list>
|
||||
|
||||
#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
|
||||
|
||||
class LLViewerCamera;
|
||||
class LLFontGL;
|
||||
class LLFace;
|
||||
|
|
@ -96,9 +94,7 @@ public:
|
|||
LL_HUD_EFFECT_EDIT,
|
||||
LL_HUD_EFFECT_LOOKAT,
|
||||
LL_HUD_EFFECT_POINTAT,
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
LL_HUD_EFFECT_VOICE_VISUALIZER, // Ventrella
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
LL_HUD_NAME_TAG,
|
||||
LL_HUD_EFFECT_BLOB
|
||||
};
|
||||
|
|
|
|||
|
|
@ -857,7 +857,8 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
|
|||
|
||||
bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
|
||||
{
|
||||
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
|
||||
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")
|
||||
&& gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
|
||||
{
|
||||
std::string from_name = from;
|
||||
|
||||
|
|
@ -2477,8 +2478,8 @@ void LLIMMgr::addMessage(
|
|||
new_session_id = computeSessionID(dialog, other_participant_id);
|
||||
}
|
||||
|
||||
// Open conversation log if offline messages are present
|
||||
if (is_offline_msg)
|
||||
// Open conversation log if offline messages are present and user allows a Call Log
|
||||
if (is_offline_msg && gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
|
||||
{
|
||||
LLFloaterConversationLog* floater_log =
|
||||
LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation");
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
|
||||
#include "llvoavatar.h"
|
||||
|
||||
#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
@ -711,13 +709,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
//VTResume(); // VTune
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
|
||||
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
|
||||
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
mVoiceVisualizer = new LLVoiceVisualizer();
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl;
|
||||
|
||||
|
|
@ -893,11 +887,7 @@ void LLVOAvatar::markDead()
|
|||
mNameText = NULL;
|
||||
sNumVisibleChatBubbles--;
|
||||
}
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
mVoiceVisualizer->markDead();
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
mVoiceVisualizer->setStopSpeaking();
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
|
||||
LLViewerObject::markDead();
|
||||
}
|
||||
|
|
@ -1429,9 +1419,7 @@ void LLVOAvatar::initInstance(void)
|
|||
|
||||
//VTPause(); // VTune
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) );
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2529,7 +2517,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
|||
|
||||
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
||||
{
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
bool render_visualizer = voice_enabled;
|
||||
|
||||
// Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
|
||||
|
|
@ -2542,7 +2529,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
|||
}
|
||||
|
||||
mVoiceVisualizer->setVoiceEnabled(render_visualizer);
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
if ( voice_enabled )
|
||||
{
|
||||
|
|
@ -2618,7 +2604,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//--------------------------------------------------------------------------------------------
|
||||
// here we get the approximate head position and set as sound source for the voice symbol
|
||||
// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
|
||||
|
|
@ -2636,7 +2621,6 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
|||
tagPos[VZ] += ( mBodySize[VZ] + 0.125f );
|
||||
mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
|
||||
}
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
}//if ( voiceEnabled )
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -541,6 +541,7 @@ void LLVoiceClient::setMuteMic(bool muted)
|
|||
{
|
||||
mMuteMic = muted;
|
||||
updateMicMuteLogic();
|
||||
mMicroChangedSignal();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
//29de489d-0491-fb00-7dab-f9e686d31e83
|
||||
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//--------------------------------------------------------------------------------------
|
||||
// sound symbol constants
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -61,7 +60,6 @@ const F32 BASE_BRIGHTNESS = 0.7f; // gray level of the voice indicator when qu
|
|||
const F32 DOT_SIZE = 0.05f; // size of the dot billboard texture
|
||||
const F32 DOT_OPACITY = 0.7f; // how opaque the dot is
|
||||
const F32 WAVE_MOTION_RATE = 1.5f; // scalar applied to consecutive waves as a function of speaking amplitude
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// gesticulation constants
|
||||
|
|
@ -69,13 +67,11 @@ const F32 WAVE_MOTION_RATE = 1.5f; // scalar applied to consecutive waves as a
|
|||
const F32 DEFAULT_MINIMUM_GESTICULATION_AMPLITUDE = 0.2f;
|
||||
const F32 DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE = 1.0f;
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//--------------------------------------------------------------------------------------
|
||||
// other constants
|
||||
//--------------------------------------------------------------------------------------
|
||||
const F32 ONE_HALF = 1.0f; // to clarify intent and reduce magic numbers in the code.
|
||||
const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is up in SL
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Initialize the statics
|
||||
|
|
@ -98,28 +94,12 @@ F32 LLVoiceVisualizer::sAahPowerTransfersf = 0.0f;
|
|||
//-----------------------------------------------
|
||||
// constructor
|
||||
//-----------------------------------------------
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
|
||||
: LLHUDEffect(type)
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
LLVoiceVisualizer::LLVoiceVisualizer()
|
||||
: LLRefCount(),
|
||||
mTimer(),
|
||||
mStartTime(0.0),
|
||||
mCurrentlySpeaking(false),
|
||||
mSpeakingAmplitude(0.0f),
|
||||
mMaxGesticulationAmplitude(DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE),
|
||||
mMinGesticulationAmplitude(DEFAULT_MINIMUM_GESTICULATION_AMPLITUDE)
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
{
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
mCurrentTime = mTimer.getTotalSeconds();
|
||||
mPreviousTime = mCurrentTime;
|
||||
mStartTime = mCurrentTime;
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
mStartTime = mTimer.getTotalSeconds();
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
mVoiceSourceWorldPosition = LLVector3( 0.0f, 0.0f, 0.0f );
|
||||
mSpeakingAmplitude = 0.0f;
|
||||
mCurrentlySpeaking = false;
|
||||
|
|
@ -128,11 +108,9 @@ LLVoiceVisualizer::LLVoiceVisualizer()
|
|||
mMaxGesticulationAmplitude = DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE;
|
||||
mSoundSymbol.mActive = true;
|
||||
mSoundSymbol.mPosition = LLVector3( 0.0f, 0.0f, 0.0f );
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
mTimer.reset();
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
const char* sound_level_img[] =
|
||||
{
|
||||
"voice_meter_dot.j2c",
|
||||
|
|
@ -154,7 +132,6 @@ LLVoiceVisualizer::LLVoiceVisualizer()
|
|||
}
|
||||
|
||||
mSoundSymbol.mTexture[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
// The first instance loads the initial state from prefs.
|
||||
if (!sPrefsInitialized)
|
||||
|
|
@ -174,7 +151,6 @@ LLVoiceVisualizer::LLVoiceVisualizer()
|
|||
|
||||
}//---------------------------------------------------
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//---------------------------------------------------
|
||||
void LLVoiceVisualizer::setMinGesticulationAmplitude( F32 m )
|
||||
{
|
||||
|
|
@ -195,16 +171,13 @@ void LLVoiceVisualizer::setVoiceEnabled( bool v )
|
|||
mVoiceEnabled = v;
|
||||
|
||||
}//---------------------------------------------------
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//---------------------------------------------------
|
||||
void LLVoiceVisualizer::setStartSpeaking()
|
||||
{
|
||||
mStartTime = mTimer.getTotalSeconds();
|
||||
mCurrentlySpeaking = true;
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
mSoundSymbol.mActive = true;
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
}//---------------------------------------------------
|
||||
|
||||
|
|
@ -359,7 +332,6 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
|
|||
}//---------------------------------------------------
|
||||
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//---------------------------------------------------
|
||||
// this method is inherited from HUD Effect
|
||||
//---------------------------------------------------
|
||||
|
|
@ -558,7 +530,6 @@ void LLVoiceVisualizer::setVoiceSourceWorldPosition( const LLVector3 &p )
|
|||
mVoiceSourceWorldPosition = p;
|
||||
|
||||
}//---------------------------------------------------
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//---------------------------------------------------
|
||||
VoiceGesticulationLevel LLVoiceVisualizer::getCurrentGesticulationLevel()
|
||||
|
|
@ -589,7 +560,6 @@ LLVoiceVisualizer::~LLVoiceVisualizer()
|
|||
}//----------------------------------------------
|
||||
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
//---------------------------------------------------
|
||||
// "packData" is inherited from HUDEffect
|
||||
//---------------------------------------------------
|
||||
|
|
@ -639,5 +609,3 @@ void LLVoiceVisualizer::markDead()
|
|||
|
||||
LLHUDEffect::markDead();
|
||||
}//------------------------------------------------------------------
|
||||
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
|
|
|||
|
|
@ -42,12 +42,7 @@
|
|||
#ifndef LL_VOICE_VISUALIZER_H
|
||||
#define LL_VOICE_VISUALIZER_H
|
||||
|
||||
#define XXX_STINSON_CHUI_REWORK // temporarily re-enabling the in-world voice-dot
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
#include "llhudeffect.h"
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
#include "llpointer.h"
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
// The values of voice gesticulation represent energy levels for avatar animation, based on
|
||||
|
|
@ -65,45 +60,30 @@ enum VoiceGesticulationLevel
|
|||
NUM_VOICE_GESTICULATION_LEVELS
|
||||
};
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
const static int NUM_VOICE_SYMBOL_WAVES = 7;
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//----------------------------------------------------
|
||||
// LLVoiceVisualizer class
|
||||
//----------------------------------------------------
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
class LLVoiceVisualizer : public LLHUDEffect
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
class LLVoiceVisualizer : public LLRefCount
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
{
|
||||
//---------------------------------------------------
|
||||
// public methods
|
||||
//---------------------------------------------------
|
||||
public:
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
LLVoiceVisualizer( const U8 type ); //constructor
|
||||
#else // XXX_STINSON_CHUI_REWORK
|
||||
LLVoiceVisualizer(); //constructor
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
~LLVoiceVisualizer(); //destructor
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
void setVoiceSourceWorldPosition( const LLVector3 &p ); // this should be the position of the speaking avatar's head
|
||||
void setMinGesticulationAmplitude( F32 ); // the lower range of meaningful amplitude for setting gesticulation level
|
||||
void setMaxGesticulationAmplitude( F32 ); // the upper range of meaningful amplitude for setting gesticulation level
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
void setStartSpeaking(); // tell me when the av starts speaking
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
void setVoiceEnabled( bool ); // tell me whether or not the user is voice enabled
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
void setSpeakingAmplitude( F32 ); // tell me how loud the av is speaking (ranges from 0 to 1)
|
||||
void setStopSpeaking(); // tell me when the av stops speaking
|
||||
bool getCurrentlySpeaking(); // the get for the above set
|
||||
VoiceGesticulationLevel getCurrentGesticulationLevel(); // based on voice amplitude, I'll give you the current "energy level" of avatar speech
|
||||
void lipSyncOohAah( F32& ooh, F32& aah );
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
void render(); // inherited from HUD Effect
|
||||
void packData(LLMessageSystem *mesgsys); // inherited from HUD Effect
|
||||
void unpackData(LLMessageSystem *mesgsys, S32 blocknum); // inherited from HUD Effect
|
||||
|
|
@ -119,7 +99,6 @@ class LLVoiceVisualizer : public LLRefCount
|
|||
//----------------------------------------------------------------------------------------------
|
||||
void setMaxGesticulationAmplitude();
|
||||
void setMinGesticulationAmplitude();
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
//---------------------------------------------------
|
||||
// private members
|
||||
|
|
@ -129,7 +108,6 @@ class LLVoiceVisualizer : public LLRefCount
|
|||
static void setPreferences( );
|
||||
static void lipStringToF32s ( std::string& in_string, F32*& out_F32s, U32& count_F32s ); // convert a string of digits to an array of floats
|
||||
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
struct SoundSymbol
|
||||
{
|
||||
F32 mWaveExpansion [ NUM_VOICE_SYMBOL_WAVES ];
|
||||
|
|
@ -140,20 +118,15 @@ class LLVoiceVisualizer : public LLRefCount
|
|||
bool mActive;
|
||||
LLVector3 mPosition;
|
||||
};
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
|
||||
LLFrameTimer mTimer; // so I can ask the current time in seconds
|
||||
F64 mStartTime; // time in seconds when speaking started
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
F64 mCurrentTime; // current time in seconds, captured every step
|
||||
F64 mPreviousTime; // copy of "current time" from last frame
|
||||
SoundSymbol mSoundSymbol; // the sound symbol that appears over the avatar's head
|
||||
bool mVoiceEnabled; // if off, no rendering should happen
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
bool mCurrentlySpeaking; // is the user currently speaking?
|
||||
#ifdef XXX_STINSON_CHUI_REWORK
|
||||
LLVector3 mVoiceSourceWorldPosition; // give this to me every step - I need it to update the sound symbol
|
||||
#endif // XXX_STINSON_CHUI_REWORK
|
||||
F32 mSpeakingAmplitude; // this should be set as often as possible when the user is speaking
|
||||
F32 mMaxGesticulationAmplitude; // this is the upper-limit of the envelope of detectable gesticulation leves
|
||||
F32 mMinGesticulationAmplitude; // this is the lower-limit of the envelope of detectable gesticulation leves
|
||||
|
|
|
|||
|
|
@ -79,6 +79,21 @@
|
|||
tool_tip="View/sort options"
|
||||
top="5"
|
||||
width="31" />
|
||||
<menu_button
|
||||
menu_filename="menu_im_conversation.xml"
|
||||
follows="top|left"
|
||||
height="25"
|
||||
image_hover_unselected="Toolbar_Middle_Over"
|
||||
image_overlay="OptionsMenu_Off"
|
||||
image_selected="Toolbar_Middle_Selected"
|
||||
image_unselected="Toolbar_Middle_Off"
|
||||
layout="topleft"
|
||||
top="5"
|
||||
left_pad="4"
|
||||
name="gear_btn"
|
||||
visible="false"
|
||||
tool_tip="Actions on selected person"
|
||||
width="31"/>
|
||||
<button
|
||||
enabled="false"
|
||||
follows="top|left"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<toggleable_menu
|
||||
layout="topleft"
|
||||
name="Conversation Gear Menu">
|
||||
<menu_item_call
|
||||
label="View Profile"
|
||||
layout="topleft"
|
||||
name="View Profile">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="view_profile" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_view_profile" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Add Friend"
|
||||
layout="topleft"
|
||||
name="Add Friend">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="add_friend" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_add" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Remove friend"
|
||||
layout="topleft"
|
||||
name="remove_friend">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="remove_friend" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_delete" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Offer teleport"
|
||||
layout="topleft"
|
||||
name="offer_teleport">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="offer_teleport"/>
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_offer_teleport"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Invite to group..."
|
||||
layout="topleft"
|
||||
name="invite_to_group">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="invite_to_group" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_invite" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"
|
||||
name="View Icons Separator" />
|
||||
<menu_item_call
|
||||
label="Chat history..."
|
||||
layout="topleft"
|
||||
name="chat_history">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="chat_history"/>
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_chat_history"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"/>
|
||||
<menu_item_call
|
||||
label="Map"
|
||||
layout="topleft"
|
||||
name="map">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="map" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_show_on_map" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Share"
|
||||
layout="topleft"
|
||||
name="Share">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="share" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_share" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Pay"
|
||||
layout="topleft"
|
||||
name="Pay">
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="pay" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_pay" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"/>
|
||||
<menu_item_check
|
||||
label="Block Voice"
|
||||
layout="topleft"
|
||||
name="Block/Unblock">
|
||||
<on_check function="Avatar.CheckGearItem" parameter="is_blocked" />
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="block_unblock" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_block" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Block Text"
|
||||
layout="topleft"
|
||||
name="MuteText">
|
||||
<on_check function="Avatar.CheckGearItem" parameter="is_muted" />
|
||||
<on_click function="Avatar.GearDoToSelected" parameter="mute_unmute" />
|
||||
<on_enable function="Avatar.EnableGearItem" parameter="can_block" />
|
||||
</menu_item_check>
|
||||
<menu_item_separator
|
||||
layout="topleft"/>
|
||||
</toggleable_menu>
|
||||
|
||||
|
|
@ -1267,7 +1267,58 @@
|
|||
function="Floater.Show"
|
||||
parameter="hud" />
|
||||
</menu_item_call>-->
|
||||
|
||||
<menu_item_separator/>
|
||||
|
||||
<menu_item_call
|
||||
label="User’s guide"
|
||||
name="User’s guide">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Knowledge Base"
|
||||
name="Knowledge Base">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://community.secondlife.com/t5/tkb/communitypage"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Wiki"
|
||||
name="Wiki">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://wiki.secondlife.com"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Community Forums"
|
||||
name="Community Forums">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://community.secondlife.com/t5/Forums/ct-p/Forums"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Support portal"
|
||||
name="Support portal">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="https://support.secondlife.com/"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call
|
||||
label="[SECOND_LIFE] News"
|
||||
name="Second Life News">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://community.secondlife.com/t5/Featured-News/bg-p/blog_feature_news"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="[SECOND_LIFE] Blogs"
|
||||
name="Second Life Blogs">
|
||||
<menu_item_call.on_click
|
||||
function="Advanced.WebBrowserTest"
|
||||
parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
|
||||
<menu_item_call
|
||||
|
|
|
|||
Loading…
Reference in New Issue