How to disable movement of Minimap?

Remove from the parent after setting the Game Only. Why are you removing the button in the first place?

Its removing the ui widget not the button. so u close the map and it removes the widget.

OK. I see you insist on removing the widgets. :slight_smile: Don’t, there’s no need.

We set up Tab in such a way that Removal of widgets is not necessary.

Currently, the Tab is still wired to show & hide even though you no longer want it to act this way. You want the button to hide it now, right?

So, the Tab can be simplified to Get Widget → Set Visibility (Visible)

And the UI button Self → Set Visibility (Hidden)

You add the widget once when the game starts. If you remove it from the viewport, it’d have to be re-added again.

Control by Visibility Only - saves a lot of hassle with rejiggling layout and is more performant!

Essentially:

  • tab shows the (previously created and added to the viewport) menu and gives control to the widget


  • the widget restores the control for the Player Controller and hides itself

I kind of want it both ways, so u can toggle the map by pressing tab and close it by pressing the button. Tbh i only added the button in the first place so that it would close and allow game controls again. As you previous bp would press tab to hide the widget but the game controls would not work properly.

so your previous Bp was fine it did its job, but when i’d hide the widget the mouse cursor would show and i’d have to click(hold) to look around the world.

i do prefer toggling instead of pressing a button :slight_smile:

If you want control in both, don’t take away input from the Player Controller (use IM Game and UI - but it’s not so good for first person shooters…) Otherwise the player can walk around with open menu (but it may be desirable, of course)


I kind of want it both ways, so u can
toggle the map by pressing tab and
close it by pressing the button.

Override onKeyDown in the widget and have the widget handle Tab when it’s in focus.

  • tab stays the same

  • in the widget:

  • ensure the root of the widget isFocusable True:

332480-focus.jpg

Below is the solution to both. Toggling & pressing button.

in short:

  • the Player Controller Tab shows the menu and gives it full input control (UI Only)
  • the widget can use a button or handle a key press to restore said control back

This way we’ve arrived at the most standard implementation there is. Highly recommended.

I’ll implement this and get back to you thanks

How’d you get that node below the Branch?

nvm found it.

It doesn’t work?

you get control back but the widget doesn’t toggle when either press button or press tab. The widget stays on the screen even if u press the close button.

Again, I can’t possibly guess what you did. Please post a screenshot / script.

Works more than fine:

Image from Gyazo

Widget:

Player:

And a project link, just in case:

https://drive.google.com/file/d/1B5Gjqss6Klv-swfnxGavTaFaZ7c8FgmJ/view?usp=sharing