Capturing Mouse Input

well,

that is another point why i create my UI inside the PlayerController, since they belong to it anyways.
I have a GameHUDWidget created inside PC. Inside it there are other UI elements with its own hierarchy stored f.e. Menus.

So if there is an event (like Input, or Overlap) I tell the PlayerController that he might do something to this GameHUDWidget f.e. Open a Menu

If that is the case before i toggle the widgets visibility i call the func you see above. Instead of having the Hybrid Set Input Game and UI i seperate them to have more control UI only or Game only.

To answer your question in which class do you do the things you posted?