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. 

widgets are overlapping in main menu how to solve the problem in c++

i designed four widget in ue4 blueprint. my first widget is playing menu options i put one button in this widget i click the button it will go to the another widget and another widget has three buttons. That the three buttons are placed in 30% of the left side screen i click the first button the another widget will be come in another 70% of right screen and i click the second means its will also display the widget but the first button widget and second button widget the both widget are displayed how to remove the widget . i click the first widget button means its will display the first widget and i click the second button means its will display the widget in back side of the widget the first widget will be does not hidden. help to solve this problem

in .cpp

           void AJacobPlayerController::JoinGameMenu()
        UE_LOG(LogTemp, Warning, TEXT("JacobPlayercontroller JoinGameMenu"));
        OnEnterState(AJoinGameMenuHUD::StaticClass(), false);


in .h

             UFUNCTION(BlueprintCallable, Category = PlayerController)
     void JoinGameMenu();

     TSubclassOf<UUserWidget> MainWidgetClass;
     UUserWidget * MainWidget;

i put the widget in hud i put the coding below

in .h

    class MYPROJECT3_API AJoinGameMenuHUD : public AHUD
     TSubclassOf<UUserWidget> MainWidgetClass;
     UUserWidget * MainWidget;



in .cpp

    static ConstructorHelpers::FObjectFinder<UObject>NewMainWidgetClass(TEXT("WidgetBlueprint'/Game/ThirdPerson/Widget/Server/JoinGameMenu.JoinGameMenu_C'"));
    MainWidgetClass = (UClass*)NewMainWidgetClass.Object;
    MainWidget = CreateWidget <UUserWidget>(GetWorld(), MainWidgetClass);

    if (MainWidget)

in join menu hud is the second button widget i created the first button that also the same coding

Product Version: UE 4.12
more ▼

asked Aug 19 '16 at 05:11 AM in Using UE4

avatar image

Karon Jacob
12 3 6 11

avatar image TX_Alpha Aug 30 '16 at 02:07 PM

I'm not sure about the wisdom of trying to control the widgets via c++

If I'm following your post properly, my personal approach would be to use a Widget Switcher.

I'd go about creating individual widgets to hold the various panels, buttons, and Blueprint scripts for each. I'd then use a "Master" or "Primary" Widget that would be your container for the whole system. With that "main" widget, I'd use a Widget Switcher component with your user created widgets as children to it.

You can then use BP scripts to bind click events to the sub widget buttons to change the active index value of your widget switcher component. You can include any visibility or placing logic with each click event as you see necessary.

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

0 answers: sort voted first
Be the first one to answer this question
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