本文整理汇总了C++中LLControlGroup类的典型用法代码示例。如果您正苦于以下问题:C++ LLControlGroup类的具体用法?C++ LLControlGroup怎么用?C++ LLControlGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLControlGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_llui
void init_llui()
{
// Font lookup needs directory support
#if LL_DARWIN
const char* newview_path = "../../../../newview";
#else
const char* newview_path = "../../../newview";
#endif
gDirUtilp->initAppDirs("GIS", newview_path);
gDirUtilp->setSkinFolder("default");
// colors are no longer stored in a LLControlGroup file
LLUIColorTable::instance().loadFromSettings();
std::string config_filename = gDirUtilp->getExpandedFilename(
LL_PATH_APP_SETTINGS, "settings.xml");
gSavedSettings.loadFromFile(config_filename);
// See LLAppViewer::init()
LLUI::settings_map_t settings;
settings["config"] = &gSavedSettings;
settings["ignores"] = &gWarningSettings;
settings["floater"] = &gSavedSettings;
settings["account"] = &gSavedPerAccountSettings;
// Don't use real images as we don't have a GL context
LLUI::initClass(settings, &gTestImageProvider);
const bool no_register_widgets = false;
LLWidgetReg::initClass( no_register_widgets );
// Unclear if this is needed
LLUI::setupPaths();
// Otherwise we get translation warnings when setting up floaters
// (tooltips for buttons)
std::set<std::string> default_args;
LLTransUtil::parseStrings("strings.xml", default_args);
LLTransUtil::parseLanguageStrings("language_settings.xml");
LLFontManager::initClass();
// Creating widgets apparently requires fonts to be initialized,
// otherwise it crashes.
LLFontGL::initClass(96.f, 1.f, 1.f,
gDirUtilp->getAppRODataDir(),
LLUI::getXUIPaths(),
false ); // don't create gl textures
LLFloaterView::Params fvparams;
fvparams.name("Floater View");
fvparams.rect( LLRect(0,480,640,0) );
fvparams.mouse_opaque(false);
fvparams.follows.flags(FOLLOWS_ALL);
fvparams.tab_stop(false);
gFloaterView = LLUICtrlFactory::create<LLFloaterView> (fvparams);
}
示例2: LLView
LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
: LLView(p),
mPanelSpacing(p.border_size),
mOrientation(p.orientation),
mAnimate(p.animate),
mAnimatedThisFrame(false),
mNeedsLayout(true),
mSaveSizes(p.save_sizes), // <FS:Zi> Save sizes to settings
mClip(p.clip),
mOpenTimeConstant(p.open_time_constant),
mCloseTimeConstant(p.close_time_constant),
mResizeBarOverlap(p.resize_bar_overlap),
mShowDragHandle(p.show_drag_handle),
mDragHandleFirstIndent(p.drag_handle_first_indent),
mDragHandleSecondIndent(p.drag_handle_second_indent),
mDragHandleThickness(p.drag_handle_thickness),
mDragHandleShift(p.drag_handle_shift)
{
// <FS:Zi> Set up settings control to save sizes if not already present
if (mSaveSizes)
{
std::string res = std::string("layout_size_") + getName();
LLStringUtil::replaceChar(res, ' ', '_');
mSizeControlName = res;
LLControlGroup* controlGroup = LLUI::sSettingGroups["account"];
if (!controlGroup->controlExists(mSizeControlName))
{
LL_WARNS() << "declaring control " << mSizeControlName << LL_ENDL;
controlGroup->declareLLSD(
mSizeControlName,
LLSD(),
llformat("Fractional size for layout panel %s", getName().c_str())
);
}
else
{
mSavedSizes = controlGroup->getLLSD(mSizeControlName);
}
}
// </FS:Zi>
}
示例3: if
void LLControlGroup::connectCOAVars(LLControlGroup &OtherGroup)
{
LLControlVariable *pCOAVar = NULL;
for (ctrl_name_table_t::iterator iter = mNameTable.begin();
iter != mNameTable.end(); iter++)
{
if(iter->second->isCOA())
{
LLControlVariable *pParent = iter->second;
LLControlVariable *pChild = OtherGroup.getControl(pParent->getName());
if(!pChild)
{
OtherGroup.declareControl(
pParent->getName(),
pParent->type(),
pParent->getDefault(),
pParent->getComment(),
pParent->isPersisted(),
true);
pChild = OtherGroup.getControl(pParent->getName());
}
if(pChild)
{
pParent->setCOAConnect(pChild,true);
pChild->setCOAConnect(pParent,false);
}
}
else if(iter->second->getName() == "AscentStoreSettingsPerAccount")
pCOAVar = iter->second;
}
if(pCOAVar)
{
pCOAVar->getSignal()->connect(boost::bind(&LLControlGroup::handleCOASettingChange, this, _2));
pCOAVar->firePropertyChanged();
}
}
示例4: handleRightMouseDown
BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
/* JC - suppress context menu 8/29/2002
// On right mouse, go through some convoluted steps to
// make the build menu appear.
setCurrentTool( (LLTool*) mNull );
// This should return FALSE, meaning the context menu will
// be shown.
return FALSE;
*/
// Returning true will suppress the context menu
// NaCl - Rightclick-mousewheel zoom
if (!(gKeyboard->currentMask(TRUE) & MASK_ALT))
{
static LLCachedControl<LLVector3> _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
static LLCachedControl<F32> CameraAngle(gSavedSettings,"CameraAngle");
LLVector3 vTemp=_NACL_MLFovValues;
vTemp.mV[0]=CameraAngle;
vTemp.mV[2]=1.0f;
gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
gSavedSettings.setF32("CameraAngle",vTemp.mV[1]);
return TRUE;
}
// NaCl End
// <FS:Ansariel> Enable context/pie menu in mouselook
//return TRUE;
return (!gSavedSettings.getBOOL("FSEnableRightclickMenuInMouselook"));
// </FS:Ansariel>
}
示例5: mEnableAllCtrl
LLPanelNearByMedia::LLPanelNearByMedia()
: mMediaList(NULL),
mEnableAllCtrl(NULL),
mAllMediaDisabled(false),
mDebugInfoVisible(false),
mParcelMediaItem(NULL),
mParcelAudioItem(NULL)
{
mHoverTimer.stop();
mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) &&
gSavedSettings.getBOOL("MediaTentativeAutoPlay");
gSavedSettings.getControl(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING)->getSignal()->connect(boost::bind(&LLPanelNearByMedia::handleMediaAutoPlayChanged, this, _2));
mCommitCallbackRegistrar.add("MediaListCtrl.EnableAll", boost::bind(&LLPanelNearByMedia::onClickEnableAll, this));
mCommitCallbackRegistrar.add("MediaListCtrl.DisableAll", boost::bind(&LLPanelNearByMedia::onClickDisableAll, this));
mCommitCallbackRegistrar.add("MediaListCtrl.GoMediaPrefs", boost::bind(&LLPanelNearByMedia::onAdvancedButtonClick, this));
mCommitCallbackRegistrar.add("MediaListCtrl.MoreLess", boost::bind(&LLPanelNearByMedia::onMoreLess, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Stop", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaStop, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Play", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaPlay, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Pause", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaPause, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Mute", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaMute, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Volume", boost::bind(&LLPanelNearByMedia::onCommitSelectedMediaVolume, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Zoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaZoom, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Unzoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaUnzoom, this));
buildFromFile( "panel_nearby_media.xml");
}
示例6: handleScrollWheel
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (gViewerWindow->getRightMouseDown())
{
LLViewerCamera& cam(LLViewerCamera::instance());
mStartFOV = cam.getDefaultFOV();
gSavedSettings.setF32(
"ExodusAlternativeFOV",
mTargetFOV = clicks > 0 ?
llclamp(mTargetFOV += (0.05f * clicks), 0.1f, 3.0f) :
llclamp(mTargetFOV -= (0.05f * -clicks), 0.1f, 3.0f)
);
if (gSavedSettings.getBOOL("LiruMouselookInstantZoom"))
cam.setDefaultFOV(mTargetFOV);
else
mTimerFOV.start();
cam.mSavedFOVLoaded = false;
}
else if (clicks > 0)
{
gAgentCamera.changeCameraToDefault();
}
return TRUE;
}
示例7: handleRepartition
static bool handleRepartition(const LLSD&)
{
if (gPipeline.isInit())
{
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
gOctreeReserveCapacity = llmin(gSavedSettings.getU32("OctreeReserveNodeCapacity"),U32(512));
gObjectList.repartitionObjects();
}
return true;
}
示例8: handleCloudSettingsChanged
bool handleCloudSettingsChanged(const LLSD& newvalue)
{
bool bCloudsEnabled = gSavedSettings.getBOOL("CloudsEnabled");
if((bool)LLPipeline::hasRenderTypeControl((void*)LLPipeline::RENDER_TYPE_WL_CLOUDS)!=bCloudsEnabled)
LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_WL_CLOUDS);
if( !gSavedSettings.getBOOL("SkyUseClassicClouds") ) bCloudsEnabled = false;
if((bool)LLPipeline::hasRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS)!=bCloudsEnabled )
LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS);
return true;
}
示例9: handleRightMouseUp
// NaCl - Rightclick-mousewheel zoom
BOOL LLToolCompGun::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
static LLCachedControl<LLVector3> _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
static LLCachedControl<F32> CameraAngle(gSavedSettings,"CameraAngle");
LLVector3 vTemp=_NACL_MLFovValues;
// Only reset if zoomed
if (vTemp.mV[2] == 1.0f)
{
vTemp.mV[1]=CameraAngle;
vTemp.mV[2]=0.0f;
gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
gSavedSettings.setF32("CameraAngle",vTemp.mV[0]);
}
return TRUE;
}
示例10: onClickSelectedMediaMute
void LLPanelNearByMedia::onClickSelectedMediaMute()
{
LLUUID selected_media_id = mMediaList->getValue().asUUID();
if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
gSavedSettings.setBOOL("MuteMusic", mMuteBtn->getValue());
}
else {
LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
if (NULL != impl)
{
F32 volume = impl->getVolume();
if(volume > 0.0)
{
impl->setVolume(0.0);
}
else if (mVolumeSlider->getValueF32() == 0.0)
{
impl->setVolume(1.0);
mVolumeSlider->setValue(1.0);
}
else
{
impl->setVolume(mVolumeSlider->getValueF32());
}
}
}
}
示例11: updateClass
// static
void LLFloaterNearbyMedia::updateClass()
{
if(gSavedSettings.getBOOL("ShowNearbyMediaFloater"))
LLFloaterNearbyMedia::getInstance()->open();
else if(LLFloaterNearbyMedia::instanceExists())
LLFloaterNearbyMedia::getInstance()->close();
}
示例12: onOpen
void LLFloaterNearbyMedia::onOpen()
{
//Mess around with control rect to not change unless the user actually tweaked it..
LLRect rect = gSavedSettings.getRect("FloaterNearbyMediaRect");
if(!rect.isEmpty())
{
setRectControl("FloaterNearbyMediaRect");
applyRectControl();
}
else
{
const LLRect media_rect = gOverlayBar->mMediaRemote->calcScreenRect();
setOrigin(media_rect.mLeft - getRect().getWidth(), media_rect.mBottom + gOverlayBar->mChatBar->getRect().getHeight());
}
gSavedSettings.setBOOL("ShowNearbyMediaFloater", true);
}
示例13: pickCallback
void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info)
{
LLViewerObject* hit_obj = pick_info.getObject();
if (!LLToolCompInspect::getInstance()->mMouseDown)
{
// fast click on object, but mouse is already up...just do select
LLToolCompInspect::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
return;
}
if( hit_obj )
{
if (LLSelectMgr::getInstance()->getSelection()->getObjectCount())
{
LLEditMenuHandler::gEditMenuHandler = LLSelectMgr::getInstance();
}
LLToolCompInspect::getInstance()->setCurrentTool( LLToolCompInspect::getInstance()->mSelectRect );
LLToolCompInspect::getInstance()->mSelectRect->handlePick( pick_info );
}
else
{
LLToolCompInspect::getInstance()->setCurrentTool( LLToolCompInspect::getInstance()->mSelectRect );
LLToolCompInspect::getInstance()->mSelectRect->handlePick( pick_info );
}
}
示例14: toggle_show_mini_location_panel
bool toggle_show_mini_location_panel(const LLSD& newvalue)
{
bool value = newvalue.asBoolean();
LLPanelTopInfoBar::getInstance()->setVisible(value);
gSavedSettings.setBOOL("ShowNavbarNavigationPanel", !value);
return true;
}
示例15: handleHighResSnapshotChanged
bool handleHighResSnapshotChanged(const LLSD& newvalue)
{
// High Res Snapshot active, must uncheck RenderUIInSnapshot
if (newvalue.asBoolean())
{
gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
}
return true;
}