当前位置: 首页>>代码示例>>C++>>正文


C++ SetVisibility函数代码示例

本文整理汇总了C++中SetVisibility函数的典型用法代码示例。如果您正苦于以下问题:C++ SetVisibility函数的具体用法?C++ SetVisibility怎么用?C++ SetVisibility使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetVisibility函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetEntity

void Trigger::Initialize()
{
	m_collisionRegistered = false;

	auto sceneEM = GetEntity()->GetModule<SceneEM>();
	sceneEM->SetVisibility(TriggerET::s_gfxIdActive, true);
	sceneEM->SetVisibility(TriggerET::s_gfxIdInactive, false);

	SetDefaultAction();
}
开发者ID:mathall,项目名称:hobo,代码行数:10,代码来源:Trigger.cpp

示例2: SNew

TSharedPtr<SWidget> HLODOutliner::FHLODOutlinerDragDropOp::GetDefaultDecorator() const
{
	TSharedRef<SVerticalBox> VerticalBox = SNew(SVerticalBox);

	VerticalBox->AddSlot()
		[
			SNew(SBorder)
			.BorderImage(FEditorStyle::GetBrush("Graph.ConnectorFeedback.Border"))
			.Visibility(this, &FHLODOutlinerDragDropOp::GetOverrideVisibility)
			.Content()
			[
				SNew(SHorizontalBox)

				+ SHorizontalBox::Slot()
				.AutoWidth()
				.Padding(0.0f, 0.0f, 3.0f, 0.0f)
				[
					SNew(SImage)
					.Image(this, &FHLODOutlinerDragDropOp::GetOverrideIcon)
				]

				+ SHorizontalBox::Slot()
					.AutoWidth()
					.VAlign(VAlign_Center)
					[
						SNew(STextBlock)
						.Text(this, &FHLODOutlinerDragDropOp::GetOverrideText)
					]
			]
		];

	if (LODActorOp.IsValid())
	{
		auto Content = LODActorOp->GetDefaultDecorator();
		if (Content.IsValid())
		{
			Content->SetVisibility(TAttribute<EVisibility>(this, &FHLODOutlinerDragDropOp::GetDefaultVisibility));
			VerticalBox->AddSlot()[Content.ToSharedRef()];
		}
	}

	if (StaticMeshActorOp.IsValid())
	{
		auto Content = StaticMeshActorOp->GetDefaultDecorator();
		if (Content.IsValid())
		{
			Content->SetVisibility(TAttribute<EVisibility>(this, &FHLODOutlinerDragDropOp::GetDefaultVisibility));
			VerticalBox->AddSlot()[Content.ToSharedRef()];
		}
	}

	return VerticalBox;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:53,代码来源:HLODOutlinerDragDrop.cpp

示例3: Piccheck

func Piccheck()
{
  if(FindContents(ZPM_))
  {
   SetVisibility(VIS_All());
   SetAction(GetAction(FindContents(ZPM_)));
  }
  else
  {
   SetAction("Inactive");
   SetVisibility(VIS_None());
  }
  return(1);
}
开发者ID:maxmitti,项目名称:SGGP,代码行数:14,代码来源:Script.c

示例4: SetVisibility

void SCaptureRegionWidget::Activate(bool bCurrentCaptureRegionIsFullViewport)
{
	SetVisibility(EVisibility::Visible);

	OriginalCaptureRegion = GetHighResScreenshotConfig().UnscaledCaptureRegion;
	bIgnoreExistingCaptureRegion = bCurrentCaptureRegionIsFullViewport;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:7,代码来源:SCaptureRegionWidget.cpp

示例5: SetVisibility

void DKCube::Create(DKObject *parent, DKPoint pos, DKSize siz)
{
	name = "DKXyz";
	par = parent;
	point = pos;
	size = siz;
	frame = par->frame;
	win = par->win;

	/*
	front.Create(point.x,y_pos,z_pos,size.x,size.y,0,0,0);
	front.SetColor(0,0,1,1);
	back.Create(point.x,y_pos,z_pos+depth,size.x,size.y,0,0,0);
	back.SetColor(0,0,1,1);
	right.Create(point.x,y_pos,z_pos,size.x,size.y,0,-90,0);
	right.SetColor(1,0,0,1);
	left.Create(point.x+size.x,y_pos,z_pos,size.x,size.y,0,-90,0);
	left.SetColor(1,0,0,1);
	top.Create(point.x,y_pos,z_pos,size.x,size.y,90,0,0);
	top.SetColor(0,1,0,1);
	bottom.Create(x_pos,y_pos+size.y,z_pos,size.x,size.y,90,0,0);
	bottom.SetColor(0,1,0,1);
	*/
	
	SetVisibility(true);
}
开发者ID:trigg4htre,项目名称:dklib,代码行数:26,代码来源:DKCube.cpp

示例6: SetEnabled

void SFlareStoryMenu::Setup()
{
	SetEnabled(false);
	SetVisibility(EVisibility::Collapsed);

	TitleList.Add(LOCTEXT("Story1Title", "2092"));
	TextList.Add(LOCTEXT("Story1", "The Hypatia Space Telescope identifies a gas giant around the star \u03B2 Hydri"));
	SubTextList.Add(LOCTEXT("SubStory1", "The new planet, Nema, would only be one of many exoplanets in the universe, if not for moons deemed capable of supporting life.\n24 light-years away from Earth, it is close enough to be in human reach."));
	ImageList.Add(FFlareStyleSet::GetImage("Story_Discovery"));

	TitleList.Add(LOCTEXT("Story2Title", "2107"));
	TextList.Add(LOCTEXT("Story2", "Interstellar colonial carrier Daedalus leaves Earth orbit"));
	SubTextList.Add(LOCTEXT("SubStory2", "Packed with a crew of 9,000, mining gear and scientific equipment to investigate the Hydri system, it will reach 20% of the speed of light."));
	ImageList.Add(FFlareStyleSet::GetImage("Story_Departure"));

	TitleList.Add(LOCTEXT("Story3Title", "2230"));
	TextList.Add(LOCTEXT("Story3", "ICC Daedalus enters the orbit of Nema"));
	SubTextList.Add(LOCTEXT("SubStory3", "Its moons are barren, desolated wastelands, unable to support life. \nPumping stations are built around Nema to extract the valuable gases within, asteroids are broken up for materials and colonists establish outposts around the moons."));
	ImageList.Add(FFlareStyleSet::GetImage("Story_Nema"));

	TitleList.Add(LOCTEXT("Story4Title", "2249"));
	TextList.Add(LOCTEXT("Story4", "Some colonists attempt a return to Earth"));
	SubTextList.Add(LOCTEXT("SubStory4", "A clash between colonists pushes some of them to attempt to fly Daedalus back to Earth, only to meet opposition from the others. The carrier is destroyed in the fight."));
	ImageList.Add(FFlareStyleSet::GetImage("Story_Return"));

	TitleList.Add(LOCTEXT("Story5Title", "2250"));
	TextList.Add(LOCTEXT("Story5", "Life goes on"));
	SubTextList.Add(LOCTEXT("SubStory5", "As the colonial government has broken down, the mining and exploration companies remain. With no hope of return to the known world, life goes on, in relative peace..."));
	ImageList.Add(FFlareStyleSet::GetImage("Story_Peace"));
}
开发者ID:niavok,项目名称:HeliumRain,代码行数:30,代码来源:FlareStoryMenu.cpp

示例7: SetVisibility

void OpIndicatorButton::OnShow(BOOL show)
{
	if (show && !m_indicator_type)
	{
		SetVisibility(FALSE);
	}
}
开发者ID:prestocore,项目名称:browser,代码行数:7,代码来源:OpIndicatorButton.cpp

示例8: Fadein

	/** Begins the fadein of this message */
	void Fadein( const bool bAllowThrottleWhenFrameRateIsLow )
	{
		// Make visible
		SetVisibility(EVisibility::Visible);

		// Play Fadein animation
		FadeAnimation = FCurveSequence();
		FadeCurve = FadeAnimation.AddCurve(0.f, FadeInDuration.Get());
		FadeAnimation.Play();

		// Scale up/flash animation
		IntroAnimation = FCurveSequence();
		ScaleCurveX = IntroAnimation.AddCurve(0.2f, 0.3f, ECurveEaseFunction::QuadOut);
		ScaleCurveY = IntroAnimation.AddCurve(0.f, 0.2f);
		GlowCurve = IntroAnimation.AddCurve(0.5f, 0.55f, ECurveEaseFunction::QuadOut);
		IntroAnimation.Play();

		// When a fade in occurs, we need a high framerate for the animation to look good
		if( FadeInDuration.Get() > KINDA_SMALL_NUMBER && bAllowThrottleWhenFrameRateIsLow && !ThrottleHandle.IsValid() )
		{
			if( !FSlateApplication::Get().IsRunningAtTargetFrameRate() )
			{
				ThrottleHandle = FSlateThrottleManager::Get().EnterResponsiveMode();
			}
		}
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:27,代码来源:SNotificationList.cpp

示例9: SetVisibility

void C4Menu::Draw(C4TargetFacet &cgo)
{
	// Inactive
	if (!IsActive()) return;

	// Location
	if (!LocationSet) { InitLocation(cgo); LocationSet=true; }

	// If drawn by a viewport, then it's made visible
	SetVisibility(true);

	// do drawing
	typedef C4GUI::Dialog ParentClass;
	ParentClass::Draw(cgo);

	// draw tooltip if selection time has been long enough
	if (!fTextProgressing) ++TimeOnSelection;
	if (TimeOnSelection >= C4MN_InfoCaption_Delay)
		if (Style != C4MN_Style_Info) // No tooltips in info menus - doesn't make any sense...
			if (!::Control.isReplay())
				if (!::pGUI->Mouse.IsActiveInput())
				{
					C4MenuItem *pSel = GetSelectedItem();
					if (pSel && *pSel->InfoCaption)
					{
						int32_t iX=0, iY=0;
						pSel->ClientPos2ScreenPos(iX, iY);
						C4GUI::Screen::DrawToolTip(pSel->InfoCaption, cgo, iX, iY);
					}
				}
}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:31,代码来源:C4Menu.cpp

示例10: DefaultExtraIcons_Load

void DefaultExtraIcons_Load()
{
	hExtraChat = ExtraIcon_Register("chat_activity", LPGEN("Chat activity"), "ChatActivity");
	hExtraVisibility = ExtraIcon_Register("visibility", "Visibility", LoadSkinnedIconName(SKINICON_OTHER_VISIBLE_ALL));
	hExtraGender = ExtraIcon_Register("gender", "Gender", "gender_male");
	hExtraProto = ExtraIcon_Register("protocol", "Account", LoadSkinnedIconName(SKINICON_OTHER_ACCMGR),
		&ProtocolRebuildIcons, &ProtocolApplyIcon, &ProtocolOnClick);

	for (int i = 0; i < SIZEOF(infos); i++) {
		Info &p = infos[i];
		p.hIcolib = LoadSkinnedIconHandle(p.iSkinIcon);
		if (p.OnClick)
			p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon), DefaultOnClick, (LPARAM)&p);
		else
			p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon));
	}

	for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
		SetExtraIcons(hContact);
		SetVisibility(hContact, -1, false);
		SetGender(hContact, -1, false);
	}

	HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:25,代码来源:DefaultExtraIcons.cpp

