本文整理汇总了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();
}
示例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;
}
示例3: Piccheck
func Piccheck()
{
if(FindContents(ZPM_))
{
SetVisibility(VIS_All());
SetAction(GetAction(FindContents(ZPM_)));
}
else
{
SetAction("Inactive");
SetVisibility(VIS_None());
}
return(1);
}
示例4: SetVisibility
void SCaptureRegionWidget::Activate(bool bCurrentCaptureRegionIsFullViewport)
{
SetVisibility(EVisibility::Visible);
OriginalCaptureRegion = GetHighResScreenshotConfig().UnscaledCaptureRegion;
bIgnoreExistingCaptureRegion = bCurrentCaptureRegionIsFullViewport;
}
示例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);
}
示例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"));
}
示例7: SetVisibility
void OpIndicatorButton::OnShow(BOOL show)
{
if (show && !m_indicator_type)
{
SetVisibility(FALSE);
}
}
示例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();
}
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
示例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 ) );
}
示例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);
}
}
示例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);
}
示例15: SetVisibility
ECode CompatModePanel::OpenPanel()
{
SetVisibility(IView::VISIBLE);
if (mTrigger != NULL) mTrigger->SetSelected(TRUE);
Refresh();
return NOERROR;
}