载入中...
搜索中...
未找到
UIHost.cpp
浏览该文件的文档.
28bool UIHost::setTreeReconcile(WidgetDesc root) { return applyTreeReconcile(this, std::move(root)); }
127bool UIHost::setTextHandler(const std::string &id, std::function<void(const std::string &)> fn) {
ECS mount point for one UI panel/screen. Subclass to attach UI to game entities, e....
Definition UIHost.h:130
bool setTreeReconcile(WidgetDesc root)
Key-aware patch when structure matches; else full replace.
Definition UIHost.cpp:28
static UIHost * createHost(const std::string &name="")
Definition UIHost.cpp:11
void setCheckedById(const std::string &id, bool checked)
Definition UIHost.cpp:67
void setValueById(const std::string &id, float value)
Definition UIHost.cpp:71
bool setToggleHandler(const std::string &id, std::function< void(bool)> fn)
Definition UIHost.cpp:95
bool setTextHandler(const std::string &id, std::function< void(const std::string &)> fn)
Definition UIHost.cpp:127
bool setClickHandler(const std::string &id, std::function< void()> fn)
Installs a widget callback by node id (returns false if not found).
Definition UIHost.cpp:79
void setVisibleById(const std::string &id, bool visible)
Definition UIHost.cpp:63
UINode * findById(const std::string &id)
Looks up a node by id or reconciliation key.
Definition UIHost.cpp:41
void setValueTextById(const std::string &id, const std::string &value)
Definition UIHost.cpp:75
void setTextById(const std::string &id, const std::string &text)
Widget state updates by node id.
Definition UIHost.cpp:59
void setSimplePanel(const std::string &title, const std::string &labelText, const std::string &buttonText, const std::string &labelId="label", const std::string &buttonId="btn")
One-shot convenience panel: window + label + button.
Definition UIHost.cpp:30
bool setValueHandler(const std::string &id, std::function< void(float)> fn)
Definition UIHost.cpp:111
Definition Component.cpp:5
WidgetDesc window(std::string title, std::vector< WidgetDesc > children, std::string id)
Top-level window widget with a title bar.
Definition Widget.cpp:225
bool applyTreeReconcile(UIHost *host, WidgetDesc root)
Patch by key/id when structure (type + child keys) matches; otherwise full replace....
Definition Widget.cpp:490
WidgetDesc button(std::string label, std::string id, std::function< void()> onClick)
Clickable button; fires onClick.
Definition Widget.cpp:244
Retained UI widget node (arena tree). Conceptual counterpart of eve::scene::SceneNode; built declarat...
Definition UIHost.h:54
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
Definition Widget.h:13