Jump to content

Restless Souls/Wishlist: Difference between revisions

m
correcting Widgets section level, giving images better description
m (code to open and close widgets - intended for simple menu pages)
m (correcting Widgets section level, giving images better description)
Line 565: Line 565:
[...]
[...]


===Widget===
====Widgets====
[[Image:ue4_open_close_a_menu_widget.jpg|400px|right|thumb]]
[[Image:ue4_open_close_a_menu_widget.jpg|400px|right|thumb|Before "IsVisible" can use a reference, it had to be given data, e.g. at BeginPlay. See second image for details.]]
[[Image:ue4_create_widget_ref_after_BeginPlay.jpg|400px|right|thumb|"Cast To ..." node is used to get variables from other blueprints]]
[[Image:ue4_create_widget_ref_after_BeginPlay.jpg|400px|right|thumb|Creating a menu reference at BeginPlay. Reminder: "Cast To ..." node is used to get variables from another blueprint.]]
Any key can be used to open a menu. But when the game gets paused too then pressing the same key again cannot close the menu.
Any key can be used to open a menu. But when the game gets paused too then pressing the same key again cannot close the menu.


You need to set the key's property "Execute when Paused" to true.
You need to set the key's property "Execute when Paused" to true.


Also, in theory a flipflop node would work but has proven unreliable. Setup a reference to the menu instead and use it an "Is Visible" and a "Branch" (if) node.
Also, in theory a "Flipflop" node would work but has proven unreliable. Setup a reference to the menu instead and use it an "Is Visible" and a "Branch" (if) node.


If you use "Set Input Mode Game And UI" use the "Lock Always" option to capture the mouse with in the game application.
If you use "Set Input Mode Game And UI" use the "Lock Always" option to capture the mouse with in the game application.
8,046

edits