本文整理汇总了C++中LLPluginMessage::getValueBoolean方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPluginMessage::getValueBoolean方法的具体用法?C++ LLPluginMessage::getValueBoolean怎么用?C++ LLPluginMessage::getValueBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPluginMessage
的用法示例。
在下文中一共展示了LLPluginMessage::getValueBoolean方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: authResponse
void MediaPluginCEF::authResponse(LLPluginMessage &message)
{
mAuthOK = message.getValueBoolean("ok");
if (mAuthOK)
{
mAuthUsername = message.getValue("username");
mAuthPassword = message.getValue("password");
}
}
示例2: receivePluginMessage
/* virtual */
void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
{
std::string message_class = message.getClass();
if (message_class == LLPLUGIN_MESSAGE_CLASS_BASIC)
{
LLPluginClassBasic::receivePluginMessage(message);
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
std::string message_name = message.getName();
if(message_name == "texture_params")
{
mRequestedTextureDepth = message.getValueS32("depth");
mRequestedTextureInternalFormat = message.getValueU32("internalformat");
mRequestedTextureFormat = message.getValueU32("format");
mRequestedTextureType = message.getValueU32("type");
mRequestedTextureSwapBytes = message.getValueBoolean("swap_bytes");
mRequestedTextureCoordsOpenGL = message.getValueBoolean("coords_opengl");
// These two are optional, and will default to 0 if they're not specified.
mDefaultMediaWidth = message.getValueS32("default_width");
mDefaultMediaHeight = message.getValueS32("default_height");
mAllowDownsample = message.getValueBoolean("allow_downsample");
mPadding = message.getValueS32("padding");
setSizeInternal();
mTextureParamsReceived = true;
}
else if(message_name == "updated")
{
if(message.hasValue("left"))
{
LLRect newDirtyRect;
newDirtyRect.mLeft = message.getValueS32("left");
newDirtyRect.mTop = message.getValueS32("top");
newDirtyRect.mRight = message.getValueS32("right");
newDirtyRect.mBottom = message.getValueS32("bottom");
// The plugin is likely to have top and bottom switched, due to vertical flip and OpenGL coordinate confusion.
// If they're backwards, swap them.
if(newDirtyRect.mTop < newDirtyRect.mBottom)
{
S32 temp = newDirtyRect.mTop;
newDirtyRect.mTop = newDirtyRect.mBottom;
newDirtyRect.mBottom = temp;
}
if(mDirtyRect.isEmpty())
{
mDirtyRect = newDirtyRect;
}
else
{
mDirtyRect.unionWith(newDirtyRect);
}
LL_DEBUGS("PluginUpdated") << "adjusted incoming rect is: ("
<< newDirtyRect.mLeft << ", "
<< newDirtyRect.mTop << ", "
<< newDirtyRect.mRight << ", "
<< newDirtyRect.mBottom << "), new dirty rect is: ("
<< mDirtyRect.mLeft << ", "
<< mDirtyRect.mTop << ", "
<< mDirtyRect.mRight << ", "
<< mDirtyRect.mBottom << ")"
<< LL_ENDL;
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CONTENT_UPDATED);
}
bool time_duration_updated = false;
int previous_percent = mProgressPercent;
if(message.hasValue("current_time"))
{
mCurrentTime = message.getValueReal("current_time");
time_duration_updated = true;
}
if(message.hasValue("duration"))
{
mDuration = message.getValueReal("duration");
time_duration_updated = true;
}
if(message.hasValue("current_rate"))
{
mCurrentRate = message.getValueReal("current_rate");
}
if(message.hasValue("loaded_duration"))
{
mLoadedDuration = message.getValueReal("loaded_duration");
time_duration_updated = true;
}
else
//.........这里部分代码省略.........