@minecraft/server-ui 2.2.0-beta.1.26.40-preview.26 → 2.2.0-beta.1.26.40-preview.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +48 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -498,6 +498,31 @@ export class CustomForm {
|
|
|
498
498
|
* {@link InvalidFormModificationError}
|
|
499
499
|
*/
|
|
500
500
|
header(text: ObservableString | ObservableUIRawMessage | string | UIRawMessage, options?: TextOptions): CustomForm;
|
|
501
|
+
/**
|
|
502
|
+
* @beta
|
|
503
|
+
* @remarks
|
|
504
|
+
* Adds an image component to the form layout.
|
|
505
|
+
*
|
|
506
|
+
* This function can't be called in restricted-execution mode.
|
|
507
|
+
*
|
|
508
|
+
* @param src
|
|
509
|
+
* The image source path to display. Must be a relative path to
|
|
510
|
+
* an image file within the provided pack.
|
|
511
|
+
* @param pack
|
|
512
|
+
* The resource pack identifier that contains the provided
|
|
513
|
+
* image source.
|
|
514
|
+
* @param options
|
|
515
|
+
* Optional configuration for the image, such as visibility or
|
|
516
|
+
* width.
|
|
517
|
+
* @returns
|
|
518
|
+
* The form instance to allow method chaining.
|
|
519
|
+
* @throws This function can throw errors.
|
|
520
|
+
*
|
|
521
|
+
* {@link InvalidFormModificationError}
|
|
522
|
+
*
|
|
523
|
+
* {@link InvalidObservableError}
|
|
524
|
+
*/
|
|
525
|
+
image(src: ObservableString | string, pack: ObservableString | string, options?: ImageOptions): CustomForm;
|
|
501
526
|
/**
|
|
502
527
|
* @remarks
|
|
503
528
|
* Returns true if the form is currently being shown to the
|
|
@@ -1602,6 +1627,29 @@ export interface DropdownOptions {
|
|
|
1602
1627
|
visible?: boolean | ObservableBoolean;
|
|
1603
1628
|
}
|
|
1604
1629
|
|
|
1630
|
+
/**
|
|
1631
|
+
* @beta
|
|
1632
|
+
* Options for configuring an image component.
|
|
1633
|
+
*/
|
|
1634
|
+
export interface ImageOptions {
|
|
1635
|
+
/**
|
|
1636
|
+
* @remarks
|
|
1637
|
+
* When false or bound to a false ObservableBoolean, the image
|
|
1638
|
+
* is hidden.
|
|
1639
|
+
*
|
|
1640
|
+
*/
|
|
1641
|
+
visible?: boolean | ObservableBoolean;
|
|
1642
|
+
/**
|
|
1643
|
+
* @remarks
|
|
1644
|
+
* Sets the width of the image as a percentage of the width of
|
|
1645
|
+
* the form. 1 is the entire form width, 0.5 is half of the
|
|
1646
|
+
* form width. Greater than 1 or less than/equal to 0 will
|
|
1647
|
+
* become 1.
|
|
1648
|
+
*
|
|
1649
|
+
*/
|
|
1650
|
+
width?: number | ObservableNumber;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1605
1653
|
/**
|
|
1606
1654
|
* The result returned when an MessageBox is closed. Contains
|
|
1607
1655
|
* the reason the message box was closed and the player's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-ui",
|
|
3
|
-
"version": "2.2.0-beta.1.26.40-preview.
|
|
3
|
+
"version": "2.2.0-beta.1.26.40-preview.29",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^2.0.0 || ^2.10.0-beta.1.26.40-preview.
|
|
17
|
+
"@minecraft/server": "^2.0.0 || ^2.10.0-beta.1.26.40-preview.29"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|