@drincs/pixi-vn 0.6.4 → 0.6.6
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/README.md +56 -7
- package/dist/classes/CharacterBaseModel.js +99 -90
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs +99 -90
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOption.d.mts +71 -8
- package/dist/classes/ChoiceMenuOption.d.ts +71 -8
- package/dist/classes/ChoiceMenuOption.js +160 -77
- package/dist/classes/ChoiceMenuOption.js.map +1 -1
- package/dist/classes/ChoiceMenuOption.mjs +160 -77
- package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
- package/dist/classes/CloseLabel.d.mts +3 -1
- package/dist/classes/CloseLabel.d.ts +3 -1
- package/dist/classes/CloseLabel.js +77 -32
- package/dist/classes/CloseLabel.js.map +1 -1
- package/dist/classes/CloseLabel.mjs +77 -32
- package/dist/classes/CloseLabel.mjs.map +1 -1
- package/dist/classes/Label.d.mts +6 -33
- package/dist/classes/Label.d.ts +6 -33
- package/dist/classes/Label.js +74 -31
- package/dist/classes/Label.js.map +1 -1
- package/dist/classes/Label.mjs +74 -31
- package/dist/classes/Label.mjs.map +1 -1
- package/dist/classes/LabelAbstract.d.mts +50 -0
- package/dist/classes/LabelAbstract.d.ts +50 -0
- package/dist/classes/LabelAbstract.js +100 -0
- package/dist/classes/LabelAbstract.js.map +1 -0
- package/dist/classes/LabelAbstract.mjs +98 -0
- package/dist/classes/LabelAbstract.mjs.map +1 -0
- package/dist/classes/LabelJson.d.mts +30 -0
- package/dist/classes/LabelJson.d.ts +30 -0
- package/dist/classes/LabelJson.js +2766 -0
- package/dist/classes/LabelJson.js.map +1 -0
- package/dist/classes/LabelJson.mjs +2760 -0
- package/dist/classes/LabelJson.mjs.map +1 -0
- package/dist/classes/StoredClassModel.js +42 -33
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs +42 -33
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/canvas/CanvasContainer.js +2 -2
- package/dist/classes/canvas/CanvasContainer.js.map +1 -1
- package/dist/classes/canvas/CanvasContainer.mjs +2 -2
- package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
- package/dist/classes/canvas/CanvasImage.js +2 -2
- package/dist/classes/canvas/CanvasImage.js.map +1 -1
- package/dist/classes/canvas/CanvasImage.mjs +2 -2
- package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
- package/dist/classes/canvas/CanvasSprite.js +2 -2
- package/dist/classes/canvas/CanvasSprite.js.map +1 -1
- package/dist/classes/canvas/CanvasSprite.mjs +2 -2
- package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
- package/dist/classes/canvas/CanvasText.js +2 -2
- package/dist/classes/canvas/CanvasText.js.map +1 -1
- package/dist/classes/canvas/CanvasText.mjs +2 -2
- package/dist/classes/canvas/CanvasText.mjs.map +1 -1
- package/dist/classes/canvas/index.js +2 -2
- package/dist/classes/canvas/index.js.map +1 -1
- package/dist/classes/canvas/index.mjs +2 -2
- package/dist/classes/canvas/index.mjs.map +1 -1
- package/dist/classes/index.d.mts +6 -1
- package/dist/classes/index.d.ts +6 -1
- package/dist/classes/index.js +945 -78
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +945 -79
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.js +42 -33
- package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.mjs +42 -33
- package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
- package/dist/classes/ticker/MoveTicker.d.mts +1 -0
- package/dist/classes/ticker/MoveTicker.d.ts +1 -0
- package/dist/classes/ticker/MoveTicker.js +42 -33
- package/dist/classes/ticker/MoveTicker.js.map +1 -1
- package/dist/classes/ticker/MoveTicker.mjs +42 -33
- package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
- package/dist/classes/ticker/RotateTicker.d.mts +1 -0
- package/dist/classes/ticker/RotateTicker.d.ts +1 -0
- package/dist/classes/ticker/RotateTicker.js +42 -33
- package/dist/classes/ticker/RotateTicker.js.map +1 -1
- package/dist/classes/ticker/RotateTicker.mjs +42 -33
- package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
- package/dist/classes/ticker/ZoomTicker.d.mts +1 -0
- package/dist/classes/ticker/ZoomTicker.d.ts +1 -0
- package/dist/classes/ticker/ZoomTicker.js +42 -33
- package/dist/classes/ticker/ZoomTicker.js.map +1 -1
- package/dist/classes/ticker/ZoomTicker.mjs +42 -33
- package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
- package/dist/classes/ticker/index.js +42 -33
- package/dist/classes/ticker/index.js.map +1 -1
- package/dist/classes/ticker/index.mjs +42 -33
- package/dist/classes/ticker/index.mjs.map +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/constants.mjs.map +1 -1
- package/dist/decorators/CanvasElementDecorator.js +2 -2
- package/dist/decorators/CanvasElementDecorator.js.map +1 -1
- package/dist/decorators/CanvasElementDecorator.mjs +2 -2
- package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
- package/dist/decorators/LabelDecorator.d.mts +19 -5
- package/dist/decorators/LabelDecorator.d.ts +19 -5
- package/dist/decorators/LabelDecorator.js +102 -65
- package/dist/decorators/LabelDecorator.js.map +1 -1
- package/dist/decorators/LabelDecorator.mjs +102 -66
- package/dist/decorators/LabelDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +10 -2
- package/dist/decorators/index.d.ts +10 -2
- package/dist/decorators/index.js +98 -65
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +98 -65
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/CanvasUtility.js +2 -2
- package/dist/functions/CanvasUtility.js.map +1 -1
- package/dist/functions/CanvasUtility.mjs +2 -2
- package/dist/functions/CanvasUtility.mjs.map +1 -1
- package/dist/functions/DialogueUtility.d.mts +10 -8
- package/dist/functions/DialogueUtility.d.ts +10 -8
- package/dist/functions/DialogueUtility.js +268 -131
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +268 -131
- package/dist/functions/DialogueUtility.mjs.map +1 -1
- package/dist/functions/FlagsUtility.js +42 -33
- package/dist/functions/FlagsUtility.js.map +1 -1
- package/dist/functions/FlagsUtility.mjs +42 -33
- package/dist/functions/FlagsUtility.mjs.map +1 -1
- package/dist/functions/GameUtility.js +42 -33
- package/dist/functions/GameUtility.js.map +1 -1
- package/dist/functions/GameUtility.mjs +42 -33
- package/dist/functions/GameUtility.mjs.map +1 -1
- package/dist/functions/ImageUtility.js +45 -36
- package/dist/functions/ImageUtility.js.map +1 -1
- package/dist/functions/ImageUtility.mjs +45 -36
- package/dist/functions/ImageUtility.mjs.map +1 -1
- package/dist/functions/Importer.d.mts +24 -0
- package/dist/functions/Importer.d.ts +24 -0
- package/dist/functions/Importer.js +2804 -0
- package/dist/functions/Importer.js.map +1 -0
- package/dist/functions/Importer.mjs +2798 -0
- package/dist/functions/Importer.mjs.map +1 -0
- package/dist/functions/SavesUtility.d.mts +5 -3
- package/dist/functions/SavesUtility.d.ts +5 -3
- package/dist/functions/SavesUtility.js +310 -145
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +310 -145
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/TickerUtility.d.mts +2 -1
- package/dist/functions/TickerUtility.d.ts +2 -1
- package/dist/functions/TickerUtility.js +19 -15
- package/dist/functions/TickerUtility.js.map +1 -1
- package/dist/functions/TickerUtility.mjs +19 -15
- package/dist/functions/TickerUtility.mjs.map +1 -1
- package/dist/functions/index.d.mts +7 -2
- package/dist/functions/index.d.ts +7 -2
- package/dist/functions/index.js +364 -140
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +364 -141
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +453 -219
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +453 -221
- package/dist/index.mjs.map +1 -1
- package/dist/interface/IHistoryStep.d.mts +3 -1
- package/dist/interface/IHistoryStep.d.ts +3 -1
- package/dist/interface/ISaveData.d.mts +3 -1
- package/dist/interface/ISaveData.d.ts +3 -1
- package/dist/interface/LabelProps.d.mts +38 -0
- package/dist/interface/LabelProps.d.ts +38 -0
- package/dist/interface/LabelProps.js +4 -0
- package/dist/interface/LabelProps.js.map +1 -0
- package/dist/interface/LabelProps.mjs +3 -0
- package/dist/interface/LabelProps.mjs.map +1 -0
- package/dist/interface/export/ExportedStep.d.mts +3 -1
- package/dist/interface/export/ExportedStep.d.ts +3 -1
- package/dist/interface/export/index.d.mts +3 -1
- package/dist/interface/export/index.d.ts +3 -1
- package/dist/interface/index.d.mts +3 -1
- package/dist/interface/index.d.ts +3 -1
- package/dist/labels/BaseCanvasElementTestLabel.d.mts +3 -1
- package/dist/labels/BaseCanvasElementTestLabel.d.ts +3 -1
- package/dist/labels/BaseCanvasElementTestLabel.js +303 -136
- package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.mjs +304 -137
- package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.d.mts +4 -5
- package/dist/labels/CanvasEventsTestLabel.d.ts +4 -5
- package/dist/labels/CanvasEventsTestLabel.js +313 -148
- package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.mjs +314 -149
- package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +3 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +3 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +294 -133
- package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +295 -134
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.mts +3 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.ts +3 -1
- package/dist/labels/ImagesAnimationsTestLabel.js +298 -181
- package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.mjs +299 -182
- package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
- package/dist/labels/MarkdownTest.d.mts +3 -1
- package/dist/labels/MarkdownTest.d.ts +3 -1
- package/dist/labels/MarkdownTest.js +294 -133
- package/dist/labels/MarkdownTest.js.map +1 -1
- package/dist/labels/MarkdownTest.mjs +294 -133
- package/dist/labels/MarkdownTest.mjs.map +1 -1
- package/dist/labels/StartLabel.d.mts +3 -1
- package/dist/labels/StartLabel.d.ts +3 -1
- package/dist/labels/StartLabel.js +360 -213
- package/dist/labels/StartLabel.js.map +1 -1
- package/dist/labels/StartLabel.mjs +361 -214
- package/dist/labels/StartLabel.mjs.map +1 -1
- package/dist/labels/StepLabelTest.d.mts +11 -0
- package/dist/labels/StepLabelTest.d.ts +11 -0
- package/dist/labels/StepLabelTest.js +2861 -0
- package/dist/labels/StepLabelTest.js.map +1 -0
- package/dist/labels/StepLabelTest.mjs +2855 -0
- package/dist/labels/StepLabelTest.mjs.map +1 -0
- package/dist/labels/TestConstant.js +43 -34
- package/dist/labels/TestConstant.js.map +1 -1
- package/dist/labels/TestConstant.mjs +43 -34
- package/dist/labels/TestConstant.mjs.map +1 -1
- package/dist/labels/index.d.mts +3 -1
- package/dist/labels/index.d.ts +3 -1
- package/dist/labels/index.js +360 -213
- package/dist/labels/index.js.map +1 -1
- package/dist/labels/index.mjs +361 -214
- package/dist/labels/index.mjs.map +1 -1
- package/dist/managers/StepManager.d.mts +10 -7
- package/dist/managers/StepManager.d.ts +10 -7
- package/dist/managers/StepManager.js +300 -139
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +300 -139
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/WindowManager.js +2 -2
- package/dist/managers/WindowManager.js.map +1 -1
- package/dist/managers/WindowManager.mjs +2 -2
- package/dist/managers/WindowManager.mjs.map +1 -1
- package/dist/managers/index.d.mts +7 -5
- package/dist/managers/index.d.ts +7 -5
- package/dist/managers/index.js +300 -139
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +300 -139
- package/dist/managers/index.mjs.map +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.mts +3 -1
- package/dist/types/ChoiceMenuOptionsType.d.ts +3 -1
- package/dist/types/LabelJsonType.d.mts +22 -0
- package/dist/types/LabelJsonType.d.ts +22 -0
- package/dist/types/LabelJsonType.js +4 -0
- package/dist/types/LabelJsonType.js.map +1 -0
- package/dist/types/LabelJsonType.mjs +3 -0
- package/dist/types/LabelJsonType.mjs.map +1 -0
- package/dist/types/StepLabelJsonType.d.mts +30 -0
- package/dist/types/StepLabelJsonType.d.ts +30 -0
- package/dist/types/StepLabelJsonType.js +4 -0
- package/dist/types/StepLabelJsonType.js.map +1 -0
- package/dist/types/StepLabelJsonType.mjs +3 -0
- package/dist/types/StepLabelJsonType.mjs.map +1 -0
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +7 -6
|
@@ -3,15 +3,17 @@ import { StorageObjectType } from '../types/StorageElementType.mjs';
|
|
|
3
3
|
import Label from './Label.mjs';
|
|
4
4
|
import { CloseType } from '../types/CloseType.mjs';
|
|
5
5
|
import LabelRunModeType from '../types/LabelRunModeType.mjs';
|
|
6
|
-
import '../types/StepHistoryDataType.mjs';
|
|
7
6
|
import '../types/StepLabelType.mjs';
|
|
8
7
|
import '@drincs/pixi-vn/dist/override';
|
|
8
|
+
import './LabelAbstract.mjs';
|
|
9
|
+
import '../types/StepHistoryDataType.mjs';
|
|
10
|
+
import '../interface/LabelProps.mjs';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* ChoiceMenuOption is a class that contains a Label and a text that will be displayed in the menu.
|
|
12
14
|
* @example
|
|
13
15
|
* ```typescript
|
|
14
|
-
* new ChoiceMenuOption("Hello", HelloLabel)
|
|
16
|
+
* new ChoiceMenuOption("Hello", HelloLabel, {})
|
|
15
17
|
* ```
|
|
16
18
|
*/
|
|
17
19
|
declare class ChoiceMenuOption<T extends StorageObjectType> {
|
|
@@ -19,25 +21,46 @@ declare class ChoiceMenuOption<T extends StorageObjectType> {
|
|
|
19
21
|
* Text to be displayed in the menu
|
|
20
22
|
*/
|
|
21
23
|
text: string;
|
|
24
|
+
private _label;
|
|
22
25
|
/**
|
|
23
26
|
* Label to be opened when the option is selected
|
|
24
27
|
*/
|
|
25
|
-
label: Label<T>;
|
|
28
|
+
get label(): Label<T>;
|
|
26
29
|
/**
|
|
27
30
|
* Type of the label to be opened
|
|
28
31
|
*/
|
|
29
32
|
type: LabelRunModeType;
|
|
30
33
|
/**
|
|
31
|
-
* Properties to be passed to the label
|
|
34
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* setChoiceMenuOptions([
|
|
38
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
39
|
+
* ])
|
|
40
|
+
* return <List>
|
|
41
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
42
|
+
* return (
|
|
43
|
+
* <ChoiceButton
|
|
44
|
+
* disabled={item.props.disabled}
|
|
45
|
+
* onClick={() => {
|
|
46
|
+
* afterSelectChoice(item)
|
|
47
|
+
* }}
|
|
48
|
+
* >
|
|
49
|
+
* {item.text}
|
|
50
|
+
* </ChoiceButton>
|
|
51
|
+
* )
|
|
52
|
+
* })}
|
|
53
|
+
* </List>
|
|
54
|
+
* ```
|
|
32
55
|
*/
|
|
33
56
|
props: StorageObjectType;
|
|
34
57
|
/**
|
|
35
58
|
* @param text Text to be displayed in the menu
|
|
36
59
|
* @param label Label to be opened when the option is selected or the id of the label
|
|
60
|
+
* @param props Properties to be passed to the label and olther parameters that you can use when get all the choice menu options. It be converted to a JSON string, so it cannot contain functions or classes.
|
|
37
61
|
* @param type Type of the label to be opened. @default "call"
|
|
38
|
-
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes. @default {}
|
|
39
62
|
*/
|
|
40
|
-
constructor(text: string, label: Label<T> | LabelIdType,
|
|
63
|
+
constructor(text: string, label: Label<T> | LabelIdType, props: T, type?: LabelRunModeType);
|
|
41
64
|
}
|
|
42
65
|
/**
|
|
43
66
|
* ChoiceMenuOptionClose is a class that contains a text that will be displayed in the menu.
|
|
@@ -65,7 +88,27 @@ declare class ChoiceMenuOptionClose<T extends {} = {}> {
|
|
|
65
88
|
*/
|
|
66
89
|
type: CloseType;
|
|
67
90
|
/**
|
|
68
|
-
* Properties to be passed to the label
|
|
91
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
92
|
+
* @example
|
|
93
|
+
* ```tsx
|
|
94
|
+
* setChoiceMenuOptions([
|
|
95
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
96
|
+
* ])
|
|
97
|
+
* return <List>
|
|
98
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
99
|
+
* return (
|
|
100
|
+
* <ChoiceButton
|
|
101
|
+
* disabled={item.props.disabled}
|
|
102
|
+
* onClick={() => {
|
|
103
|
+
* afterSelectChoice(item)
|
|
104
|
+
* }}
|
|
105
|
+
* >
|
|
106
|
+
* {item.text}
|
|
107
|
+
* </ChoiceButton>
|
|
108
|
+
* )
|
|
109
|
+
* })}
|
|
110
|
+
* </List>
|
|
111
|
+
* ```
|
|
69
112
|
*/
|
|
70
113
|
props: StorageObjectType;
|
|
71
114
|
/**
|
|
@@ -88,7 +131,27 @@ type IStoratedChoiceMenuOption = {
|
|
|
88
131
|
*/
|
|
89
132
|
type: LabelRunModeType;
|
|
90
133
|
/**
|
|
91
|
-
* Properties to be passed to the label
|
|
134
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* setChoiceMenuOptions([
|
|
138
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
139
|
+
* ])
|
|
140
|
+
* return <List>
|
|
141
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
142
|
+
* return (
|
|
143
|
+
* <ChoiceButton
|
|
144
|
+
* disabled={item.props.disabled}
|
|
145
|
+
* onClick={() => {
|
|
146
|
+
* afterSelectChoice(item)
|
|
147
|
+
* }}
|
|
148
|
+
* >
|
|
149
|
+
* {item.text}
|
|
150
|
+
* </ChoiceButton>
|
|
151
|
+
* )
|
|
152
|
+
* })}
|
|
153
|
+
* </List>
|
|
154
|
+
* ```
|
|
92
155
|
*/
|
|
93
156
|
props: StorageObjectType;
|
|
94
157
|
} | {
|
|
@@ -3,15 +3,17 @@ import { StorageObjectType } from '../types/StorageElementType.js';
|
|
|
3
3
|
import Label from './Label.js';
|
|
4
4
|
import { CloseType } from '../types/CloseType.js';
|
|
5
5
|
import LabelRunModeType from '../types/LabelRunModeType.js';
|
|
6
|
-
import '../types/StepHistoryDataType.js';
|
|
7
6
|
import '../types/StepLabelType.js';
|
|
8
7
|
import '@drincs/pixi-vn/dist/override';
|
|
8
|
+
import './LabelAbstract.js';
|
|
9
|
+
import '../types/StepHistoryDataType.js';
|
|
10
|
+
import '../interface/LabelProps.js';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* ChoiceMenuOption is a class that contains a Label and a text that will be displayed in the menu.
|
|
12
14
|
* @example
|
|
13
15
|
* ```typescript
|
|
14
|
-
* new ChoiceMenuOption("Hello", HelloLabel)
|
|
16
|
+
* new ChoiceMenuOption("Hello", HelloLabel, {})
|
|
15
17
|
* ```
|
|
16
18
|
*/
|
|
17
19
|
declare class ChoiceMenuOption<T extends StorageObjectType> {
|
|
@@ -19,25 +21,46 @@ declare class ChoiceMenuOption<T extends StorageObjectType> {
|
|
|
19
21
|
* Text to be displayed in the menu
|
|
20
22
|
*/
|
|
21
23
|
text: string;
|
|
24
|
+
private _label;
|
|
22
25
|
/**
|
|
23
26
|
* Label to be opened when the option is selected
|
|
24
27
|
*/
|
|
25
|
-
label: Label<T>;
|
|
28
|
+
get label(): Label<T>;
|
|
26
29
|
/**
|
|
27
30
|
* Type of the label to be opened
|
|
28
31
|
*/
|
|
29
32
|
type: LabelRunModeType;
|
|
30
33
|
/**
|
|
31
|
-
* Properties to be passed to the label
|
|
34
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* setChoiceMenuOptions([
|
|
38
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
39
|
+
* ])
|
|
40
|
+
* return <List>
|
|
41
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
42
|
+
* return (
|
|
43
|
+
* <ChoiceButton
|
|
44
|
+
* disabled={item.props.disabled}
|
|
45
|
+
* onClick={() => {
|
|
46
|
+
* afterSelectChoice(item)
|
|
47
|
+
* }}
|
|
48
|
+
* >
|
|
49
|
+
* {item.text}
|
|
50
|
+
* </ChoiceButton>
|
|
51
|
+
* )
|
|
52
|
+
* })}
|
|
53
|
+
* </List>
|
|
54
|
+
* ```
|
|
32
55
|
*/
|
|
33
56
|
props: StorageObjectType;
|
|
34
57
|
/**
|
|
35
58
|
* @param text Text to be displayed in the menu
|
|
36
59
|
* @param label Label to be opened when the option is selected or the id of the label
|
|
60
|
+
* @param props Properties to be passed to the label and olther parameters that you can use when get all the choice menu options. It be converted to a JSON string, so it cannot contain functions or classes.
|
|
37
61
|
* @param type Type of the label to be opened. @default "call"
|
|
38
|
-
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes. @default {}
|
|
39
62
|
*/
|
|
40
|
-
constructor(text: string, label: Label<T> | LabelIdType,
|
|
63
|
+
constructor(text: string, label: Label<T> | LabelIdType, props: T, type?: LabelRunModeType);
|
|
41
64
|
}
|
|
42
65
|
/**
|
|
43
66
|
* ChoiceMenuOptionClose is a class that contains a text that will be displayed in the menu.
|
|
@@ -65,7 +88,27 @@ declare class ChoiceMenuOptionClose<T extends {} = {}> {
|
|
|
65
88
|
*/
|
|
66
89
|
type: CloseType;
|
|
67
90
|
/**
|
|
68
|
-
* Properties to be passed to the label
|
|
91
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
92
|
+
* @example
|
|
93
|
+
* ```tsx
|
|
94
|
+
* setChoiceMenuOptions([
|
|
95
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
96
|
+
* ])
|
|
97
|
+
* return <List>
|
|
98
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
99
|
+
* return (
|
|
100
|
+
* <ChoiceButton
|
|
101
|
+
* disabled={item.props.disabled}
|
|
102
|
+
* onClick={() => {
|
|
103
|
+
* afterSelectChoice(item)
|
|
104
|
+
* }}
|
|
105
|
+
* >
|
|
106
|
+
* {item.text}
|
|
107
|
+
* </ChoiceButton>
|
|
108
|
+
* )
|
|
109
|
+
* })}
|
|
110
|
+
* </List>
|
|
111
|
+
* ```
|
|
69
112
|
*/
|
|
70
113
|
props: StorageObjectType;
|
|
71
114
|
/**
|
|
@@ -88,7 +131,27 @@ type IStoratedChoiceMenuOption = {
|
|
|
88
131
|
*/
|
|
89
132
|
type: LabelRunModeType;
|
|
90
133
|
/**
|
|
91
|
-
* Properties to be passed to the label
|
|
134
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* setChoiceMenuOptions([
|
|
138
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
139
|
+
* ])
|
|
140
|
+
* return <List>
|
|
141
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
142
|
+
* return (
|
|
143
|
+
* <ChoiceButton
|
|
144
|
+
* disabled={item.props.disabled}
|
|
145
|
+
* onClick={() => {
|
|
146
|
+
* afterSelectChoice(item)
|
|
147
|
+
* }}
|
|
148
|
+
* >
|
|
149
|
+
* {item.text}
|
|
150
|
+
* </ChoiceButton>
|
|
151
|
+
* )
|
|
152
|
+
* })}
|
|
153
|
+
* </List>
|
|
154
|
+
* ```
|
|
92
155
|
*/
|
|
93
156
|
props: StorageObjectType;
|
|
94
157
|
} | {
|
|
@@ -135,8 +135,6 @@ function getMemoryContainer(element) {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
function setMemoryContainer(element, memory) {
|
|
138
|
-
memory.width && (element.width = memory.width);
|
|
139
|
-
memory.height && (element.height = memory.height);
|
|
140
138
|
memory.isRenderGroup && (element.isRenderGroup = memory.isRenderGroup);
|
|
141
139
|
memory.blendMode && (element.blendMode = memory.blendMode);
|
|
142
140
|
memory.tint && (element.tint = memory.tint);
|
|
@@ -169,6 +167,8 @@ function setMemoryContainer(element, memory) {
|
|
|
169
167
|
memory.interactive && (element.interactive = memory.interactive);
|
|
170
168
|
memory.interactiveChildren && (element.interactiveChildren = memory.interactiveChildren);
|
|
171
169
|
memory.hitArea && (element.hitArea = memory.hitArea);
|
|
170
|
+
memory.width && (element.width = memory.width);
|
|
171
|
+
memory.height && (element.height = memory.height);
|
|
172
172
|
}
|
|
173
173
|
function getTexture(imageUrl) {
|
|
174
174
|
return __async(this, null, function* () {
|
|
@@ -544,19 +544,18 @@ function checkIfStepsIsEqual(step1, step2) {
|
|
|
544
544
|
return step1 === step2;
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
// src/classes/
|
|
548
|
-
var
|
|
547
|
+
// src/classes/LabelAbstract.ts
|
|
548
|
+
var LabelAbstract = class {
|
|
549
549
|
/**
|
|
550
550
|
* @param id is the id of the label
|
|
551
|
-
* @param
|
|
552
|
-
* @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
|
|
553
|
-
* @param choiseIndex is the index of the choice that the label will perform
|
|
551
|
+
* @param props is the properties of the label
|
|
554
552
|
*/
|
|
555
|
-
constructor(id,
|
|
553
|
+
constructor(id, props) {
|
|
556
554
|
this._id = id;
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
this.
|
|
555
|
+
this._onStepStart = props == null ? void 0 : props.onStepStart;
|
|
556
|
+
this._onLoadStep = props == null ? void 0 : props.onLoadStep;
|
|
557
|
+
this._onStepEnd = props == null ? void 0 : props.onStepEnd;
|
|
558
|
+
this._choiseIndex = props == null ? void 0 : props.choiseIndex;
|
|
560
559
|
}
|
|
561
560
|
/**
|
|
562
561
|
* Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
|
|
@@ -564,17 +563,6 @@ var Label = class {
|
|
|
564
563
|
get id() {
|
|
565
564
|
return this._id;
|
|
566
565
|
}
|
|
567
|
-
/**
|
|
568
|
-
* Get the steps of the label.
|
|
569
|
-
* This class should be extended and the steps method should be overridden.
|
|
570
|
-
* Every time you update this list will also be updated when the other game versions load.
|
|
571
|
-
*/
|
|
572
|
-
get steps() {
|
|
573
|
-
if (typeof this._steps === "function") {
|
|
574
|
-
return this._steps();
|
|
575
|
-
}
|
|
576
|
-
return this._steps;
|
|
577
|
-
}
|
|
578
566
|
/**
|
|
579
567
|
* Get the corresponding steps number
|
|
580
568
|
* @param externalSteps
|
|
@@ -593,28 +581,66 @@ var Label = class {
|
|
|
593
581
|
return res;
|
|
594
582
|
}
|
|
595
583
|
/**
|
|
596
|
-
*
|
|
584
|
+
* Is a function that will be executed in {@link Label#onStepStart} and when the user goes back to it or when the user laods a save file.
|
|
585
|
+
* @returns Promise<void> or void
|
|
586
|
+
*/
|
|
587
|
+
get onStepStart() {
|
|
588
|
+
return (stepIndex, label) => __async(this, null, function* () {
|
|
589
|
+
if (this._onLoadStep) {
|
|
590
|
+
yield this._onLoadStep(stepIndex, label);
|
|
591
|
+
}
|
|
592
|
+
if (this._onStepStart) {
|
|
593
|
+
return yield this._onStepStart(stepIndex, label);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Get the function that will be executed a old step is reloaded. A step is reloaded when the user goes back to it or when the user laods a save file.
|
|
599
|
+
* @returns Promise<void> or void
|
|
600
|
+
*/
|
|
601
|
+
get onLoadStep() {
|
|
602
|
+
return this._onLoadStep;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Is a function that will be executed when the step ends.
|
|
597
606
|
* @returns Promise<void> or void
|
|
598
|
-
* @example
|
|
599
|
-
* ```typescript
|
|
600
|
-
* newLabel("id", [], () => {
|
|
601
|
-
* Assets.load('path/to/image1.png')
|
|
602
|
-
* Assets.load('path/to/image2.png')
|
|
603
|
-
* })
|
|
604
|
-
* ```
|
|
605
607
|
*/
|
|
606
|
-
get
|
|
607
|
-
return this.
|
|
608
|
+
get onStepEnd() {
|
|
609
|
+
return this._onStepEnd;
|
|
608
610
|
}
|
|
609
611
|
get choiseIndex() {
|
|
610
612
|
return this._choiseIndex;
|
|
611
613
|
}
|
|
612
614
|
};
|
|
613
615
|
|
|
616
|
+
// src/classes/Label.ts
|
|
617
|
+
var Label = class extends LabelAbstract {
|
|
618
|
+
/**
|
|
619
|
+
* @param id is the id of the label
|
|
620
|
+
* @param steps is the list of steps that the label will perform
|
|
621
|
+
* @param props is the properties of the label
|
|
622
|
+
*/
|
|
623
|
+
constructor(id, steps, props) {
|
|
624
|
+
super(id, props);
|
|
625
|
+
this._steps = steps;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Get the steps of the label.
|
|
629
|
+
*/
|
|
630
|
+
get steps() {
|
|
631
|
+
if (typeof this._steps === "function") {
|
|
632
|
+
return this._steps();
|
|
633
|
+
}
|
|
634
|
+
return this._steps;
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
|
|
614
638
|
// src/classes/CloseLabel.ts
|
|
615
639
|
var CLOSE_LABEL_ID = "__close-label-id__";
|
|
616
640
|
function newCloseLabel(choiseIndex) {
|
|
617
|
-
return new Label(CLOSE_LABEL_ID, [],
|
|
641
|
+
return new Label(CLOSE_LABEL_ID, [], {
|
|
642
|
+
choiseIndex
|
|
643
|
+
});
|
|
618
644
|
}
|
|
619
645
|
|
|
620
646
|
// src/types/CloseType.ts
|
|
@@ -700,8 +726,9 @@ FadeAlphaTicker = __decorateClass([
|
|
|
700
726
|
], FadeAlphaTicker);
|
|
701
727
|
|
|
702
728
|
// src/functions/TickerUtility.ts
|
|
703
|
-
function updateTickerProgression(args, propertyName, progression) {
|
|
704
|
-
|
|
729
|
+
function updateTickerProgression(args, propertyName, progression, valueConvert) {
|
|
730
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
731
|
+
if (args[propertyName] === void 0 || !progression || args[propertyName] === limit) {
|
|
705
732
|
return;
|
|
706
733
|
}
|
|
707
734
|
if (typeof args[propertyName] === "number") {
|
|
@@ -720,22 +747,25 @@ function updateTickerProgression(args, propertyName, progression) {
|
|
|
720
747
|
}
|
|
721
748
|
}
|
|
722
749
|
}
|
|
723
|
-
function getLinearProgression(number, progression) {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
return
|
|
750
|
+
function getLinearProgression(number, progression, valueConvert) {
|
|
751
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
752
|
+
let amt = valueConvert ? valueConvert(progression.amt) : progression.amt;
|
|
753
|
+
if (limit !== void 0) {
|
|
754
|
+
if (number > limit && amt > 0) {
|
|
755
|
+
return limit;
|
|
756
|
+
} else if (number < limit && amt < 0) {
|
|
757
|
+
return limit;
|
|
729
758
|
}
|
|
730
759
|
}
|
|
731
|
-
return number +
|
|
760
|
+
return number + amt;
|
|
732
761
|
}
|
|
733
|
-
function getExponentialProgression(number, progression) {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
762
|
+
function getExponentialProgression(number, progression, valueConvert) {
|
|
763
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
764
|
+
if (limit !== void 0) {
|
|
765
|
+
if (number > limit && progression.percentage > 0) {
|
|
766
|
+
return limit;
|
|
767
|
+
} else if (number < limit && progression.percentage < 0) {
|
|
768
|
+
return limit;
|
|
739
769
|
}
|
|
740
770
|
}
|
|
741
771
|
return number + number * progression.percentage;
|
|
@@ -748,15 +778,13 @@ var MoveTicker = class extends TickerBase {
|
|
|
748
778
|
let ySpeed = 1;
|
|
749
779
|
if (args.speed) {
|
|
750
780
|
if (typeof args.speed === "number") {
|
|
751
|
-
xSpeed = args.speed;
|
|
752
|
-
ySpeed = args.speed;
|
|
781
|
+
xSpeed = this.speedConvert(args.speed);
|
|
782
|
+
ySpeed = this.speedConvert(args.speed);
|
|
753
783
|
} else {
|
|
754
|
-
xSpeed = args.speed.x;
|
|
755
|
-
ySpeed = args.speed.y;
|
|
784
|
+
xSpeed = this.speedConvert(args.speed.x);
|
|
785
|
+
ySpeed = this.speedConvert(args.speed.y);
|
|
756
786
|
}
|
|
757
787
|
}
|
|
758
|
-
xSpeed /= 60;
|
|
759
|
-
ySpeed /= 60;
|
|
760
788
|
let destination = args.destination;
|
|
761
789
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
762
790
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
@@ -796,7 +824,10 @@ var MoveTicker = class extends TickerBase {
|
|
|
796
824
|
}
|
|
797
825
|
});
|
|
798
826
|
if (args.speedProgression)
|
|
799
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
827
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
828
|
+
}
|
|
829
|
+
speedConvert(speed) {
|
|
830
|
+
return speed / 6;
|
|
800
831
|
}
|
|
801
832
|
};
|
|
802
833
|
MoveTicker = __decorateClass([
|
|
@@ -804,7 +835,7 @@ MoveTicker = __decorateClass([
|
|
|
804
835
|
], MoveTicker);
|
|
805
836
|
var RotateTicker = class extends TickerBase {
|
|
806
837
|
fn(ticker, args, tags, tickerId) {
|
|
807
|
-
let speed = (args.speed === void 0 ? 1 : args.speed)
|
|
838
|
+
let speed = this.speedConvert(args.speed === void 0 ? 1 : args.speed);
|
|
808
839
|
let clockwise = args.clockwise === void 0 ? true : args.clockwise;
|
|
809
840
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
810
841
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
@@ -832,7 +863,10 @@ var RotateTicker = class extends TickerBase {
|
|
|
832
863
|
}
|
|
833
864
|
});
|
|
834
865
|
if (args.speedProgression)
|
|
835
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
866
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
867
|
+
}
|
|
868
|
+
speedConvert(speed) {
|
|
869
|
+
return speed / 60;
|
|
836
870
|
}
|
|
837
871
|
};
|
|
838
872
|
RotateTicker = __decorateClass([
|
|
@@ -844,15 +878,13 @@ var ZoomTicker = class extends TickerBase {
|
|
|
844
878
|
let ySpeed = 0.1;
|
|
845
879
|
if (args.speed) {
|
|
846
880
|
if (typeof args.speed === "number") {
|
|
847
|
-
xSpeed = args.speed;
|
|
848
|
-
ySpeed = args.speed;
|
|
881
|
+
xSpeed = this.speedConvert(args.speed);
|
|
882
|
+
ySpeed = this.speedConvert(args.speed);
|
|
849
883
|
} else {
|
|
850
|
-
xSpeed = args.speed.x;
|
|
851
|
-
ySpeed = args.speed.y;
|
|
884
|
+
xSpeed = this.speedConvert(args.speed.x);
|
|
885
|
+
ySpeed = this.speedConvert(args.speed.y);
|
|
852
886
|
}
|
|
853
887
|
}
|
|
854
|
-
xSpeed /= 60;
|
|
855
|
-
ySpeed /= 60;
|
|
856
888
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
857
889
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
858
890
|
tagToRemoveAfter2 = [tagToRemoveAfter2];
|
|
@@ -919,7 +951,10 @@ var ZoomTicker = class extends TickerBase {
|
|
|
919
951
|
}
|
|
920
952
|
});
|
|
921
953
|
if (args.speedProgression)
|
|
922
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
954
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
955
|
+
}
|
|
956
|
+
speedConvert(speed) {
|
|
957
|
+
return speed / 60;
|
|
923
958
|
}
|
|
924
959
|
onEndOfTicker(tag, tickerId, _element, tagToRemoveAfter2) {
|
|
925
960
|
GameWindowManager.onEndOfTicker(tag, this, tagToRemoveAfter2, tickerId);
|
|
@@ -1723,29 +1758,57 @@ var ChoiceMenuOption = class {
|
|
|
1723
1758
|
/**
|
|
1724
1759
|
* @param text Text to be displayed in the menu
|
|
1725
1760
|
* @param label Label to be opened when the option is selected or the id of the label
|
|
1761
|
+
* @param props Properties to be passed to the label and olther parameters that you can use when get all the choice menu options. It be converted to a JSON string, so it cannot contain functions or classes.
|
|
1726
1762
|
* @param type Type of the label to be opened. @default "call"
|
|
1727
|
-
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes. @default {}
|
|
1728
1763
|
*/
|
|
1729
|
-
constructor(text, label, type = "call"
|
|
1764
|
+
constructor(text, label, props, type = "call") {
|
|
1730
1765
|
/**
|
|
1731
|
-
* Properties to be passed to the label
|
|
1766
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
1767
|
+
* @example
|
|
1768
|
+
* ```tsx
|
|
1769
|
+
* setChoiceMenuOptions([
|
|
1770
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
1771
|
+
* ])
|
|
1772
|
+
* return <List>
|
|
1773
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
1774
|
+
* return (
|
|
1775
|
+
* <ChoiceButton
|
|
1776
|
+
* disabled={item.props.disabled}
|
|
1777
|
+
* onClick={() => {
|
|
1778
|
+
* afterSelectChoice(item)
|
|
1779
|
+
* }}
|
|
1780
|
+
* >
|
|
1781
|
+
* {item.text}
|
|
1782
|
+
* </ChoiceButton>
|
|
1783
|
+
* )
|
|
1784
|
+
* })}
|
|
1785
|
+
* </List>
|
|
1786
|
+
* ```
|
|
1732
1787
|
*/
|
|
1733
1788
|
this.props = {};
|
|
1734
|
-
if (typeof label === "string") {
|
|
1735
|
-
let tLabel = getLabelById(label);
|
|
1736
|
-
if (!tLabel) {
|
|
1737
|
-
throw new Error(`[Pixi'VN] Label ${label} not found`);
|
|
1738
|
-
} else {
|
|
1739
|
-
label = tLabel;
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
1789
|
this.text = text;
|
|
1743
|
-
this.
|
|
1790
|
+
this._label = label;
|
|
1744
1791
|
this.type = type;
|
|
1745
1792
|
if (props) {
|
|
1746
1793
|
this.props = props;
|
|
1747
1794
|
}
|
|
1748
1795
|
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Label to be opened when the option is selected
|
|
1798
|
+
*/
|
|
1799
|
+
get label() {
|
|
1800
|
+
let label = this._label;
|
|
1801
|
+
if (typeof label === "string") {
|
|
1802
|
+
let res = getLabelById(label);
|
|
1803
|
+
if (res) {
|
|
1804
|
+
label = res;
|
|
1805
|
+
} else {
|
|
1806
|
+
console.error(`Label ${label} not found, so it will be closed`);
|
|
1807
|
+
label = newCloseLabel();
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
return label;
|
|
1811
|
+
}
|
|
1749
1812
|
};
|
|
1750
1813
|
var ChoiceMenuOptionClose = class {
|
|
1751
1814
|
/**
|
|
@@ -1762,7 +1825,27 @@ var ChoiceMenuOptionClose = class {
|
|
|
1762
1825
|
*/
|
|
1763
1826
|
this.type = Close;
|
|
1764
1827
|
/**
|
|
1765
|
-
* Properties to be passed to the label
|
|
1828
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
1829
|
+
* @example
|
|
1830
|
+
* ```tsx
|
|
1831
|
+
* setChoiceMenuOptions([
|
|
1832
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
1833
|
+
* ])
|
|
1834
|
+
* return <List>
|
|
1835
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
1836
|
+
* return (
|
|
1837
|
+
* <ChoiceButton
|
|
1838
|
+
* disabled={item.props.disabled}
|
|
1839
|
+
* onClick={() => {
|
|
1840
|
+
* afterSelectChoice(item)
|
|
1841
|
+
* }}
|
|
1842
|
+
* >
|
|
1843
|
+
* {item.text}
|
|
1844
|
+
* </ChoiceButton>
|
|
1845
|
+
* )
|
|
1846
|
+
* })}
|
|
1847
|
+
* </List>
|
|
1848
|
+
* ```
|
|
1766
1849
|
*/
|
|
1767
1850
|
this.props = {};
|
|
1768
1851
|
this.text = text;
|