Hi,
Wondering if anyone could help. I am trying to create a screen that has multiple widgets. I.e. A control panel that has a button that opens a second widget panel on the side or above it that has action buttons. There is also a pop-up menu that appears at mouse location when RMB is held down for 0.5s+. First, with the control panel, it would be good to be able to click on the same button that opened the sub-panel to close it again. Second, I am trying to make it so the pop-up menu (when open) will close if you click off it.
As far as I can understand things so far. The canvas panel (at the top level of a widget hierarchy stack) is sized to cover the whole screen as default, and also stops any mouse clicks on the screen being passed to any widgets that were open before - even if the mouse click isn’t on an item in the newer widget (when 2 widgets are open at the same time, clicking on buttons on the widget that was opened first have no effect, I’m assuming because the first widget is covered by the second widgets canvas panel?), although mouse clicks on the map (such as move) still activate the character to move.
So could I ask a couple of questions?:
-
Can a canvas panel be resized? In blueprint, it gives access to the “Set Render Transform” node, but can it be resized (without scaling - as squashes my buttons), e.g. to cover only the size of the button area. And will this allow previously opened widget buttons to be hit (if outside of the resized canvas area)? Or should I be using a “Has Mouse Capture”, “Is Hovered”, “Set Keyboard focus” combination, is there an equivalent for “Set Mouse Focus” node?
-
When the pop-up menu is open, I want to be able to click off the widget (not in the box/grid widget area) to close it. I’ve tried using “Is Hovered”, but this always seems to return true?
-
Can I make “Grid Panel/Horiz/Vertical Box” a public variable so I can access it’s size and location (i.e. so I could position the pop-up menu’s box/grid widget to the mouse location, keeping the canvas in its default location)? The Image widget has access to its get properties, but no set options…
-
I’ve also just noticed that when I click on a control panel button with the same mouse button that is assigned for character move, it actions the panel button, and also passes through it and gives the character the move command!
(any ideas?)!
-
Final Option, would it be easier to just create the whole panel and pop-up system to be a single widget, that just has button bindings to enable and disable the various parts of it?
Sorry, I know a lot of questions, any help would be great.
Thanks…