Window Framework for Unity UI Toolkit
Built-in Manipulators
- Window Dragging
- Window Resizing
- Tooltip (on hover) Displays
- Contextual Menu Activator
- Icon Dragging Experimental
- Single Click Selector Experimental
- Double Click Activator Experimental
Some manipulators are built-in and require no extra configuration. Others, such as the Context Menu, need additional setup.
Below you’ll find setup notes and options for each manipulator.
Window Dragging
The drag manipulator is part of the window header. It is enabled/disabled using AllowMove = true/false
.
Note: The window header must be visible for drag functionality. Hiding the header disables dragging.
Window Resizing
The resize manipulator appears in the lower-right of the window (footer). Enable/disable with AllowResize = true/false
.
Note: The footer must be visible to allow resizing. Hiding the footer disables resizing.
Tooltip Displays
Any UI element can show a tooltip by setting a value for its tooltip property. The ToolTip controller displays it on mouse hover.
Location parameters:
B:
below elementT:
above elementL:
left of elementR:
right of element
L:MyToolTip Text
to keep the tooltip visible.
Tooltips rely on scheduled runtime updates (1–3ms delays). If tooltips persistently display off-target, adjust these timing values for best results.
Applying Tooltips to new documents
Tooltips are applied at window creation but if you are instantiating new UXML docs at runtime and then adding them to the window then you will need to apply the tooltips to the root element of the new object
WindowFrameControler.Instance.ApplyTooltips(root_element);
Calling ApplyTooltips with no element passed in will cause the system to use the theme application method and apply tooltips to the entire UI.
Contextual (Right Click) Menu
A context menu can be attached to any UI element and populated at creation time. It is composed of two classes:
ContextMenuConfig
ContextMenuItem
Create a context menu configuration object as follows:
Example Context Menu Config Object
To attach a context menu to any Visual Element use the following code at the time of creation of the element:
MyVisualElement.AddManipulator(new ContextMenuActivator(Config));