Skip to content

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.

docs: the component reference has RectAnchors and the current Text and TextInput fields

yhh5748b11154a6
diff --git a/docs/astro/src/data/componentDocs.ts b/docs/astro/src/data/componentDocs.ts
index e644c02cb..82048d689 100644
--- a/docs/astro/src/data/componentDocs.ts
+++ b/docs/astro/src/data/componentDocs.ts
@@ -122,6 +122,7 @@ export const COMPONENT_DOCS: Record<string, ComponentDoc> = {
UIVisual: { category: 'ui', summary: 'What a UI node actually paints — a colour, a texture, or a nine-sliced sprite.', doc: 'ui/overview', anchor: 'uivisual-and-uimask', anchorZh: 'uivisual-与-uimask' },
UIMask: { category: 'ui', summary: "Clips descendants to this node's rect, with an optional alpha cutoff.", doc: 'ui/lists', anchor: 'clipping--uimask', anchorZh: '裁剪--uimask' },
ContentRect: { category: 'ui', summary: 'The rectangle world content occupies — a size and the pivot the transform sits on — that its sprite, text and clip mask follow.', doc: 'ui/overview', anchor: 'contentrect--a-rectangle-for-world-content', anchorZh: 'contentrect--世界内容的矩形' },
+ RectAnchors: { category: 'ui', summary: 'Pins content placed by its transform to the edges or the centre of its parent\'s ContentRect, or of the screen: each axis stretched, pinned to an edge, or centred, with margins in units or as a fraction.', doc: null },
UIScroll: { category: 'ui', summary: 'Scrollable content inside a clipped viewport, with momentum and scrollbars.', doc: 'ui/overview', anchor: 'scrolling', anchorZh: '滚动' },
FlexContainer: { category: 'ui', summary: 'Lays children out along an axis — direction, justification, alignment, wrapping and gaps.', doc: 'ui/layout', anchor: 'flexcontainer--laying-out-children', anchorZh: 'flexcontainer排布子项' },
Interactable: { category: 'ui', summary: 'Makes a UI node hit-testable, so pointer events can land on it.', doc: 'ui/interaction', anchor: 'hit-testing-interactable--uiinteraction', anchorZh: '命中测试interactable--uiinteraction' },
diff --git a/docs/astro/src/data/components.generated.json b/docs/astro/src/data/components.generated.json
index c70e528ff..ae01ab129 100644
--- a/docs/astro/src/data/components.generated.json
+++ b/docs/astro/src/data/components.generated.json
@@ -4591,6 +4591,97 @@
"inset"
]
},
+ {
+ "name": "RectAnchors",
+ "source": "ts",
+ "fields": [
+ {
+ "key": "alignFlags",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "left",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "right",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "top",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "bottom",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "horizontalCenter",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "verticalCenter",
+ "type": "number",
+ "default": "0"
+ },
+ {
+ "key": "isAbsLeft",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "isAbsRight",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "isAbsTop",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "isAbsBottom",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "isAbsHorizontalCenter",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "isAbsVerticalCenter",
+ "type": "boolean",
+ "default": "true"
+ },
+ {
+ "key": "alignMode",
+ "type": "number",
+ "default": "1"
+ },
+ {
+ "key": "enabled",
+ "type": "boolean",
+ "default": "true"
+ }
+ ],
+ "animatable": [
+ "alignFlags",
+ "left",
+ "right",
+ "top",
+ "bottom",
+ "horizontalCenter",
+ "verticalCenter",
+ "alignMode"
+ ]
+ },
{
"name": "ReflectionProbe",
"source": "cpp",
@@ -6518,6 +6609,12 @@
"type": "number",
"default": "0"
},
+ {
+ "key": "underline",
+ "type": "boolean",
+ "default": "false",
+ "doc": "Draw a line under each line of text, using the underscore of the font."
+ },
{
"key": "richText",
"type": "boolean",
@@ -6663,7 +6760,9 @@
"doc": "Which characters the field accepts. Digits keeps only 0-9, whether typed or pasted, for a count or a price.",
"values": [
"None",
- "Digits"
+ "Digits",
+ "Decimal",
+ "Phone"
]
},
{