{"id":10492,"date":"2024-07-13T10:59:17","date_gmt":"2024-07-13T08:59:17","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=10492"},"modified":"2026-03-09T22:48:00","modified_gmt":"2026-03-09T20:48:00","slug":"ue5-prevent-menu-anchor-creating-new-window","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/ue5-prevent-menu-anchor-creating-new-window\/","title":{"rendered":"UE5: Prevent Menu Anchor creating new Window"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10492\" class=\"elementor elementor-10492\" data-elementor-post-type=\"asx-lms-tutorial-cpt\">\n\t\t\t\t<div class=\"elementor-element elementor-element-cfce6de e-flex e-con-boxed e-con e-parent\" data-id=\"cfce6de\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-553da00 elementor-widget elementor-widget-text-editor\" data-id=\"553da00\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Small but useful tip:<br \/>Somewhere along the parent hierachy of the Menu Anchor, one of the Parent&#8217;s should override OnQueryPopupMethod and reply with CurrentWindow:<br \/><br \/><br \/><br \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c80c91f elementor-widget elementor-widget-code-highlight\" data-id=\"c80c91f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-cpp line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-cpp\">\n\t\t\t\t\t<xmp>\t\/**\r\n\t * Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window.\r\n\t * This can be set explicitly on SMenuAnchor, or can be determined by a scoping widget.\r\n\t * A scoping widget can reply to OnQueryPopupMethod() to drive all its descendants'\r\n\t * poup methods.\r\n\t *\r\n\t * e.g. Fullscreen games cannot summon a new window, so game SViewports will reply with\r\n\t *      EPopupMethod::UserCurrentWindow. This makes all the menu anchors within them\r\n\t *      use the current window.\r\n\t *\/\r\n\tvirtual FPopupMethodReply OnQueryPopupMethod() const override\r\n\t{\r\n\t    \/\/EG:\r\n\t    return FPopupMethodReply::UseMethod(EPopupMethod::UseCurrentWindow);\r\n\t}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":0,"template":"","asx-lms-tutorial-categories":[45,58],"asx-lms-tutorial-tags":[95],"class_list":["post-10492","asx-lms-tutorial-cpt","type-asx-lms-tutorial-cpt","status-publish","hentry","asx-lms-tutorial-categories-unreal-engine","asx-lms-tutorial-categories-unreal-c-api","asx-lms-tutorial-tags-slate","entry"],"acf":[],"_links":{"self":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/10492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt"}],"about":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/types\/asx-lms-tutorial-cpt"}],"version-history":[{"count":0,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/10492\/revisions"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=10492"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=10492"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=10492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}