@drincs/pixi-vn 0.6.3 → 0.6.5

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.
Files changed (238) hide show
  1. package/README.md +8 -5
  2. package/dist/LabelProps-CFV-zRjG.d.ts +113 -0
  3. package/dist/LabelProps-CmRpvUJm.d.mts +113 -0
  4. package/dist/classes/CharacterBaseModel.js +42 -33
  5. package/dist/classes/CharacterBaseModel.js.map +1 -1
  6. package/dist/classes/CharacterBaseModel.mjs +42 -33
  7. package/dist/classes/CharacterBaseModel.mjs.map +1 -1
  8. package/dist/classes/ChoiceMenuOption.d.mts +68 -8
  9. package/dist/classes/ChoiceMenuOption.d.ts +68 -8
  10. package/dist/classes/ChoiceMenuOption.js +119 -53
  11. package/dist/classes/ChoiceMenuOption.js.map +1 -1
  12. package/dist/classes/ChoiceMenuOption.mjs +119 -53
  13. package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
  14. package/dist/classes/CloseLabel.d.mts +2 -2
  15. package/dist/classes/CloseLabel.d.ts +2 -2
  16. package/dist/classes/CloseLabel.js +53 -17
  17. package/dist/classes/CloseLabel.js.map +1 -1
  18. package/dist/classes/CloseLabel.mjs +53 -17
  19. package/dist/classes/CloseLabel.mjs.map +1 -1
  20. package/dist/classes/Label.d.mts +4 -72
  21. package/dist/classes/Label.d.ts +4 -72
  22. package/dist/classes/Label.js +50 -16
  23. package/dist/classes/Label.js.map +1 -1
  24. package/dist/classes/Label.mjs +50 -16
  25. package/dist/classes/Label.mjs.map +1 -1
  26. package/dist/classes/StoredClassModel.js +42 -33
  27. package/dist/classes/StoredClassModel.js.map +1 -1
  28. package/dist/classes/StoredClassModel.mjs +42 -33
  29. package/dist/classes/StoredClassModel.mjs.map +1 -1
  30. package/dist/classes/canvas/CanvasContainer.js +2 -2
  31. package/dist/classes/canvas/CanvasContainer.js.map +1 -1
  32. package/dist/classes/canvas/CanvasContainer.mjs +2 -2
  33. package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
  34. package/dist/classes/canvas/CanvasImage.js +2 -2
  35. package/dist/classes/canvas/CanvasImage.js.map +1 -1
  36. package/dist/classes/canvas/CanvasImage.mjs +2 -2
  37. package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
  38. package/dist/classes/canvas/CanvasSprite.js +2 -2
  39. package/dist/classes/canvas/CanvasSprite.js.map +1 -1
  40. package/dist/classes/canvas/CanvasSprite.mjs +2 -2
  41. package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
  42. package/dist/classes/canvas/CanvasText.js +2 -2
  43. package/dist/classes/canvas/CanvasText.js.map +1 -1
  44. package/dist/classes/canvas/CanvasText.mjs +2 -2
  45. package/dist/classes/canvas/CanvasText.mjs.map +1 -1
  46. package/dist/classes/canvas/index.js +2 -2
  47. package/dist/classes/canvas/index.js.map +1 -1
  48. package/dist/classes/canvas/index.mjs +2 -2
  49. package/dist/classes/canvas/index.mjs.map +1 -1
  50. package/dist/classes/index.d.mts +2 -2
  51. package/dist/classes/index.d.ts +2 -2
  52. package/dist/classes/index.js +119 -53
  53. package/dist/classes/index.js.map +1 -1
  54. package/dist/classes/index.mjs +119 -53
  55. package/dist/classes/index.mjs.map +1 -1
  56. package/dist/classes/ticker/FadeAlphaTicker.js +42 -33
  57. package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
  58. package/dist/classes/ticker/FadeAlphaTicker.mjs +42 -33
  59. package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
  60. package/dist/classes/ticker/MoveTicker.d.mts +1 -0
  61. package/dist/classes/ticker/MoveTicker.d.ts +1 -0
  62. package/dist/classes/ticker/MoveTicker.js +42 -33
  63. package/dist/classes/ticker/MoveTicker.js.map +1 -1
  64. package/dist/classes/ticker/MoveTicker.mjs +42 -33
  65. package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
  66. package/dist/classes/ticker/RotateTicker.d.mts +1 -0
  67. package/dist/classes/ticker/RotateTicker.d.ts +1 -0
  68. package/dist/classes/ticker/RotateTicker.js +42 -33
  69. package/dist/classes/ticker/RotateTicker.js.map +1 -1
  70. package/dist/classes/ticker/RotateTicker.mjs +42 -33
  71. package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
  72. package/dist/classes/ticker/ZoomTicker.d.mts +1 -0
  73. package/dist/classes/ticker/ZoomTicker.d.ts +1 -0
  74. package/dist/classes/ticker/ZoomTicker.js +42 -33
  75. package/dist/classes/ticker/ZoomTicker.js.map +1 -1
  76. package/dist/classes/ticker/ZoomTicker.mjs +42 -33
  77. package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
  78. package/dist/classes/ticker/index.js +42 -33
  79. package/dist/classes/ticker/index.js.map +1 -1
  80. package/dist/classes/ticker/index.mjs +42 -33
  81. package/dist/classes/ticker/index.mjs.map +1 -1
  82. package/dist/constants.d.mts +1 -1
  83. package/dist/constants.d.ts +1 -1
  84. package/dist/constants.js +1 -1
  85. package/dist/constants.js.map +1 -1
  86. package/dist/constants.mjs +1 -1
  87. package/dist/constants.mjs.map +1 -1
  88. package/dist/decorators/CanvasElementDecorator.js +2 -2
  89. package/dist/decorators/CanvasElementDecorator.js.map +1 -1
  90. package/dist/decorators/CanvasElementDecorator.mjs +2 -2
  91. package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
  92. package/dist/decorators/LabelDecorator.d.mts +3 -3
  93. package/dist/decorators/LabelDecorator.d.ts +3 -3
  94. package/dist/decorators/LabelDecorator.js +74 -50
  95. package/dist/decorators/LabelDecorator.js.map +1 -1
  96. package/dist/decorators/LabelDecorator.mjs +74 -50
  97. package/dist/decorators/LabelDecorator.mjs.map +1 -1
  98. package/dist/decorators/index.d.mts +2 -2
  99. package/dist/decorators/index.d.ts +2 -2
  100. package/dist/decorators/index.js +74 -50
  101. package/dist/decorators/index.js.map +1 -1
  102. package/dist/decorators/index.mjs +74 -50
  103. package/dist/decorators/index.mjs.map +1 -1
  104. package/dist/functions/CanvasUtility.js +2 -2
  105. package/dist/functions/CanvasUtility.js.map +1 -1
  106. package/dist/functions/CanvasUtility.mjs +2 -2
  107. package/dist/functions/CanvasUtility.mjs.map +1 -1
  108. package/dist/functions/DialogueUtility.d.mts +9 -9
  109. package/dist/functions/DialogueUtility.d.ts +9 -9
  110. package/dist/functions/DialogueUtility.js +184 -106
  111. package/dist/functions/DialogueUtility.js.map +1 -1
  112. package/dist/functions/DialogueUtility.mjs +184 -106
  113. package/dist/functions/DialogueUtility.mjs.map +1 -1
  114. package/dist/functions/FlagsUtility.js +42 -33
  115. package/dist/functions/FlagsUtility.js.map +1 -1
  116. package/dist/functions/FlagsUtility.mjs +42 -33
  117. package/dist/functions/FlagsUtility.mjs.map +1 -1
  118. package/dist/functions/GameUtility.js +42 -33
  119. package/dist/functions/GameUtility.js.map +1 -1
  120. package/dist/functions/GameUtility.mjs +42 -33
  121. package/dist/functions/GameUtility.mjs.map +1 -1
  122. package/dist/functions/ImageUtility.js +45 -36
  123. package/dist/functions/ImageUtility.js.map +1 -1
  124. package/dist/functions/ImageUtility.mjs +45 -36
  125. package/dist/functions/ImageUtility.mjs.map +1 -1
  126. package/dist/functions/SavesUtility.d.mts +4 -4
  127. package/dist/functions/SavesUtility.d.ts +4 -4
  128. package/dist/functions/SavesUtility.js +173 -111
  129. package/dist/functions/SavesUtility.js.map +1 -1
  130. package/dist/functions/SavesUtility.mjs +173 -111
  131. package/dist/functions/SavesUtility.mjs.map +1 -1
  132. package/dist/functions/TickerUtility.d.mts +2 -1
  133. package/dist/functions/TickerUtility.d.ts +2 -1
  134. package/dist/functions/TickerUtility.js +19 -15
  135. package/dist/functions/TickerUtility.js.map +1 -1
  136. package/dist/functions/TickerUtility.mjs +19 -15
  137. package/dist/functions/TickerUtility.mjs.map +1 -1
  138. package/dist/functions/index.d.mts +3 -3
  139. package/dist/functions/index.d.ts +3 -3
  140. package/dist/functions/index.js +197 -115
  141. package/dist/functions/index.js.map +1 -1
  142. package/dist/functions/index.mjs +197 -115
  143. package/dist/functions/index.mjs.map +1 -1
  144. package/dist/index.d.mts +1 -1
  145. package/dist/index.d.ts +1 -1
  146. package/dist/index.js +325 -190
  147. package/dist/index.js.map +1 -1
  148. package/dist/index.mjs +326 -191
  149. package/dist/index.mjs.map +1 -1
  150. package/dist/interface/IHistoryStep.d.mts +1 -1
  151. package/dist/interface/IHistoryStep.d.ts +1 -1
  152. package/dist/interface/ISaveData.d.mts +2 -2
  153. package/dist/interface/ISaveData.d.ts +2 -2
  154. package/dist/interface/LabelProps.d.mts +5 -0
  155. package/dist/interface/LabelProps.d.ts +5 -0
  156. package/dist/interface/LabelProps.js +4 -0
  157. package/dist/interface/LabelProps.js.map +1 -0
  158. package/dist/interface/LabelProps.mjs +3 -0
  159. package/dist/interface/LabelProps.mjs.map +1 -0
  160. package/dist/interface/export/ExportedStep.d.mts +2 -2
  161. package/dist/interface/export/ExportedStep.d.ts +2 -2
  162. package/dist/interface/export/index.d.mts +2 -2
  163. package/dist/interface/export/index.d.ts +2 -2
  164. package/dist/interface/index.d.mts +4 -4
  165. package/dist/interface/index.d.ts +4 -4
  166. package/dist/labels/BaseCanvasElementTestLabel.d.mts +2 -2
  167. package/dist/labels/BaseCanvasElementTestLabel.d.ts +2 -2
  168. package/dist/labels/BaseCanvasElementTestLabel.js +175 -111
  169. package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
  170. package/dist/labels/BaseCanvasElementTestLabel.mjs +176 -112
  171. package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
  172. package/dist/labels/CanvasEventsTestLabel.d.mts +3 -6
  173. package/dist/labels/CanvasEventsTestLabel.d.ts +3 -6
  174. package/dist/labels/CanvasEventsTestLabel.js +186 -128
  175. package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
  176. package/dist/labels/CanvasEventsTestLabel.mjs +187 -129
  177. package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
  178. package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +2 -2
  179. package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +2 -2
  180. package/dist/labels/CustomTickerCanvasElementTestLabel.js +166 -108
  181. package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
  182. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +166 -108
  183. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
  184. package/dist/labels/ImagesAnimationsTestLabel.d.mts +2 -2
  185. package/dist/labels/ImagesAnimationsTestLabel.d.ts +2 -2
  186. package/dist/labels/ImagesAnimationsTestLabel.js +253 -147
  187. package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
  188. package/dist/labels/ImagesAnimationsTestLabel.mjs +253 -147
  189. package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
  190. package/dist/labels/MarkdownTest.d.mts +2 -2
  191. package/dist/labels/MarkdownTest.d.ts +2 -2
  192. package/dist/labels/MarkdownTest.js +166 -108
  193. package/dist/labels/MarkdownTest.js.map +1 -1
  194. package/dist/labels/MarkdownTest.mjs +166 -108
  195. package/dist/labels/MarkdownTest.mjs.map +1 -1
  196. package/dist/labels/StartLabel.d.mts +2 -2
  197. package/dist/labels/StartLabel.d.ts +2 -2
  198. package/dist/labels/StartLabel.js +316 -184
  199. package/dist/labels/StartLabel.js.map +1 -1
  200. package/dist/labels/StartLabel.mjs +317 -185
  201. package/dist/labels/StartLabel.mjs.map +1 -1
  202. package/dist/labels/StepLabelTest.d.mts +9 -0
  203. package/dist/labels/StepLabelTest.d.ts +9 -0
  204. package/dist/labels/StepLabelTest.js +2758 -0
  205. package/dist/labels/StepLabelTest.js.map +1 -0
  206. package/dist/labels/StepLabelTest.mjs +2752 -0
  207. package/dist/labels/StepLabelTest.mjs.map +1 -0
  208. package/dist/labels/TestConstant.js +43 -34
  209. package/dist/labels/TestConstant.js.map +1 -1
  210. package/dist/labels/TestConstant.mjs +43 -34
  211. package/dist/labels/TestConstant.mjs.map +1 -1
  212. package/dist/labels/index.d.mts +2 -2
  213. package/dist/labels/index.d.ts +2 -2
  214. package/dist/labels/index.js +316 -184
  215. package/dist/labels/index.js.map +1 -1
  216. package/dist/labels/index.mjs +317 -185
  217. package/dist/labels/index.mjs.map +1 -1
  218. package/dist/managers/StepManager.d.mts +6 -5
  219. package/dist/managers/StepManager.d.ts +6 -5
  220. package/dist/managers/StepManager.js +163 -105
  221. package/dist/managers/StepManager.js.map +1 -1
  222. package/dist/managers/StepManager.mjs +163 -105
  223. package/dist/managers/StepManager.mjs.map +1 -1
  224. package/dist/managers/WindowManager.js +2 -2
  225. package/dist/managers/WindowManager.js.map +1 -1
  226. package/dist/managers/WindowManager.mjs +2 -2
  227. package/dist/managers/WindowManager.mjs.map +1 -1
  228. package/dist/managers/index.d.mts +2 -2
  229. package/dist/managers/index.d.ts +2 -2
  230. package/dist/managers/index.js +163 -105
  231. package/dist/managers/index.js.map +1 -1
  232. package/dist/managers/index.mjs +163 -105
  233. package/dist/managers/index.mjs.map +1 -1
  234. package/dist/types/ChoiceMenuOptionsType.d.mts +2 -2
  235. package/dist/types/ChoiceMenuOptionsType.d.ts +2 -2
  236. package/dist/types/index.d.mts +1 -1
  237. package/dist/types/index.d.ts +1 -1
  238. package/package.json +6 -6