示例11: SetName

/**
 * \brief Unserialize the layer.
 */
void Layer::UnserializeFrom(const SerializerElement & element)
{
    SetName(element.GetStringAttribute("name", "", "Name"));
    SetVisibility(element.GetBoolAttribute("visibility", true, "Visibility"));

    //Compatibility with GD <= 3.3
    if (element.HasChild("Camera"))
    {
        for (std::size_t i = 0; i < element.GetChildrenCount("Camera"); ++i)
        {
            const SerializerElement & cameraElement = element.GetChild("Camera", i);
            SetCameraCount(GetCameraCount()+1);
            Camera & camera = GetCamera(GetCameraCount()-1);

            camera.SetUseDefaultSize(cameraElement.GetBoolAttribute("DefaultSize", true));
            camera.SetSize(cameraElement.GetDoubleAttribute("Width"), cameraElement.GetDoubleAttribute("Height"));

            camera.SetUseDefaultViewport(cameraElement.GetBoolAttribute("DefaultViewport", true));
            camera.SetViewport(cameraElement.GetDoubleAttribute("ViewportLeft"),
                cameraElement.GetDoubleAttribute("ViewportTop"),
                cameraElement.GetDoubleAttribute("ViewportRight"),
                cameraElement.GetDoubleAttribute("ViewportBottom")
                ); // (sf::Rect used Right and Bottom instead of Width and Height before)
        }
    }
    //End of compatibility code
    else
    {
        SerializerElement & camerasElement = element.GetChild("cameras");
        camerasElement.ConsiderAsArrayOf("camera");
        for (std::size_t i = 0; i < camerasElement.GetChildrenCount(); ++i)
        {
            const SerializerElement & cameraElement = camerasElement.GetChild(i);

            SetCameraCount(GetCameraCount()+1);
            Camera & camera = GetCamera(GetCameraCount()-1);

            camera.SetUseDefaultSize(cameraElement.GetBoolAttribute("defaultSize", true));
            camera.SetSize(cameraElement.GetDoubleAttribute("width"), cameraElement.GetDoubleAttribute("height"));

            camera.SetUseDefaultViewport(cameraElement.GetBoolAttribute("defaultViewport", true));
            camera.SetViewport(cameraElement.GetDoubleAttribute("viewportLeft"),
                cameraElement.GetDoubleAttribute("viewportTop"),
                cameraElement.GetDoubleAttribute("viewportRight"),
                cameraElement.GetDoubleAttribute("viewportBottom")); // (sf::Rect used Right and Bottom instead of Width and Height before)
        }
    }

    effects.clear();
    SerializerElement & effectsElement = element.GetChild("effects");
    effectsElement.ConsiderAsArrayOf("effect");
    for (std::size_t i = 0; i < effectsElement.GetChildrenCount(); ++i)
    {
        const SerializerElement & effectElement = effectsElement.GetChild(i);

        auto effect = std::shared_ptr<gd::Effect>(new Effect);
        effect->UnserializeFrom(effectElement);
        effects.push_back(effect);
    }
}
开发者ID:ShafeeTheXenos,项目名称:GD,代码行数:63,代码来源:Layer.cpp

