Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackRam-oss committed Aug 8, 2024
1 parent c754866 commit 93ea4f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/classes/LabelJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GameStepManager } from "../managers"
import { StepLabelJsonType } from "../types"
import { LabelIdType } from "../types/LabelIdType"
import { StepLabelType } from "../types/StepLabelType"
import ChoiceMenuOption from "./ChoiceMenuOption"
import LabelAbstract from "./LabelAbstract"

export default class LabelJson<T extends {} = {}> extends LabelAbstract<LabelJson<T>, T> {
Expand Down Expand Up @@ -31,7 +32,10 @@ export default class LabelJson<T extends {} = {}> extends LabelAbstract<LabelJso
private stepConverter(step: StepLabelJsonType): StepLabelType<T> {
return (props) => {
if (step.currentChoiceMenuOptions) {
setChoiceMenuOptions(step.currentChoiceMenuOptions)
let options = step.currentChoiceMenuOptions.map((option) => {
return new ChoiceMenuOption(option.text, option.label, option.props, option.type)
})
setChoiceMenuOptions(options)
}
else {
clearChoiceMenuOptions()
Expand Down
2 changes: 1 addition & 1 deletion src/types/StepLabelJsonType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type StepLabelJsonType = {
label: LabelIdType
type: LabelRunModeType
props: StorageObjectType
}
}[]
dialog?: {
character: string,
text: string,
Expand Down

0 comments on commit 93ea4f4

Please sign in to comment.