.. index:: pair: class; EE::UI::UIPopUp .. _doxid-class_e_e_1_1_u_i_1_1_u_i_pop_up: class EE::UI::UIPopUp ===================== .. toctree:: :hidden: Overview ~~~~~~~~ Shared popup placement and visibility helpers for anchored :ref:`UI ` controls. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class UIPopUp { public: // methods static :ref:`Vector2f` :ref:`findBestPosition`(:ref:`UIWidget`* popup, const :ref:`Vector2f`& position, :ref:`Node`* anchor = nullptr, bool trySides = false); static void :target:`align`(:ref:`UIWidget`* anchor, :ref:`UIWidget`* popup, bool popUpToRoot = false, bool centered = false); static bool :target:`hasFocus`(:ref:`UIWidget`* anchor, :ref:`UIWidget`* popup); static void :target:`show`(:ref:`UIWidget`* popup); static void :target:`hide`(:ref:`UIWidget`* popup); }; .. _details-class_e_e_1_1_u_i_1_1_u_i_pop_up: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Shared popup placement and visibility helpers for anchored :ref:`UI ` controls. The helper deliberately owns no widget lifetime or selection semantics. Callers decide when a popup should close and where focus returns; this only centralizes root/window parenting, below/above placement, scene-bound clamping and the standard eepp fade effects. Methods ------- .. index:: pair: function; findBestPosition .. _doxid-class_e_e_1_1_u_i_1_1_u_i_pop_up_1a40ddff1024d06c57bf66d8430e344d10: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Vector2f` findBestPosition(:ref:`UIWidget`* popup, const :ref:`Vector2f`& position, :ref:`Node`* anchor = nullptr, bool trySides = false) Returns a world-pixel position without reparenting or moving the popup. With an anchor, prefer below then above; trySides also permits right/left placement for trigger menus. Without an anchor, try the four quadrants around position for cursor menus.