中EN

UWidget / CommonActivatableWidget / CommonActivatableWidgetStack API

Markdown3 KB 原始文件
  • UWidget (5.8, UMG/Public/Components/Widget.h): "This is the base class for all wrapped Slate controls that are exposed to UObjects." Inherits UObject → UVisual → UWidget. TakeWidget(): "Gets the underlying slate widget or constructs it if it doesn't exist." RebuildWidget(): "Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed." SynchronizeProperties(): "Applies all properties to the native widget if possible." GetCachedWidget(). Derived classes include UUserWidget, UPanelWidget, UImage, UCommonActivatableWidgetContainerBase.
  • CommonActivatableWidget (python-api/class/CommonActivatableWidget?application_version=5.7; Plugin CommonUI, CommonActivatableWidget.h): "The base for widgets that are capable of being 'activated' and 'deactivated' during their lifetime without being otherwise modified or destroyed." Purposes: turn on/off without being removed from hierarchy or reconstructing SWidgets; built-in "go back" (breadcrumb, closing modal); defines a node-point in tree of activatable widgets through which input is routed. Defaults: not auto-activated on construction; does not register for back actions; if back handler, deactivated (not destroyed) on back. Destruct() always deactivates. Properties: auto_activate, is_back_handler, is_modal ("root node for input routing regardless of its actual parentage... ex: modal popup menu"), supports_activation_focus, auto_restore_focus, input_mapping (Enhanced Input mapping context applied/removed on activation/deactivation) + input_mapping_priority, activated/deactivated_visibility. Functions: activate_widget, deactivate_widget, bp_get_desired_focus_target, bp_get_desired_input_config ("when all widgets are deactivated, CommonUI will not attempt to automatically restore the input config"), bp_on_handle_back_action, request_refresh_focus.
  • CommonActivatableWidgetStack (python-api/class/CommonActivatableWidgetStack?application_version=5.4; CommonActivatableWidgetContainer.h): "A display stack of ActivatableWidget elements. Only the widget at the top of the stack is displayed and activated. All others are deactivated. When that top-most displayed widget deactivates, it's automatically removed and the preceding entry is displayed/activated. If RootContent is provided, it can never be removed."

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原