Quickbar & Inventory Tabs
The tabbed quickbar is an Alpha feature, and can be turned off by setting the live config flag Inventory.UseTabbedQuickbar
to false.
Introduction
The quickbar is a generic shortcut interface for the items a user may hold. The tabbed interface categorizes the items and adapts to gameplay changes, while allowing projects to easily customize it.
Main features include:
Item filtering per-tab
Changing tab visibility based on runtime conditions
Managing tab items through an inventory view
Widget overview
A quickbar tab (a
M2_StandardButtonWidget
, with the button data defined in aM2_QuickbarTabBase
)A quickbar wrapper (containing a
M2_ItemQuickbarWidget
)A quickbar slot widget (created and managed by the
M2_ItemQuickbarWidget
)A non-quickbar button (the Inventory button in this case)
A generic item control container (an Overlay inside
WBP_AdditionalQuickbarWidgets
populated with the current item's controls)
Details on how to customize (1) Quickbar tabs are under Adding/removing available tabs & Creating a new tab type
Details on how to customize the rest of the widgets are under Customizing the quickbar's appearance
Customization
Adding/removing available tabs
Create or find the
M2M_TabbedQuickbarComponent
on your Player Character Morpheus Actor blueprintWith the component selected, find the Tabs Data array under the M2-Inventory category, and assign the desired tab classes. (See Creating a new tab type to make a new tab class)
The TabsData array on this component will be referenced by WBP_QuickbarTabManager
when constructing the required widgets.
Creating a new tab type
Create a BP inheriting from M2_QuickbarTabBase
Assign the Quickbar Wrapper class
๐ก If using a different quickbar view from the given wrapper, this can be overriden with "Quickbar View Class" (eg. Emote tab overrides the EquipmentQuickbarWidget's QuickbarView to allow only emote-type items) For more details on this, see Quickbar Views
Fill in the custom button data
๐ก Ensure that Common | Id has an unique value - this will be used by the
WBP_QuickbarTabManager
to identify this tabSet miscellaneous toggles
Show In Inventory - if true, this tab will have a category in the inventory as well
Force Hide - if true, the tab will be ignored and won't be shown in the quickbar or the inventory screen (see also Adding/removing available tabs -> Force-hiding tabs)
Optional - Runtime visibility conditions
You can conditionally modify a tab's visibility by overriding the
CanDisplay
function. TheUpdateVisibility
function on the tab must be called whenever the display conditions might've changed.๐ก The best practice here is to keep all visibility logic in the tab's BP, as
UpdateVisiblity
will check ifCanDisplay
is returning a different value, and call the appropriate delegates afterwards ๐ก When wishing to control tab visibility with external logic, additional variables can be created on the tab and modified with setter functions. Ensure that you callUpdateVisibility
after these variables change! ๐ก SeeBP_Origin_DirectorTab
as an example of complex visibility checks (roles and live config)
Customizing the quickbar's appearance
Config variables available in WBP_TabbedQuickbarUI
(as of March 2024):
Force Hide Inventory View - hides the inventory button (right side of quickbar)
Force Hide Place View - hides the place mode tab
Force Hide Unequip View - hides the unequip button (left side of quickbar)
Force Hide Separator Left/Right - hides the vertical bars on each side of the quickbar
Force Hide Quickbar Background - hides the background on the quickbar
Quickbar Background Color - sets the quickbar's background color (does not affect the tab button colors!)
Hidden/Visible Separator Size - used for the separator's spacings when visible/hidden
These variables should be set through the equivalent variables on the WBP_ItemManagement
widget in the HUD
Changing the item slot appearance in quickbar wrapper widgets
Extend from
WBP_EquipmentQuickbarWidget
orWBP_PlaceModeQuickbarWidget
Replace OverrideQuickbarSlotClass with your own slot class
Use your new quickbar wrapper in your
M2_QuickbarTabBase
BPs, and include this tab in the QuickbarTabManager's TabsData
Change the position of the item controls
Create a blueprint extending from
M2_AdditionalQuickbarWidgets
Ensure this widget will always have these overlays: ControlsContainer, FullscreenWidgetContainer. These will be referenced by the quickbar wrappers and their
M2_ItemQuickbarWidget
s๐ก Additional widgets can be placed around these overlays (eg. in
WBP_AdditionalQuickbarWidgets
,WBP_PersistentInfoWidget
is used for items with persistent effects)Replace the AdditionalQuickbarWidgets in your TabbedQuickbarUI with the new version
Last updated