载入中...
搜索中...
未找到
UiRuntime.cpp
浏览该文件的文档.
31 if (type == "row" || type == "column") return eve::editing::applied<ui::NodeType>(ui::NodeType::Flex);
44 return eve::editing::failed<ui::WidgetDesc>(EditorStatus::NotFound, RuleId("editor.ui.widget-not-found"),
61 .withAbsolute(static_cast<float>(widget.layout.anchorX), static_cast<float>(widget.layout.anchorY),
64 .withMargin(static_cast<float>(widget.style.marginLeft), static_cast<float>(widget.style.marginTop),
66 .withPadding(static_cast<float>(widget.style.paddingLeft), static_cast<float>(widget.style.paddingTop),
74 const bool supportsTexture = result.type == ui::NodeType::Image || result.type == ui::NodeType::ImageButton ||
118 result.flexDirection = widget.type == "column" || (widget.type != "row" && widget.style.direction == "column")
142Result<void> UiDocumentRuntimeBridge::publish(const UiDocumentTarget& document, const ObjectId& root, ui::UIHost* host,
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
ECS mount point for one UI panel/screen. Subclass to attach UI to game entities, e....
Definition UIHost.h:284
Result< void > publish(const UiDocumentTarget &document, const ObjectId &root, ui::UIHost *host, const UiTextureResolver &textures={}) const
Reconciles a document subtree atomically; unsupported content leaves the host unchanged....
Definition UiRuntime.cpp:142
Serializable UI authoring document with hierarchy and inspector capabilities.
Definition UiDocument.h:157
ui_editing::UiWidgetSnapshot UiWidgetSnapshot
Definition EditorUiDocumentTarget.h:9
Definition UiDocument.cpp:9
std::function< Result< std::uint64_t >(const std::string &)> UiTextureResolver
Resolves authored texture asset keys to existing UI backend registrations. @ownership Caller owns tex...
Definition UiDocument.h:279
@ Column
@ Ignore
@ InputText
@ Group
@ ImageButton
@ Flex
@ Card
@ Sidebar
@ Slider
@ NinePatchPanel
@ RadialFill
@ Progress
@ Checkbox
@ Button
@ Viewport
@ SplitPane
@ Text
@ FilledImage
@ Image
@ Window
@ Toolbar
@ None
@ Center
@ Start
@ SpaceAround
@ SpaceBetween
@ Center
@ Start
@ Stretch