x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can I make my SNotificationItem work

Hello,

I am trying to use SNotificationItem to create a neat little notification in my editor code. I searched some existing editor code and it all seems quite simple, except it doesn't work for me :)

I have ad editor plugin that is going to be doing some heavy work and during that work I want to display the notification similar to what you can see when we compile the code via hot reload.

so here is my slate class

 void SMyDevelopmentHelper::Construct(const FArguments& InArgs)
 {
     ParentWindowPtr = InArgs._ParentWindow;
 
     ChildSlot
         .HAlign(HAlign_Right)
         .VAlign(VAlign_Bottom)
         .Padding(15)
         [
             SAssignNew(NotificationListPtr, SNotificationList)
             .Visibility(EVisibility::SelfHitTestInvisible)
         ];
 }

I then call a method which is supposed to create a notification

 void FMyDevelopmentHelper::OnDoingSomeHeavyComputation(const TSharedRef< SNotificationList >& InNotificationList)
 {
     FNotificationInfo Info(FText::FromString("A Notification"));
     Info.bUseLargeFont = true;
     Info.bFireAndForget = true;
     Info.bUseSuccessFailIcons = true;
     Info.ExpireDuration = 5.0f;
     Info.FadeInDuration = 2.0f;
     Info.FadeOutDuration = 2.0f;
     TSharedPtr<SNotificationItem> Notification = InNotificationList->AddNotification(Info);
     if (Notification.IsValid())
     {
         Notification->SetCompletionState(SNotificationItem::CS_Success);
     }
 }

I am hoping that someone at Epic can tell me what I am missing to get this code to work.

Product Version: Not Selected
Tags:
more ▼

asked Nov 01 '14 at 11:59 PM in C++ Programming

avatar image

Chrys
301 21 27 44

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

ah nevermind this actually works well, I was just looking in the wrong place, I was expecting this to show in the main window , instead it showed in the widget I had created. Which makes sense ofc. Ah well I am leaving this here so others can maybe see how to use it.

more ▼

answered Nov 02 '14 at 12:08 AM

avatar image

Chrys
301 21 27 44

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question