A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: add a built-in widget gallery to the Widgets guide (en + zh)
yhhcaec620bd989
diff --git a/docs/astro/src/assets/guides/en/widgets-gallery.png b/docs/astro/src/assets/guides/en/widgets-gallery.pngnew file mode 100644index 000000000..286fb8462Binary files /dev/null and b/docs/astro/src/assets/guides/en/widgets-gallery.png differdiff --git a/docs/astro/src/assets/guides/zh/widgets-gallery.png b/docs/astro/src/assets/guides/zh/widgets-gallery.pngnew file mode 100644index 000000000..657453eb4Binary files /dev/null and b/docs/astro/src/assets/guides/zh/widgets-gallery.png differdiff --git a/docs/astro/src/content/docs/guides/ui-components.mdx b/docs/astro/src/content/docs/guides/ui-components.mdxindex c704f30e1..fe5a290c2 100644--- a/docs/astro/src/content/docs/guides/ui-components.mdx+++ b/docs/astro/src/content/docs/guides/ui-components.mdx@@ -32,6 +32,12 @@ with `focusable: false`.per-page field bindings, authorable in the editor.</Aside>+++*The built-in widgets (from the `ui-controls` example): a **Button**, a **Toggle**, a+**Slider**, a **Progress** bar, and buttons that open a **Dialog** and cycle an accent+color — each a plain entity tree with the UI components on it.*+## Button`createButton(opts)` spawns a clickable entity (with an optional child label) thatdiff --git a/docs/astro/src/content/docs/zh-cn/guides/ui-components.mdx b/docs/astro/src/content/docs/zh-cn/guides/ui-components.mdxindex bcdfd4f03..c3949483b 100644--- a/docs/astro/src/content/docs/zh-cn/guides/ui-components.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/ui-components.mdx@@ -28,6 +28,12 @@ Tab 能到达、Enter/Space 能点击、方向键能驱动滑块——用 `focus绑定,可在编辑器里授权。</Aside>+++*内置控件(取自 `ui-controls` 示例):一个 **Button(按钮)**、一个 **Toggle(开关)**、一个+**Slider(滑块)**、一个 **Progress(进度条)**,以及打开 **Dialog(对话框)** 和切换强调色的+按钮——每个都只是挂了 UI 组件的普通实体树。*+## Button 按钮`createButton(opts)` 生成一个可点击实体(带可选子标签),在各视觉状态间过渡。返回 `ButtonHandle`。