@@ -1,17 +1,17 @@
1
1
  import { LabelIdType } from '../types/LabelIdType.mjs';
2
2
  import { StorageObjectType } from '../types/StorageElementType.mjs';
3
- import Label from './Label.mjs';
3
+ import { L as Label } from '../LabelProps-CmRpvUJm.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 '../types/StepHistoryDataType.mjs';
9
9
 
10
10
  /**
11
11
  * ChoiceMenuOption is a class that contains a Label and a text that will be displayed in the menu.
12
12
  * @example
13
13
  * ```typescript
14
- * new ChoiceMenuOption("Hello", HelloLabel)
14
+ * new ChoiceMenuOption("Hello", HelloLabel, {})
15
15
  * ```
16
16
  */
17
17
  declare class ChoiceMenuOption<T extends StorageObjectType> {
@@ -28,16 +28,36 @@ declare class ChoiceMenuOption<T extends StorageObjectType> {
28
28
  */
29
29
  type: LabelRunModeType;
30
30
  /**
31
- * Properties to be passed to the label
31
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
32
+ * @example
33
+ * ```tsx
34
+ * setChoiceMenuOptions([
35
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
36
+ * ])
37
+ * return <List>
38
+ * {getChoiceMenuOptions()?.map((item, index) => {
39
+ * return (
40
+ * <ChoiceButton
41
+ * disabled={item.props.disabled}
42
+ * onClick={() => {
43
+ * afterSelectChoice(item)
44
+ * }}
45
+ * >
46
+ * {item.text}
47
+ * </ChoiceButton>
48
+ * )
49
+ * })}
50
+ * </List>
51
+ * ```
32
52
  */
33
53
  props: StorageObjectType;
34
54
  /**
35
55
  * @param text Text to be displayed in the menu
36
56
  * @param label Label to be opened when the option is selected or the id of the label
57
+ * @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
58
  * @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
59
  */
40
- constructor(text: string, label: Label<T> | LabelIdType, type?: LabelRunModeType, props?: T);
60
+ constructor(text: string, label: Label<T> | LabelIdType, props: T, type?: LabelRunModeType);
41
61
  }
42
62
  /**
43
63
  * ChoiceMenuOptionClose is a class that contains a text that will be displayed in the menu.
@@ -65,7 +85,27 @@ declare class ChoiceMenuOptionClose<T extends {} = {}> {
65
85
  */
66
86
  type: CloseType;
67
87
  /**
68
- * Properties to be passed to the label
88
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
89
+ * @example
90
+ * ```tsx
91
+ * setChoiceMenuOptions([
92
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
93
+ * ])
94
+ * return <List>
95
+ * {getChoiceMenuOptions()?.map((item, index) => {
96
+ * return (
97
+ * <ChoiceButton
98
+ * disabled={item.props.disabled}
99
+ * onClick={() => {
100
+ * afterSelectChoice(item)
101
+ * }}
102
+ * >
103
+ * {item.text}
104
+ * </ChoiceButton>
105
+ * )
106
+ * })}
107
+ * </List>
108
+ * ```
69
109
  */
70
110
  props: StorageObjectType;
71
111
  /**
@@ -88,7 +128,27 @@ type IStoratedChoiceMenuOption = {
88
128
  */
89
129
  type: LabelRunModeType;
90
130
  /**
91
- * Properties to be passed to the label
131
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
132
+ * @example
133
+ * ```tsx
134
+ * setChoiceMenuOptions([
135
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
136
+ * ])
137
+ * return <List>
138
+ * {getChoiceMenuOptions()?.map((item, index) => {
139
+ * return (
140
+ * <ChoiceButton
141
+ * disabled={item.props.disabled}
142
+ * onClick={() => {
143
+ * afterSelectChoice(item)
144
+ * }}
145
+ * >
146
+ * {item.text}
147
+ * </ChoiceButton>
148
+ * )
149
+ * })}
150
+ * </List>
151
+ * ```
92
152
  */
93
153
  props: StorageObjectType;
94
154
  } | {
@@ -1,17 +1,17 @@
1
1
  import { LabelIdType } from '../types/LabelIdType.js';
2
2
  import { StorageObjectType } from '../types/StorageElementType.js';
3
- import Label from './Label.js';
3
+ import { L as Label } from '../LabelProps-CFV-zRjG.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 '../types/StepHistoryDataType.js';
9
9
 
10
10
  /**
11
11
  * ChoiceMenuOption is a class that contains a Label and a text that will be displayed in the menu.
12
12
  * @example
13
13
  * ```typescript
14
- * new ChoiceMenuOption("Hello", HelloLabel)
14
+ * new ChoiceMenuOption("Hello", HelloLabel, {})
15
15
  * ```
16
16
  */
17
17
  declare class ChoiceMenuOption<T extends StorageObjectType> {
@@ -28,16 +28,36 @@ declare class ChoiceMenuOption<T extends StorageObjectType> {
28
28
  */
29
29
  type: LabelRunModeType;
30
30
  /**
31
- * Properties to be passed to the label
31
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
32
+ * @example
33
+ * ```tsx
34
+ * setChoiceMenuOptions([
35
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
36
+ * ])
37
+ * return <List>
38
+ * {getChoiceMenuOptions()?.map((item, index) => {
39
+ * return (
40
+ * <ChoiceButton
41
+ * disabled={item.props.disabled}
42
+ * onClick={() => {
43
+ * afterSelectChoice(item)
44
+ * }}
45
+ * >
46
+ * {item.text}
47
+ * </ChoiceButton>
48
+ * )
49
+ * })}
50
+ * </List>
51
+ * ```
32
52
  */
33
53
  props: StorageObjectType;
34
54
  /**
35
55
  * @param text Text to be displayed in the menu
36
56
  * @param label Label to be opened when the option is selected or the id of the label
57
+ * @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
58
  * @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
59
  */
40
- constructor(text: string, label: Label<T> | LabelIdType, type?: LabelRunModeType, props?: T);
60
+ constructor(text: string, label: Label<T> | LabelIdType, props: T, type?: LabelRunModeType);
41
61
  }
42
62
  /**
43
63
  * ChoiceMenuOptionClose is a class that contains a text that will be displayed in the menu.
@@ -65,7 +85,27 @@ declare class ChoiceMenuOptionClose<T extends {} = {}> {
65
85
  */
66
86
  type: CloseType;
67
87
  /**
68
- * Properties to be passed to the label
88
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
89
+ * @example
90
+ * ```tsx
91
+ * setChoiceMenuOptions([
92
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
93
+ * ])
94
+ * return <List>
95
+ * {getChoiceMenuOptions()?.map((item, index) => {
96
+ * return (
97
+ * <ChoiceButton
98
+ * disabled={item.props.disabled}
99
+ * onClick={() => {
100
+ * afterSelectChoice(item)
101
+ * }}
102
+ * >
103
+ * {item.text}
104
+ * </ChoiceButton>
105
+ * )
106
+ * })}
107
+ * </List>
108
+ * ```
69
109
  */
70
110
  props: StorageObjectType;
71
111
  /**
@@ -88,7 +128,27 @@ type IStoratedChoiceMenuOption = {
88
128
  */
89
129
  type: LabelRunModeType;
90
130
  /**
91
- * Properties to be passed to the label
131
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
132
+ * @example
133
+ * ```tsx
134
+ * setChoiceMenuOptions([
135
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
136
+ * ])
137
+ * return <List>
138
+ * {getChoiceMenuOptions()?.map((item, index) => {
139
+ * return (
140
+ * <ChoiceButton
141
+ * disabled={item.props.disabled}
142
+ * onClick={() => {
143
+ * afterSelectChoice(item)
144
+ * }}
145
+ * >
146
+ * {item.text}
147
+ * </ChoiceButton>
148
+ * )
149
+ * })}
150
+ * </List>
151
+ * ```
92
152
  */
93
153
  props: StorageObjectType;
94
154
  } | {
@@ -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* () {
@@ -549,14 +549,15 @@ var Label = class {
549
549
  /**
550
550
  * @param id is the id of the label
551
551
  * @param steps is the list of steps that the label will perform
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
552
+ * @param props is the properties of the label
554
553
  */
555
- constructor(id, steps, onStepRun, choiseIndex) {
554
+ constructor(id, steps, props) {
556
555
  this._id = id;
557
556
  this._steps = steps;
558
- this._onStepRun = onStepRun;
559
- this._choiseIndex = choiseIndex;
557
+ this._onStepStart = props == null ? void 0 : props.onStepStart;
558
+ this._onLoadStep = props == null ? void 0 : props.onLoadStep;
559
+ this._onStepEnd = props == null ? void 0 : props.onStepEnd;
560
+ this._choiseIndex = props == null ? void 0 : props.choiseIndex;
560
561
  }
561
562
  /**
562
563
  * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
@@ -593,18 +594,32 @@ var Label = class {
593
594
  return res;
594
595
  }
595
596
  /**
596
- * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
597
+ * 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.
597
598
  * @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
599
  */
606
- get onStepRun() {
607
- return this._onStepRun;
600
+ get onStepStart() {
601
+ return (stepIndex, label) => __async(this, null, function* () {
602
+ if (this._onLoadStep) {
603
+ yield this._onLoadStep(stepIndex, label);
604
+ }
605
+ if (this._onStepStart) {
606
+ return yield this._onStepStart(stepIndex, label);
607
+ }
608
+ });
609
+ }
610
+ /**
611
+ * 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.
612
+ * @returns Promise<void> or void
613
+ */
614
+ get onLoadStep() {
615
+ return this._onLoadStep;
616
+ }
617
+ /**
618
+ * Is a function that will be executed when the step ends.
619
+ * @returns Promise<void> or void
620
+ */
621
+ get onStepEnd() {
622
+ return this._onStepEnd;
608
623
  }
609
624
  get choiseIndex() {
610
625
  return this._choiseIndex;
@@ -614,7 +629,9 @@ var Label = class {
614
629
  // src/classes/CloseLabel.ts
615
630
  var CLOSE_LABEL_ID = "__close-label-id__";
616
631
  function newCloseLabel(choiseIndex) {
617
- return new Label(CLOSE_LABEL_ID, [], void 0, choiseIndex);
632
+ return new Label(CLOSE_LABEL_ID, [], {
633
+ choiseIndex
634
+ });
618
635
  }
619
636
 
620
637
  // src/types/CloseType.ts
@@ -700,8 +717,9 @@ FadeAlphaTicker = __decorateClass([
700
717
  ], FadeAlphaTicker);
701
718
 
702
719
  // src/functions/TickerUtility.ts
703
- function updateTickerProgression(args, propertyName, progression) {
704
- if (args[propertyName] === void 0 || !progression || args[propertyName] === progression.limit) {
720
+ function updateTickerProgression(args, propertyName, progression, valueConvert) {
721
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
722
+ if (args[propertyName] === void 0 || !progression || args[propertyName] === limit) {
705
723
  return;
706
724
  }
707
725
  if (typeof args[propertyName] === "number") {
@@ -720,22 +738,25 @@ function updateTickerProgression(args, propertyName, progression) {
720
738
  }
721
739
  }
722
740
  }
723
- function getLinearProgression(number, progression) {
724
- if (progression.limit !== void 0) {
725
- if (number > progression.limit && progression.amt > 0) {
726
- return progression.limit;
727
- } else if (number < progression.limit && progression.amt < 0) {
728
- return progression.limit;
741
+ function getLinearProgression(number, progression, valueConvert) {
742
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
743
+ let amt = valueConvert ? valueConvert(progression.amt) : progression.amt;
744
+ if (limit !== void 0) {
745
+ if (number > limit && amt > 0) {
746
+ return limit;
747
+ } else if (number < limit && amt < 0) {
748
+ return limit;
729
749
  }
730
750
  }
731
- return number + progression.amt / 60;
751
+ return number + amt;
732
752
  }
733
- function getExponentialProgression(number, progression) {
734
- if (progression.limit !== void 0) {
735
- if (number > progression.limit && progression.percentage > 0) {
736
- return progression.limit;
737
- } else if (number < progression.limit && progression.percentage < 0) {
738
- return progression.limit;
753
+ function getExponentialProgression(number, progression, valueConvert) {
754
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
755
+ if (limit !== void 0) {
756
+ if (number > limit && progression.percentage > 0) {
757
+ return limit;
758
+ } else if (number < limit && progression.percentage < 0) {
759
+ return limit;
739
760
  }
740
761
  }
741
762
  return number + number * progression.percentage;
@@ -748,15 +769,13 @@ var MoveTicker = class extends TickerBase {
748
769
  let ySpeed = 1;
749
770
  if (args.speed) {
750
771
  if (typeof args.speed === "number") {
751
- xSpeed = args.speed;
752
- ySpeed = args.speed;
772
+ xSpeed = this.speedConvert(args.speed);
773
+ ySpeed = this.speedConvert(args.speed);
753
774
  } else {
754
- xSpeed = args.speed.x;
755
- ySpeed = args.speed.y;
775
+ xSpeed = this.speedConvert(args.speed.x);
776
+ ySpeed = this.speedConvert(args.speed.y);
756
777
  }
757
778
  }
758
- xSpeed /= 60;
759
- ySpeed /= 60;
760
779
  let destination = args.destination;
761
780
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
762
781
  if (typeof tagToRemoveAfter2 === "string") {
@@ -796,7 +815,10 @@ var MoveTicker = class extends TickerBase {
796
815
  }
797
816
  });
798
817
  if (args.speedProgression)
799
- updateTickerProgression(args, "speed", args.speedProgression);
818
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
819
+ }
820
+ speedConvert(speed) {
821
+ return speed / 6;
800
822
  }
801
823
  };
802
824
  MoveTicker = __decorateClass([
@@ -804,7 +826,7 @@ MoveTicker = __decorateClass([
804
826
  ], MoveTicker);
805
827
  var RotateTicker = class extends TickerBase {
806
828
  fn(ticker, args, tags, tickerId) {
807
- let speed = (args.speed === void 0 ? 1 : args.speed) / 60;
829
+ let speed = this.speedConvert(args.speed === void 0 ? 1 : args.speed);
808
830
  let clockwise = args.clockwise === void 0 ? true : args.clockwise;
809
831
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
810
832
  if (typeof tagToRemoveAfter2 === "string") {
@@ -832,7 +854,10 @@ var RotateTicker = class extends TickerBase {
832
854
  }
833
855
  });
834
856
  if (args.speedProgression)
835
- updateTickerProgression(args, "speed", args.speedProgression);
857
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
858
+ }
859
+ speedConvert(speed) {
860
+ return speed / 60;
836
861
  }
837
862
  };
838
863
  RotateTicker = __decorateClass([
@@ -844,15 +869,13 @@ var ZoomTicker = class extends TickerBase {
844
869
  let ySpeed = 0.1;
845
870
  if (args.speed) {
846
871
  if (typeof args.speed === "number") {
847
- xSpeed = args.speed;
848
- ySpeed = args.speed;
872
+ xSpeed = this.speedConvert(args.speed);
873
+ ySpeed = this.speedConvert(args.speed);
849
874
  } else {
850
- xSpeed = args.speed.x;
851
- ySpeed = args.speed.y;
875
+ xSpeed = this.speedConvert(args.speed.x);
876
+ ySpeed = this.speedConvert(args.speed.y);
852
877
  }
853
878
  }
854
- xSpeed /= 60;
855
- ySpeed /= 60;
856
879
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
857
880
  if (typeof tagToRemoveAfter2 === "string") {
858
881
  tagToRemoveAfter2 = [tagToRemoveAfter2];
@@ -919,7 +942,10 @@ var ZoomTicker = class extends TickerBase {
919
942
  }
920
943
  });
921
944
  if (args.speedProgression)
922
- updateTickerProgression(args, "speed", args.speedProgression);
945
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
946
+ }
947
+ speedConvert(speed) {
948
+ return speed / 60;
923
949
  }
924
950
  onEndOfTicker(tag, tickerId, _element, tagToRemoveAfter2) {
925
951
  GameWindowManager.onEndOfTicker(tag, this, tagToRemoveAfter2, tickerId);
@@ -1723,12 +1749,32 @@ var ChoiceMenuOption = class {
1723
1749
  /**
1724
1750
  * @param text Text to be displayed in the menu
1725
1751
  * @param label Label to be opened when the option is selected or the id of the label
1752
+ * @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
1753
  * @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
1754
  */
1729
- constructor(text, label, type = "call", props) {
1755
+ constructor(text, label, props, type = "call") {
1730
1756
  /**
1731
- * Properties to be passed to the label
1757
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
1758
+ * @example
1759
+ * ```tsx
1760
+ * setChoiceMenuOptions([
1761
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
1762
+ * ])
1763
+ * return <List>
1764
+ * {getChoiceMenuOptions()?.map((item, index) => {
1765
+ * return (
1766
+ * <ChoiceButton
1767
+ * disabled={item.props.disabled}
1768
+ * onClick={() => {
1769
+ * afterSelectChoice(item)
1770
+ * }}
1771
+ * >
1772
+ * {item.text}
1773
+ * </ChoiceButton>
1774
+ * )
1775
+ * })}
1776
+ * </List>
1777
+ * ```
1732
1778
  */
1733
1779
  this.props = {};
1734
1780
  if (typeof label === "string") {
@@ -1762,7 +1808,27 @@ var ChoiceMenuOptionClose = class {
1762
1808
  */
1763
1809
  this.type = Close;
1764
1810
  /**
1765
- * Properties to be passed to the label
1811
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
1812
+ * @example
1813
+ * ```tsx
1814
+ * setChoiceMenuOptions([
1815
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
1816
+ * ])
1817
+ * return <List>
1818
+ * {getChoiceMenuOptions()?.map((item, index) => {
1819
+ * return (
1820
+ * <ChoiceButton
1821
+ * disabled={item.props.disabled}
1822
+ * onClick={() => {
1823
+ * afterSelectChoice(item)
1824
+ * }}
1825
+ * >
1826
+ * {item.text}
1827
+ * </ChoiceButton>
1828
+ * )
1829
+ * })}
1830
+ * </List>
1831
+ * ```
1766
1832
  */
1767
1833
  this.props = {};
1768
1834
  this.text = text;