Skip to content

Commit

Permalink
callbacks serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklehamster committed Mar 19, 2024
1 parent 7f7f9e1 commit 913eb1f
Showing 1 changed file with 44 additions and 40 deletions.
84 changes: 44 additions & 40 deletions src/demo/DemoGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,48 +420,52 @@ export class DemoGame extends AuxiliaryHolder {
{ text: "Hello there." },
{
text: "How are you?",
action: () => ui.openMenu({
behavior: "CLOSE_AFTER_SELECT",
layout: {
position: [400, 360],
size: [undefined, 150],
positionFromRight: true,
positionFromBottom: true,
},
items: [
{
label: "I don't know",
behavior: "NONE",
action: [
ui => ui.openDialog({
layout: {
position: [100, 100],
size: [300, 200],
},
messages: [
{ text: "You should know!" },
],
}),
],
action: {
menu: {
behavior: "CLOSE_AFTER_SELECT",
layout: {
position: [400, 360],
size: [undefined, 150],
positionFromRight: true,
positionFromBottom: true,
},
{
label: "good",
action: ui => ui.openDialog({
layout: {
name: "main-dialog",
position: [undefined, 200],
positionFromBottom: true,
items: [
{
label: "I don't know",
behavior: "NONE",
action: {
dialog: {
layout: {
position: [100, 100],
size: [300, 200],
},
messages: [
{ text: "You should know!" },
],
}
},
messages: [
{ text: "That's nice to know!" },
],
}),
},
{
label: "bad",
},
],
}),
},
{
label: "good",
action: {
dialog: {
layout: {
name: "main-dialog",
position: [undefined, 200],
positionFromBottom: true,
},
messages: [
{ text: "That's nice to know!" },
],
},
},
},
{
label: "bad",
},
],
},
},
},
{ text: "Bye bye." },
{
Expand Down

0 comments on commit 913eb1f

Please sign in to comment.