示例12: SNew

void SAnimationOutlinerTreeNode::Construct( const FArguments& InArgs, TSharedRef<FSequencerDisplayNode> Node )
{
	DisplayNode = Node;
	OnSelectionChanged = InArgs._OnSelectionChanged;

	SelectedBrush = FEditorStyle::GetBrush( "Sequencer.AnimationOutliner.SelectionBorder" );
	NotSelectedBrush = FEditorStyle::GetBrush( "NoBorder" );
	ExpandedBrush = FEditorStyle::GetBrush( "TreeArrow_Expanded" );
	CollapsedBrush = FEditorStyle::GetBrush( "TreeArrow_Collapsed" );

	// Choose the font.  If the node is a root node, we show a larger font for it.
	FSlateFontInfo NodeFont = Node->GetParent().IsValid() ? 
		FEditorStyle::GetFontStyle("Sequencer.AnimationOutliner.RegularFont") :
		FEditorStyle::GetFontStyle("Sequencer.AnimationOutliner.BoldFont");

	TSharedRef<SWidget> TextWidget = 
		SNew( STextBlock )
		.Text( Node->GetDisplayName() )
		.Font( NodeFont );

	TSharedRef<SWidget>	FinalWidget = 
		SNew( SHorizontalBox )
		+ SHorizontalBox::Slot()
		.AutoWidth()
		.VAlign( VAlign_Center )
		[
			SNew(SButton)
			.ContentPadding(0)
			.Visibility( this, &SAnimationOutlinerTreeNode::GetExpanderVisibility )
			.OnClicked( this, &SAnimationOutlinerTreeNode::OnExpanderClicked )
			.ClickMethod( EButtonClickMethod::MouseDown )
			.ButtonStyle( FEditorStyle::Get(), "NoBorder" )
			.HAlign( HAlign_Center )
			.VAlign( VAlign_Center )
			[
				SNew( SImage )
				.Image( this, &SAnimationOutlinerTreeNode::OnGetExpanderImage)
			]
		]
		+ SHorizontalBox::Slot()
		.AutoWidth()
		.VAlign( VAlign_Center )
		[
			TextWidget
		];


	ChildSlot
	[
		SNew( SBorder )
		.VAlign( VAlign_Center )
		.Padding(1.0f)
		.BorderImage( this, &SAnimationOutlinerTreeNode::GetNodeBorderImage )
		[
			FinalWidget
		]
	];

	SetVisibility( TAttribute<EVisibility>( this, &SAnimationOutlinerTreeNode::GetNodeVisibility ) );
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:60,代码来源:SAnimationOutlinerView.cpp

示例13: SetVisibility

void SLogVisualizerTimeline::UpdateVisibility()
{
	ULogVisualizerSettings* Settings = ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>();

	if (FVisualLoggerDatabase::Get().ContainsRowByName(GetName()))
	{
		FVisualLoggerDBRow& DataRow = FVisualLoggerDatabase::Get().GetRowByName(GetName());
		const TArray<FVisualLogDevice::FVisualLogEntryItem>& Entries = DataRow.GetItems();

		const bool bJustIgnore = Settings->bIgnoreTrivialLogs && Entries.Num() <= Settings->TrivialLogsThreshold;
		const bool bVisibleByOwnerClasses = FVisualLoggerFilters::Get().MatchObjectName(OwnerClassName.ToString());
		const bool bIsCollapsed = bJustIgnore || DataRow.GetNumberOfHiddenItems() == Entries.Num() || (SearchFilter.Len() > 0 && OwnerName.ToString().Find(SearchFilter) == INDEX_NONE);

		const bool bIsHidden = bIsCollapsed || !bVisibleByOwnerClasses;
		SetVisibility(bIsHidden ? EVisibility::Collapsed : EVisibility::Visible);
		if (bIsCollapsed)
		{
			Owner->SetSelectionState(SharedThis(this), false, false);
		}

		FVisualLoggerDatabase::Get().SetRowVisibility(GetName(), !bIsHidden);
	}
	else
	{
		Owner->SetSelectionState(SharedThis(this), false, false);
		FVisualLoggerDatabase::Get().SetRowVisibility(GetName(), false);
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:28,代码来源:SVisualLoggerTimeline.cpp

示例14: GetBounds

	void ScrollBar::Update()
	{
		// check associated control
		if (pScrollWindow)
		{
			int32_t iVisHgt = pScrollWindow->GetBounds().Hgt;
			int32_t iClientHgt = pScrollWindow->GetClientRect().Hgt;
			if ((fScrolling = (iVisHgt < iClientHgt)))
			{
				// scrolling necessary
				// get vertical scroll pos
				int32_t iMaxWinScroll = iClientHgt - iVisHgt;
				int32_t iMaxBarScroll = GetBounds().Hgt - 2*C4GUI_ScrollArrowHgt - iScrollThumbSize;
				int32_t iWinScroll = pScrollWindow->iScrollY;
				// scroll thumb height is currently hardcoded
				// calc scroll pos
				iScrollPos = Clamp<int32_t>(iMaxBarScroll * iWinScroll / iMaxWinScroll, 0, iMaxBarScroll);
			}
		}
		else fScrolling = !!pScrollCallback;
		// reset buttons
		if (!fScrolling)
			fTopDown = fBottomDown = false;
		// set visibility by scroll status
		if (fAutoHide) SetVisibility(fScrolling);
	}
开发者ID:sarah-russell12,项目名称:openclonk,代码行数:26,代码来源:C4GuiContainers.cpp

示例15: SetVisibility

ECode CompatModePanel::OpenPanel()
{
    SetVisibility(IView::VISIBLE);
    if (mTrigger != NULL) mTrigger->SetSelected(TRUE);
    Refresh();
    return NOERROR;
}
开发者ID:TheTypoMaster,项目名称:ElastosRDK5_0,代码行数:7,代码来源:CompatModePanel.cpp


注:本文中的SetVisibility函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。